# MCP Local WP

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 34
- Author: verygoodplugins
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/verygoodplugins/mcp-local-wp
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-local-wp

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp-local-wp -- npx -y @verygoodplugins/mcp-local-wp
```

### Codex

**Platform CLI**
```bash
codex mcp add mcp-local-wp -- npx -y @verygoodplugins/mcp-local-wp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-local-wp": {
            "command": "npx",
            "args": [
                "-y",
                "@verygoodplugins/mcp-local-wp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-local-wp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@verygoodplugins/mcp-local-wp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp-local-wp npx -y @verygoodplugins/mcp-local-wp
```

## When to use it
- 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
- Run `mysql_current_site` and 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 `dev` site.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27669
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49845

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
