by 10up
Enables AI‑powered WordPress development inside Local by exposing an MCP server, auto‑generating configuration files, and providing rich site context for supported AI agents.
LocalWP Agent Tools adds an MCP server to each Local site, giving AI agents direct access to WP‑CLI, error logs, configuration data, and site management functions.
.mcp.json, .cursor/mcp.json), and generates context files such as CLAUDE.md.npm install --legacy-peer-deps, npm run build, copy the built add‑on to Local’s add‑ons directory (platform‑specific path), install production deps with npm install --production --ignore-scripts, and restart Local.http://localhost:{port}/sites/{siteId}/mcp (stable port persisted in ~/.local-agent-tools/port).CLAUDE.md, .cursorrules, etc.) containing PHP/MySQL versions, active plugins, theme, and file tree.wp-config.php while you code.create_site and instantly have AI context ready.WP_DEBUG, and run health checks without leaving the editor.Q: Do I need a separate server process? A: No. The MCP server runs inside Local’s main Electron process and is automatically started when the add‑on is enabled.
Q: Which AI tools are supported? A: Claude Code, Cursor, Windsurf, VS Code Copilot, and any client that follows the MCP protocol.
Q: How are ports managed?
A: A stable port (default 24842) is persisted at ~/.local-agent-tools/port; the same port is reused across restarts.
Q: Can I create a site without manual UI interaction?
A: Yes. Use the create_site MCP tool; it mirrors Local’s Add Site flow and can enable Agent Tools automatically.
Q: What happens if site provisioning fails?
A: The initial call returns early; subsequent site_status calls include a creationError field with details.
Q: Are generated files committed to Git?
A: The add‑on updates .gitignore to exclude MCP config and context files.
Q: How do I update the add‑on during development?
A: Run npm run watch, copy the compiled lib/* to the installed add‑on directory, and restart Local.
A Local add-on that provides an MCP server and project context for AI-powered WordPress development. Works with Claude Code, Cursor, Windsurf, VS Code Copilot, and any MCP client.
When you click "Enable" on a site in Local, the add-on:
.mcp.json, .cursor/mcp.json, etc.) — auto-configured with the correct HTTP endpoint for each agentCLAUDE.md, .cursorrules, etc.) — site context including PHP/MySQL versions, active plugins, theme, and file structure.gitignore — so generated files aren't committedThen open the site folder in your AI tool of choice and you're ready to go.
The MCP server runs as a single HTTP server inside Local's Electron main process — no separate Node.js processes per site. Each site gets its own endpoint:
http://localhost:{port}/sites/{siteId}/mcp
The server uses the MCP Streamable HTTP transport. The port is stable across restarts (persisted at ~/.local-agent-tools/port, default 24842).
Sites remain registered even when stopped, so the MCP endpoint is always reachable. Tools that need running services (WP-CLI, database) return appropriate errors; file-based tools (config, logs, site info) work regardless. Config is refreshed on each tool call, so starting a site automatically makes database tools work without reconnecting.
| Agent | MCP Config | Context File |
|---|---|---|
| Claude Code | .mcp.json |
CLAUDE.md |
| Cursor | .cursor/mcp.json |
.cursorrules |
| Windsurf | .windsurf/mcp.json |
.windsurfrules |
| VS Code Copilot | .vscode/mcp.json |
.github/copilot-instructions.md |
| Category | Tools | Description |
|---|---|---|
| WP-CLI | wp_cli |
Run any WP-CLI command (database queries, imports, exports, search-replace, plugin/theme management, etc.) |
| Logs | read_error_log |
Read and parse the PHP error log |
read_access_log |
Read the nginx access log | |
wp_debug_toggle |
Enable/disable WP_DEBUG, WP_DEBUG_LOG, and SCRIPT_DEBUG | |
| Config | read_wp_config |
Parse wp-config.php constants and table prefix |
edit_wp_config |
Add or modify a wp-config.php constant (with backup) | |
| Site | get_site_info |
Paths, URLs, database config, PHP/WP versions, active plugins and theme |
site_health_check |
Database connectivity, file permissions, WP_DEBUG status, log sizes, PHP version | |
| Environment | site_start |
Start a site's services (PHP, MySQL, web server) |
site_stop |
Stop a site's services | |
site_restart |
Restart a site's services | |
site_status |
Get current status of a site | |
list_sites |
List all Local sites with status | |
create_site |
Create a new WordPress site in Local, optionally enabling Agent Tools on it | |
list_service_versions |
PHP, database, and web server versions available to create_site |
create_site drives the same code path as Local's own Add Site flow, so a new site gets provisioned services and a real WordPress install:
create_site({ name: "Client Redesign", phpVersion: "8.2.29", enableAgentTools: true })
Three things to know:
site_status reports adding → provisioning → running. Poll that until it reports running. Pass wait: true to block instead, only if your client tolerates long tool calls./etc/hosts and macOS/Windows will prompt for administrator credentials. Site creation is never fully unattended.site_status includes a creationError field explaining why.Omit phpVersion, database and webServer to accept Local's own defaults, or call list_service_versions first to see what is available. Versions reported with installed: false are downloaded on demand, which makes creation considerably slower.
With enableAgentTools: true, Agent Tools is turned on for the site once it finishes provisioning — registering it with the MCP server and writing its MCP config and context files, exactly as clicking Enable in the UI does. Use agents to pick which ones (defaults to ["claude"]).
git clone <repo-url> agent-tools
cd agent-tools
npm install --legacy-peer-deps
npm run build
Copy the built add-on to Local's add-ons directory:
# macOS
cp -r . ~/Library/Application\ Support/Local/addons/agent-tools/
# Linux
cp -r . ~/.config/Local/addons/agent-tools/
# Windows (PowerShell)
Copy-Item -Recurse -Force . "$env:APPDATA\Local\addons\agent-tools"
Install production dependencies in the installed location and restart Local:
# macOS
cd ~/Library/Application\ Support/Local/addons/agent-tools/
# Linux
cd ~/.config/Local/addons/agent-tools/
# Windows (PowerShell)
cd "$env:APPDATA\Local\addons\agent-tools"
npm install --production --ignore-scripts
# Then restart Local
# Build the add-on
npm run build
# Watch for changes
npm run watch
After building, sync to the installed add-on:
# macOS
cp -R lib/* ~/Library/Application\ Support/Local/addons/agent-tools/lib/
# Linux
cp -R lib/* ~/.config/Local/addons/agent-tools/lib/
# Windows (PowerShell)
Copy-Item -Recurse -Force lib\* "$env:APPDATA\Local\addons\agent-tools\lib"
Then restart Local to pick up changes.
agent-tools/
├── src/ # Add-on source (TypeScript)
│ ├── main.ts # Main process — lifecycle hooks, IPC, MCP server startup
│ ├── renderer.tsx # Renderer process — React UI
│ ├── mcp-server.ts # HTTP MCP server — session management, Streamable HTTP transport
│ ├── helpers/
│ │ ├── site-config.ts # SiteConfig type and SiteConfigRegistry
│ │ ├── paths.ts # Platform-specific binary resolution (PHP, MySQL, WP-CLI)
│ │ ├── new-site.ts # Pure helpers for create_site: nicename, domain, and path validation
│ │ └── port.ts # Stable port allocation with file persistence
│ └── tools/ # MCP tool implementations
│ ├── index.ts # Aggregates definitions, routes handleToolCall()
│ ├── wpcli.ts # wp_cli
│ ├── logs.ts # read_error_log, read_access_log, wp_debug_toggle
│ ├── config.ts # read_wp_config, edit_wp_config
│ ├── site.ts # get_site_info, site_health_check
│ └── environment.ts # site_start, site_stop, site_restart, site_status, list_sites, create_site, list_service_versions
├── lib/ # Compiled output
├── package.json
└── tsconfig.json
macOS (darwin-arm64 and darwin-x64), Windows, and Linux.
Active: 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of Local. Bug reports, feature requests, questions, and pull requests are welcome.
A complete listing of all notable changes to Agent Tools are documented in CHANGELOG.md.
Please read CODE_OF_CONDUCT.md for details on our code of conduct, CONTRIBUTING.md for details on the process for submitting pull requests to us, and CREDITS.md for a listing of maintainers, contributors, and libraries for Agent Tools.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.