WordPress database access via Local by Flywheel. Execute read-only MySQL queries and inspect schema.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
π― What if your AI assistant could actually SEE your WordPress database?
A Model Context Protocol (MCP) server that gives AI assistants like Claude and Cursor direct, read-only access to your Local by Flywheel WordPress database. No more guessing table structures. No more writing SQL queries blind. Your AI can now understand your actual data.
Think of MCP (Model Context Protocol) as a secure bridge between AI assistants and your development tools. Instead of copying and pasting database schemas or query results, MCP servers let AI assistants directly interact with your tools while you maintain complete control.
Without MCP: "Hey AI, I think there's a table called wp_something with a column that might be named user_meta... can you write a query?"
With MCP: "Hey AI, check what's in my database and write the exact query I need."
Picture this: You're debugging a LearnDash integration issue. Quiz results aren't syncing properly. You fire up Cursor to help diagnose the problem, but without database access, even the most advanced AI is just making educated guesses about your table structures.
Here's an actual support ticket we were working on. The task was simple: fetch quiz activity data from LearnDash tables.
β Before MCP Server (AI Flying Blind):
The AI tried its best, suggesting this query:
Problem? The activity_meta column doesn't exist! LearnDash stores metadata in a completely separate table with a different structure. Without database access, the AI made reasonable but incorrect assumptions. You'd spend the next 20 minutes manually correcting table names, discovering relationships, and rewriting the query.
β After MCP Server (AI With X-Ray Vision):
With database access, the AI immediately saw the actual table structure and wrote:
The difference? The AI could see that metadata lives in a separate user_activity_meta table, understood the relationship through activity_id, and knew exactly which meta keys were available. First try. Zero guesswork. Problem solved.
When your AI assistant can read your database:
When using the original mcp-server-mysql with Local by Flywheel, developers face several challenges:
lx97vbzE7) that change when sites are restartedThis MCP server automatically detects your active Local by Flywheel MySQL instance by:
mysqld instancesWhen you have multiple Local sites, the server uses priority-based site selection to ensure you're always connected to the right database:
SITE_ID env var - Direct site ID (highest priority)SITE_NAME env var - Human-readable site name lookupSpecify which site to connect to in your MCP config:
Or use the site ID directly:
When using Claude Code or Cursor, the server automatically detects which site you're working in based on your current directory. If you're editing files in /Users/.../Local Sites/dev/app/public/wp-content/plugins/my-plugin/, the server connects to the "dev" site's database automatically.
Use the mysql_current_site tool to see which site you're connected to:
Use mysql_list_sites to see all available sites and their status.
Execute read-only SQL against your Local WordPress database.
Input fields:
sql (string): Single read-only statement (SELECT/SHOW/DESCRIBE/EXPLAIN)params (string[]): Optional parameter values for ? placeholdersExample Usage:
Inspect database schema using INFORMATION_SCHEMA.
table: returns columns and indexes for that tableExamples:
Get information about the currently connected Local WordPress site.
Returns the site name, ID, path, domain, socket path, and how the site was selected (env var, cwd detection, or auto-detection).
List all available Local WordPress sites and their running status.
The easiest way to get started - no installation required:
Add this to your Cursor MCP configuration file (.cursor/mcp.json):
Add this to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\\Claude\\claude_desktop_config.json
For customization or local development:
For non-Local setups or custom configurations:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-local-wp)<a href="https://allmcps.com/mcp/mcp-local-wp"><img src="https://allmcps.com/api/badge/mcp-local-wp?style=directory" alt="MCP Local WP on AllMCPs" /></a>