MCP server
Let AI agents control your local PHP environment.
Bothy is a Mac app for local PHP and MySQL development, and bothy-mcp is its MCP server. Connect it to Claude, ChatGPT, Codex, Cursor or any MCP client and the agent can create sites, run SQL, change php.ini, read logs and run WP-CLI on your machine - using the same core as the app and the bothy CLI.
What is an MCP server?
The Model Context Protocol (MCP) is an open standard for connecting AI clients to tools. A client such as Claude Desktop or Cursor starts an MCP server, asks it which tools it offers, and gets back a name, a description and a parameter schema for each one. When you ask for something, the model picks a tool, fills in the parameters, and - in most clients - shows you the call before it runs.
bothy-mcp is a local stdio server: the client launches it as a process on your Mac and talks to it over standard input and output. Nothing listens on a network port, and there's no account or API key. It uses the app's licence activation, so once Bothy is activated the server works too.
The bothy_* tools
Around 40 tools, all prefixed bothy_. These are the real names your client will show.
bothy_list_sites, bothy_add_site (folder, git URL or starter), bothy_remove_site, bothy_rename_site, bothy_set_site_label, bothy_site_folder, bothy_export_site, bothy_set_site_env, bothy_exec
bothy_list_databases, bothy_create_database, bothy_assign_database, bothy_drop_database, bothy_query, bothy_db_snapshot, bothy_db_snapshots, bothy_db_restore, bothy_add_database_server
bothy_list_php, bothy_install_php, bothy_uninstall_php, bothy_set_site_php, bothy_set_site_ini, bothy_php_ini, bothy_set_site_xdebug
bothy_status, bothy_up, bothy_down, bothy_service, bothy_addon, bothy_purge_cache, bothy_doctor
bothy_stats, bothy_site_stats (req/h, 4xx/5xx, p95, FPM workers, slow requests), bothy_site_logs (php, access or slow)
bothy_mail_list, bothy_mail_get, bothy_mail_clear for Mailpit; bothy_wp runs WP-CLI against a WordPress site, installing wp-cli via Homebrew if it's missing
Worked examples
Real requests, the tools an agent calls to do them, and the CLI equivalent where there is one. Site and database names are examples.
- 1“Create a WordPress site called shop on PHP 8.3.”
One call:
bothy_add_sitewithname: shop,php: 8.3,starter: wordpress. The starter downloads WordPress, creates the database and writeswp-config.php. Addauto_install: trueand it completes the install with an admin account (a password is generated if you don't give one). The site is live at https://shop.test and appears in the app's sidebar. - 2“Create a database for it and assign it to the site.”
For a site that didn't come from a starter:
bothy_create_database(utf8mb4), thenbothy_assign_database- or the latter alone withcreate: true.bothy db create shop_db bothy site db shop assign shop_db
- 3“Show me the latest PHP errors on shop.”
bothy_site_logswithkind: phpreturns the last 100 lines by default. Ask foraccessto see requests from Caddy's JSON log, orslowfor the php-fpm slowlog. This is the one that saves the most copying and pasting.bothy logs shop --kind php
- 4“Which plugins are active? Update them all.”
bothy_wpwithargs: plugin list --status=active, thenplugin update --all. It runs with the site's own PHP version.bothy site exec shop -- wp plugin list --status=active
- 5“Snapshot the database before you run that migration.”
bothy_db_snapshotwrites a gzipped, single-transaction mysqldump and returns its path.bothy_db_snapshotslists them, andbothy_db_restoredrops, recreates and reloads the database from one (the newest if no path is given).bothy db snapshot shop_db bothy db snapshot --list
- 6“The import is running out of memory - raise memory_limit to 1G.”
Per site:
bothy_set_site_iniwithmemory_limitand1G, which affects only that site's FPM pool. For every site on a PHP version:bothy_php_ini, which edits that version's php.ini and reloads php-fpm. A good agent will ask which you mean.bothy site ini shop memory_limit 1G bothy php ini 8.3 memory_limit 1G
- 7“Which of my sites are still on PHP 7.4?”
bothy_list_sitesreturns every site with its URL, path, PHP version, SSL and php.ini overrides; the agent filters it. A natural follow-up is “move them to 8.2 and show me any new PHP errors”, which chainsbothy_set_site_phpandbothy_site_logs.
Setting it up in your client
Everything is in Integrations in the app. The short version:
- Claude Desktop and Cowork - click Install Extension…; Bothy installs itself as a desktop extension (.mcpb). Details.
- Claude Code -
claude mcp add --scope user bothy /Applications/Bothy.app/Contents/MacOS/bothy-mcp. Details. - ChatGPT desktop and Codex CLI - both read
~/.codex/config.toml; click Add to Codex or Copy TOML. ChatGPT, Codex. - Cursor, Windsurf, Zed, VS Code and others - paste the JSON below into the client's MCP config. Details.
{ "mcpServers": { "bothy": { "command": "/Applications/Bothy.app/Contents/MacOS/bothy-mcp" } } }
If your agent has a terminal, you can skip MCP entirely: every bothy command supports --json. See the CLI reference.
Before you let it loose
bothy_query runs SQL as root with no filter, bothy_drop_database can't be undone, bothy_db_restore replaces the database, and bothy_exec runs any command line in a site's folder (with a five-minute limit). Keep your client's approval prompts on for those, and make snapshots a habit. bothy_doctor, bothy_status, the list tools, stats and logs only read. More on this under AI-assisted development.
How Bothy's MCP server compares with other local tools
Not long ago this was unusual. Now several local development tools ship an MCP server, and some do things Bothy doesn't:
- Laravel Herd has an official MCP server documented for Claude Code, Cursor, Junie and Windsurf. It manages services and PHP versions, lists and secures sites, and can fetch the last Laravel Forge deployment and Herd's debug data (queries, jobs, logs, requests). Laravel Boost can install it automatically. If you deploy with Forge, that integration is something Bothy has no equivalent for.
- MAMP PRO (7.4.3 and later) connects to Claude Desktop, with access granted per site. The AI can work with that site's files, run SQL and run WP-CLI. Per-site opt-in is a finer-grained permission model than Bothy's, where the server can reach every site.
- ServBay ships an MCP server alongside an AI gateway and Ollama, and covers far more languages and databases than PHP and MySQL.
- Lerd is free and open source, runs on Linux as well as macOS, and has an MCP server for Claude Code, Cursor and Copilot.
What's different about Bothy's:
- Breadth. Around 40 tools covering the whole environment - raw SQL, snapshots and restore, per-site and per-version php.ini, Xdebug, three kinds of log, per-site request stats, caught mail and WP-CLI.
- CLI parity. The same operations exist as
bothycommands with--json, so shell agents and scripts get them without MCP. - A native app on the same core. What the agent does shows up in the app immediately, and vice versa.
- Setup for many clients in one place, including a one-click extension for Claude Desktop and Cowork.
- Price. $69 once for every 1.x release; the MCP server isn't a separate tier. See pricing.
For fuller comparisons see Bothy as a Herd alternative and Bothy as a MAMP alternative.
Questions
stdio. The client starts /Applications/Bothy.app/Contents/MacOS/bothy-mcp as a local process; nothing listens on the network.
Yes. bothy-mcp is a separate program that your AI client starts; it uses the same core and config file as the app, and the services it controls run as launchd agents that keep running after you quit Bothy. It does need Bothy to have been activated once.
If it supports stdio MCP servers, yes: point it at /Applications/Bothy.app/Contents/MacOS/bothy-mcp. If it only has a terminal, use bothy … --json.
Yes, through bothy_exec, which runs a command in the site's folder with that site's PHP version first on PATH.
No. bothy_query runs as MySQL root against local databases. Use your client's approval prompts and snapshots.
No. It's part of Bothy: $69 once, with every 1.x update.
Sources
Checked September 2026. Details change - check the vendor's site before deciding.