Local by Flywheel▌
by verygoodplugins
Easily connect to your Local by Flywheel WordPress databases. Effortless setup, no manual config—ideal for WordPress dev
Automatically detects and connects to Local by Flywheel WordPress development environments by scanning running processes to find active mysqld instances and dynamically building correct connection parameters, providing reliable database access for WordPress developers without manual path configuration.
Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.
best for
- / WordPress developers using Local by Flywheel
- / Debugging WordPress database issues with AI assistance
- / Plugin development and custom query writing
capabilities
- / Execute read-only SQL queries against WordPress databases
- / Inspect database table schemas and structure
- / Auto-detect running Local by Flywheel instances
- / List all tables in WordPress database
- / Show table columns and indexes
what it does
Automatically detects and connects to Local by Flywheel WordPress database environments, giving AI assistants direct read-only access to inspect schemas and query data without manual configuration.
about
Local by Flywheel is a community-built MCP server published by verygoodplugins that provides AI assistants with tools and capabilities via the Model Context Protocol. Easily connect to your Local by Flywheel WordPress databases. Effortless setup, no manual config—ideal for WordPress dev It is categorized under databases, developer tools. This server exposes 2 tools that AI clients can invoke during conversations and coding sessions.
how to install
You can install Local by Flywheel in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
license
NOASSERTION
Local by Flywheel is released under the NOASSERTION license.
readme
MCP Server Local WP
🎯 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.
🤔 What's an MCP Server?
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."
💡 The WordPress Developer's Dilemma
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.
The Real-World Impact
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:
$quiz_activities = $wpdb->get_results(
$wpdb->prepare(
'SELECT post_id, activity_meta FROM ' . esc_sql( LDLMS_DB::get_table_name( 'user_activity' ) ) . '
WHERE user_id=%d AND activity_type=%s AND activity_status=1 AND activity_completed IS NOT NULL',
$user_id,
'quiz'
),
ARRAY_A
);
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:
$quiz_activities = $wpdb->get_results(
$wpdb->prepare(
'SELECT ua.post_id, ua.activity_id, uam.activity_meta_key, uam.activity_meta_value
FROM ' . esc_sql( LDLMS_DB::get_table_name( 'user_activity' ) ) . ' ua
LEFT JOIN ' . esc_sql( LDLMS_DB::get_table_name( 'user_activity_meta' ) ) . ' uam
ON ua.activity_id = uam.activity_id
WHERE ua.user_id=%d AND ua.activity_type=%s AND ua.activity_completed IS NOT NULL
AND uam.activity_meta_key IN (%s, %s, %s)',
$user_id,
'quiz',
'percentage',
'points',
'total_points'
),
ARRAY_A
);
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.
🚀 Why This Changes Everything
When your AI assistant can read your database:
- No more schema guessing - It sees your actual tables and columns
- Accurate JOIN operations - It understands table relationships
- Real data validation - It can verify that data exists before suggesting queries
- Plugin-aware development - It adapts to any plugin's custom tables (WooCommerce, LearnDash, etc.)
- Instant debugging - "Show me all users who haven't completed quiz ID 42" becomes a 5-second task
🔧 The Local by Flywheel Challenge We Solved
When using the original mcp-server-mysql with Local by Flywheel, developers face several challenges:
- Dynamic Paths: Local by Flywheel generates unique identifiers for each site (like
lx97vbzE7) that change when sites are restarted - Socket vs Port Confusion: Local uses both Unix sockets and TCP ports, but the configuration can be tricky
- Hardcoded Configurations: Most setups require manual path updates every time Local restarts
Our Solution
This MCP server automatically detects your active Local by Flywheel MySQL instance by:
- Process Detection: Scans running processes to find active
mysqldinstances - Config Parsing: Extracts MySQL configuration from the active Local site
- Dynamic Connection: Connects using the correct socket path or port automatically
- Fallback Support: Falls back to environment variables for non-Local setups
Multi-Site Support
When you have multiple Local sites, the server uses priority-based site selection to ensure you're always connected to the right database:
Selection Priority
SITE_IDenv var - Direct site ID (highest priority)SITE_NAMEenv var - Human-readable site name lookup- Working directory detection - If your cwd is within a Local site path, that site is used
- Process detection - First running Local mysqld found
- Filesystem fallback - Most recently modified socket
Explicit Site Selection
Specify which site to connect to in your MCP config:
{
"mcpServers": {
"wordpress-dev": {
"command": "npx",
"args": ["-y", "@verygoodplugins/mcp-local-wp@latest"],
"env": {
"SITE_NAME": "dev"
}
}
}
}
Or use the site ID directly:
{
"env": {
"SITE_ID": "lx97vbzE7"
}
}
Working Directory Detection
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.
Verifying Your Connection
Use the mysql_current_site tool to see which site you're connected to:
{
"siteName": "dev",
"siteId": "lx97vbzE7",
"sitePath": "/Users/.../Local Sites/dev",
"domain": "dev.local",
"selectionMethod": "cwd_detection"
}
Use mysql_list_sites to see all available sites and their status.
Tools Available
mysql_query
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?placeholders
Example Usage:
-- With parameters
SELECT * FROM wp_posts WHERE post_status = ? ORDER BY post_date DESC LIMIT ?;
-- params: ["publish", "5"]
-- Direct queries
SELECT option_name, option_value FROM wp_options WHERE option_name LIKE '%theme%';
SHOW TABLES;
DESCRIBE wp_users;
mysql_schema
Inspect database schema using INFORMATION_SCHEMA.
- No args: lists tables with basic stats
- With
table: returns columns and indexes for that table
Examples:
// List all tables
{
"tool": "mysql_schema",
"args": {}
}
// Inspect a specific table
{
"tool": "mysql_schema",
"args": { "table": "wp_posts" }
}
mysql_current_site
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).
{
"tool": "mysql_current_site",
"args": {}
}
// Returns:
// {
// "siteName": "dev",
// "siteId": "lx97vbzE7",
// "sitePath": "/Users/.../Local Sites/dev",
// "domain": "dev.local",
// "selectionMethod": "cwd_detection",
// "socketPath": "/Users/.../Local/run/lx97vbzE7/mysql/mysqld.sock"
// }
mysql_list_sites
List all available Local WordPress sites and their running status.
{
"tool": "mysql_list_sites",
"args": {}
}
// Returns:
// {
// "sites": [
// { "id": "lx97vbzE7", "name": "dev", "domain": "dev.local", "running": true },
// { "id": "WP7lolWDi", "name": "staging", "domain": "staging.local", "running": false }
// ],
// "currentSiteId": "lx97vbzE7"
// }
Installation
Prerequisites
- Local by Flywheel installed and running
- An active Local site running
- Node.js 18+ (for local development only)
Quick Setup (Recommended)
The easiest way to get started - no installation required:
Cursor IDE Configuration
Add this to your Cursor MCP configuration file (.cursor/mcp.json):
{
"mcpServers": {
"mcp-local-wp": {
"command": "npx",
"args": [
"-y",
"@verygoodplugins/mcp-local-wp@latest"
]
}
}
}
Claude Desktop Configuration
Add this to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"mcp-local-wp": {
"command": "npx",
"args": [
"-y",
"@verygoodplugins/mcp-local-wp@latest"
]
}
}
}
Advanced Setup (Local Development)
For customization or local development:
Install from Source
git clone https://github.com/verygoodplugins/mcp-local-wp.git
cd mcp-local-wp
npm install
npm run build
Local Configuration
{
"mcpServers": {
"mcp-local-wp": {
"command": "node",
"args": [
"/full/path/to/mcp-local-wp/dist/index.js"
]
}
}
}
Custom Environment Variables
For non-Local setups or custom configurations:
{
"mcpServers": {
"mcp-local-wp": {
"command": "npx",
"args": [
"-y",
"@verygoodplugins/mcp-local-w
---
FAQ
- What is the Local by Flywheel MCP server?
- Local by Flywheel is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
- How do MCP servers relate to agent skills?
- Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
- How are reviews shown for Local by Flywheel?
- This profile displays 53 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.6 out of 5—verify behavior in your own environment before production use.
Use Cases▌
Direct Database Queries from AI
Enable Claude to query your database directly using natural language
Example
Ask 'Show me top 10 customers by revenue this month' and get SQL results instantly
Eliminate manual SQL writing for ad-hoc queries, get insights 10x faster
Data Analysis & Reporting
Generate complex reports and analytics without leaving conversation
Example
Analyze sales trends, cohort retention, user behavior patterns conversationally
Democratize data access—non-technical team members can query databases
Schema Exploration
Understand database structure, relationships, and data models
Example
'Explain the user_orders table schema and its relationships'
Onboard engineers faster, explore unfamiliar databases efficiently
Data Validation & Quality Checks
Run data quality queries to catch anomalies and inconsistencies
Example
Find duplicate records, missing values, orphaned foreign keys automatically
Maintain data integrity with less manual SQL work
Implementation Guide▌
Prerequisites
- ›Claude Desktop 0.7.0+ or Cursor with MCP support
- ›Database credentials (read-only recommended for safety)
- ›Network access from Claude client to database
- ›Understanding of database security and access control
Time Estimate
15-30 minutes including configuration and testing
Installation Steps
- 1.Install MCP server: npm install -g @modelcontextprotocol/server-[name]
- 2.Configure database connection in Claude Desktop config (~/.claude/mcp.json)
- 3.Provide connection string: host, port, database, username, password
- 4.Restart Claude Desktop to load MCP server
- 5.Test connection: 'List all tables in database'
- 6.Run simple query: 'Show me 5 rows from users table'
- 7.Verify results and permissions are correct
- 8.Document query patterns for team use
Troubleshooting
- ⚠Connection refused: Check database is running and network accessible
- ⚠Authentication failed: Verify credentials, check user permissions
- ⚠Claude can't see tables: Grant appropriate read permissions to database user
- ⚠Slow queries: Add indexes, limit result set size, use read replicas
- ⚠MCP server not loading: Check config syntax, restart Claude Desktop
Best Practices▌
✓ Do
- +Use read-only database credentials to prevent accidental writes
- +Connect to read replica, not production primary database
- +Set query timeout limits to prevent long-running queries
- +Document database schema and common queries for AI context
- +Monitor query performance and optimize slow queries
- +Use connection pooling for better performance
- +Test with non-production data first
✗ Don't
- −Don't use production write credentials—risk of data corruption
- −Don't query production database during peak traffic hours
- −Don't expose sensitive PII without proper access controls
- −Don't skip query result validation—AI can misinterpret schema
- −Don't allow unlimited result set sizes—set LIMIT clauses
- −Don't share database credentials in plain text config files
💡 Pro Tips
- ★Create database views for common queries to simplify AI access
- ★Add schema comments/descriptions so AI understands column meanings
- ★Use semantic table/column names ('customer_lifetime_value' not 'clv')
- ★Set up query logging to audit what Claude is querying
- ★Create saved query templates for recurring analysis
- ★Combine with data visualization tools for better insights
Technical Details▌
Architecture
MCP server acts as bridge between Claude and database, translating natural language to SQL queries and returning results in structured format.
Protocols
- Model Context Protocol (MCP)
- Database-specific protocols (PostgreSQL, MySQL, MongoDB)
Compatibility
- PostgreSQL
- MySQL
- SQLite
- MongoDB
- Redis
When to Use This▌
✓ Use When
Use for ad-hoc data queries, exploratory analysis, report generation, schema exploration, and democratizing data access. Best for read-heavy analytics workloads.
✗ Avoid When
Avoid for production write operations, mission-critical transactions, real-time OLTP workloads, or when database contains sensitive PII without proper access controls. Use read replicas, not primary.
Integration▌
- →Read replica connection for analytics queries
- →Database view layer to abstract complex joins
- →Query result caching for repeated questions
- →Audit logging of all AI-generated queries
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
List & Promote Your MCP Server
Share your MCP server with the developer community
Ratings
4.6★★★★★53 reviews- ★★★★★Lucas Patel· Dec 28, 2024
Local by Flywheel is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
- ★★★★★Shikha Mishra· Dec 24, 2024
I recommend Local by Flywheel for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
- ★★★★★Kabir White· Dec 4, 2024
We wired Local by Flywheel into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Zaid Ndlovu· Nov 27, 2024
I recommend Local by Flywheel for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
- ★★★★★Aisha Gill· Nov 19, 2024
Useful MCP listing: Local by Flywheel is the kind of server we cite when onboarding engineers to host + tool permissions.
- ★★★★★Yash Thakker· Nov 15, 2024
Strong directory entry: Local by Flywheel surfaces stars and publisher context so we could sanity-check maintenance before adopting.
- ★★★★★Yusuf Martinez· Nov 11, 2024
According to our notes, Local by Flywheel benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
- ★★★★★Tariq Thompson· Oct 18, 2024
Local by Flywheel reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Aisha Rao· Oct 10, 2024
We evaluated Local by Flywheel against two servers with overlapping tools; this profile had the clearer scope statement.
- ★★★★★Dhruvi Jain· Oct 6, 2024
Local by Flywheel has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
showing 1-10 of 53