MCP Local WP — Claude Code MCP server: WordPress database access
Hands an AI assistant read-only MySQL access to a WordPress site running in Local by Flywheel, so it reads your actual tables instead of guessing at them.
claude mcp add mcp-local-wp -- npx -y @verygoodplugins/mcp-local-wpWhat MCP Local WP does
The server attaches to the MySQL instance behind a Local by Flywheel site and exposes tools for listing schema and running queries. Writes are off the table. With the real structure in view, the assistant joins on fields that exist: a common miss is hunting for metadata in the same table as the main record when it lives elsewhere.
Finding the site takes no configuration. The server scans running mysqld processes, parses the active site's config and connects over the right socket or port. With more than one Local site, selection runs in order: SITE_ID, then SITE_NAME, then your current directory, then the first mysqld process it finds, and finally the most recently modified socket. Set MYSQL_HOST or MYSQL_SOCKET_PATH when the database sits outside Local.
Version 2.0 needs Node.js 24 or newer, so upgrade the runtime first or the server won't start. Query results arrive as { "rows": [...] }; table listings come in bounded pages shaped like { "tables": [...], "hasMore": false, "nextAfter": null }. Run mysql_current_site to confirm which database you're on before trusting the answer.
What it helps with
- see a plugin's real columns before writing a query
- build JOINs across tables that actually relate
- check whether rows exist before proposing SQL
- map custom tables from WooCommerce or LearnDash
- confirm which Local site your working directory maps to
Example prompts for the agent
- Run
mysql_current_siteand tell me which database you're connected to, then list the tables. - Show me the schema for the plugin's tables and write a query for unfinished quiz attempts.
- Check which meta keys the activity records actually carry on the
devsite.
How to install MCP Local WP
Platform CLI
claude mcp add mcp-local-wp -- npx -y @verygoodplugins/mcp-local-wpPlatform CLI
codex mcp add mcp-local-wp -- npx -y @verygoodplugins/mcp-local-wpConfig file
{
"mcpServers": {
"mcp-local-wp": {
"command": "npx",
"args": [
"-y",
"@verygoodplugins/mcp-local-wp"
]
}
}
}Config file
{
"servers": {
"mcp-local-wp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@verygoodplugins/mcp-local-wp"
]
}
}
}Platform CLI
gemini mcp add mcp-local-wp npx -y @verygoodplugins/mcp-local-wpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about MCP Local WP
How do I install MCP Local WP in Claude Code?
Run claude mcp add mcp-local-wp -- npx -y @verygoodplugins/mcp-local-wp. Node.js 24 or newer is required.
What does MCP Local WP do?
It connects an AI assistant to the MySQL database of a Local by Flywheel site for schema inspection and read-only queries. Nothing gets written.
How do I pick one site when Local runs several?
Put SITE_NAME or SITE_ID in the MCP config. Otherwise the server falls back to the current directory, the first running mysqld, then the newest socket.