What is MCP Local WP?
MCP Local WP is a Node.js MCP server from Very Good Plugins. It detects the running MySQL instance of a Local by Flywheel site and lets an AI client inspect the schema and run read-only SQL, so queries match your real tables instead of guesses.
MCP Local WP is a Model Context Protocol server for WordPress developers who work in Local by Flywheel. It lets the assistant look at the real database, so it stops guessing table and column names when it writes queries.
Instead of hardcoded socket paths, it scans for the running mysqld process, reads that site's configuration and connects. Explicit MySQL variables are the fallback for setups that are not Local.
How it behaves
- Reads only by default: one SELECT, SHOW, DESCRIBE or EXPLAIN statement per call.
- Runs reads inside a database enforced read-only transaction.
- Picks a site by SITE_ID, SITE_NAME, working directory, running process, then newest socket.
- Needs Node.js 24 or later as of version 2.0.
Who it is for
Best for
- Plugin and theme developers debugging data issues on a Local site.
- Developers who want an assistant to learn custom plugin tables before writing queries.
Not for
- Content editing or page building. It reads data and does not manage posts through WordPress.
- Live production databases. The README frames it as a local development tool.
Use it with UiChemy
This server inspects data on your machine. When you move to design, AI website builders for WordPress compares the routes, and LocalWP Agent Tools covers other Local tasks. Click Get Started on uichemy.com.
Connect MCP Local WP: Read-Only Database Access for Local Sites to your AI client
npx -y @verygoodplugins/mcp-local-wp@latestStart a Local site
Install Local by Flywheel and start at least one site. The server finds the running database.
Add the config
Add the JSON to your Cursor or Claude Desktop configuration file, as the README shows.
Pick a site if needed
Set SITE_NAME or SITE_ID in env when several sites run, or work inside the site folder.
Verify
Call mysql_current_site to see which site you are connected to, and mysql_list_sites to list all sites.
Client configuration
{
"mcpServers": {
"mcp-local-wp": {
"command": "npx",
"args": ["-y", "@verygoodplugins/mcp-local-wp@latest"]
}
}
}Endpoints and ports
localhostManual connection fallback/path/to/mysqld.sockManual socket pathtrueExposes the separate mysql_write toolWhat you can do with it
- Automatic detectionFinds the active Local MySQL instance, even though its path changes between restarts.
- Multi-site selectionA priority list chooses the site, including detection from your working directory.
- Read-only enforcementA tokenizer and a read-only transaction guard queries, including CTEs.
- Paged schema listingTable names come in bounded pages with a next cursor.
- Structured resultsTools return matching structured and JSON text results, and failures set isError.
- Optional guarded writesINSERT, UPDATE and DELETE work only with writes enabled, and need bound conditions.
Tools it exposes
mysql_query
Runs one read-only SQL statement, with optional bound parameters.
mysql_schema
Lists table names in pages, or returns columns and indexes for one table.
mysql_current_site
Shows the connected site, its ID, path, domain and how it was chosen.
mysql_list_sites
Lists Local sites and whether each is running.
mysql_write
Optional tool that appears only when writes are enabled by an environment variable.
Frequently asked questions
What is MCP Local WP?
It is an MCP server that gives an AI client read-only SQL access to a Local by Flywheel WordPress database. It auto detects the running MySQL instance, so you do not hardcode socket paths that change on restart.
How do I install MCP Local WP?
Add the npx command for @verygoodplugins/mcp-local-wp to your MCP client config, with Local running and a site started. Version 2.0 needs Node.js 24 or later. No clone or build is required for the quick setup.
Can it change my database?
Not by default. Queries run in a read-only transaction. Setting MYSQL_ALLOW_WRITES to true adds a separate mysql_write tool, and UPDATE and DELETE need bound column comparisons in the WHERE clause.
What if I run several Local sites?
Set SITE_ID or SITE_NAME, or work inside the site's folder and the server detects it. Otherwise it uses the first running Local mysqld. The mysql_current_site tool tells you which one is connected.
Does it work outside Local by Flywheel?
Yes, through fallback variables. Set MYSQL_HOST or MYSQL_SOCKET_PATH with the database name, user and password. The README says the server supports local development, so use least privilege credentials for anything else.
Does it work with Cursor?
Yes. The README gives a Cursor configuration for the mcp.json file and a Claude Desktop configuration, and mentions automatic site detection from the working directory in Claude Code or Cursor.
What license does it use?
The README states GPL-3.0-or-later, though GitHub does not detect a license identifier for the repository. Check the LICENSE file before you redistribute or modify the code in your own projects.
What are alternatives to MCP Local WP?
For managing Local sites and WP-CLI tasks see LocalWP Agent Tools. For developer workflows see the WordPress developer MCP server. Use this server when you mainly need to read and understand table data.


