MainWP
MCP server by mainwp Community
MainWP MCP Server connects Claude, Cursor, OpenAI Codex, VS Code Copilot and other MCP clients to MainWP, a self-hosted dashboard for managing many WordPress sites. Deletions wait for your approval by default. It is built for agencies and freelancers.
Install MainWP
Built from the published package, never by AI.
claude mcp add mainwp -e MAINWP_URL=YOUR_MAINWP_URL -e MAINWP_USER=YOUR_MAINWP_USER -e MAINWP_APP_PASSWORD=YOUR_MAINWP_APP_PASSWORD -- npx -y @mainwp/mcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"mainwp": {
"env": {
"MAINWP_URL": "YOUR_MAINWP_URL",
"MAINWP_USER": "YOUR_MAINWP_USER",
"MAINWP_APP_PASSWORD": "YOUR_MAINWP_APP_PASSWORD"
},
"args": [
"-y",
"@mainwp/mcp"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"mainwp": {
"env": {
"MAINWP_URL": "YOUR_MAINWP_URL",
"MAINWP_USER": "YOUR_MAINWP_USER",
"MAINWP_APP_PASSWORD": "YOUR_MAINWP_APP_PASSWORD"
},
"args": [
"-y",
"@mainwp/mcp"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"mainwp": {
"env": {
"MAINWP_URL": "YOUR_MAINWP_URL",
"MAINWP_USER": "YOUR_MAINWP_USER",
"MAINWP_APP_PASSWORD": "YOUR_MAINWP_APP_PASSWORD"
},
"args": [
"-y",
"@mainwp/mcp"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add mainwp --env MAINWP_URL=YOUR_MAINWP_URL --env MAINWP_USER=YOUR_MAINWP_USER --env MAINWP_APP_PASSWORD=YOUR_MAINWP_APP_PASSWORD -- npx -y @mainwp/mcp{
"mcpServers": {
"mainwp": {
"env": {
"MAINWP_URL": "YOUR_MAINWP_URL",
"MAINWP_USER": "YOUR_MAINWP_USER",
"MAINWP_APP_PASSWORD": "YOUR_MAINWP_APP_PASSWORD"
},
"args": [
"-y",
"@mainwp/mcp"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add mainwp npx -y @mainwp/mcpGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the mainwp block.
About
The MainWP MCP Server connects Claude, Cursor, OpenAI Codex, VS Code Copilot, and other MCP-compatible AI tools to MainWP, a self-hosted dashboard for managing many WordPress sites. You can ask for pending plugin updates, update WooCommerce across sites, or check which client sites are disconnected. It runs on your own computer, next to your AI tool, and installs nothing new on your Dashboard or child sites.
By default, deleting a site, plugin, or theme shows a preview and runs only after you approve it. Safe mode blocks those destructive operations outright, and allow and block lists control which tools the AI can see. The server signs in with a WordPress Application Password that can be revoked at any time and talks only to your Dashboard. It is built for agencies and freelancers who manage many WordPress sites and want AI help with updates, maintenance, and client work.
Written from the project's README and checked against it.
Tools it gives your assistant
SitesList, sync, check connectivity, add, reconnect, or remove child sites.UpdatesSee pending core, plugin, theme, and translation updates across the network, and apply them.Plugins and themesSee what is installed, activate, deactivate, or delete plugins and themes.Clients and tagsManage client records, assign sites, and track costs.KnowledgeRead agency, client, and site notes, skills, and memories before working (Dashboard 6.3 and later).Guided workflowsRun network summaries, site reports, security audits, and update plans.
What you need
- MainWP Dashboard 6.0 or later, reachable over HTTPS
- WordPress Application Password created in the Dashboard
- Node.js 20.19 or later on the computer that runs your AI tool
- An MCP-compatible AI client
| Setting | Needed | What it is |
|---|---|---|
MAINWP_Environment variable | Required | Address of your MainWP Dashboard, such as https://dashboard.example.com |
MAINWP_Environment variable | Required | WordPress username of the Dashboard administrator (the login name, not the display name) |
MAINWP_Environment variable, secret | Required | WordPress Application Password for that user, not their login password |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Which sites have pending plugin updates?
- Update WooCommerce everywhere it's behind.
- Which client sites are disconnected right now?
Good to know
- Some tools need a newer Dashboard version; the Quickstart lists which.
- Safe mode blocks destructive operations with no approval prompt.
- Around 70 tools in all, depending on your Dashboard version.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to MainWP
All alternatives →Turns GitHub repositories into architecture diagrams, written explanations, Mermaid source and narrated explainer videos. Built for developers who want to understand a codebase, and for AI agents that need to read one.
Mocks, records, and chaos-tests HTTP(S) dependencies for development and testing. One port serves many protocols, including gRPC, WebSockets, and LLM chat APIs. Built for developers and testers who need stand-in services during tests.
Provides MCP server and CLI tools that let AI coding agents build, test and manage iOS and macOS projects with Xcode and simulators. It is aimed at developers working on Apple platform apps.
Creates editable draw.io diagrams in AI chat from Mermaid, PlantUML, CSV or draw.io XML. Built for people who want diagrams from text prompts that stay editable in draw.io.
Indexes your code, git history, tests and decisions on your machine so AI coding agents can query the index instead of re-reading files. Built for developers who want fewer files opened and clearer answers about change risk and code health.
Gives your AI assistant hosted codebase intelligence for repos indexed on repowise.dev. Use it to ask how code works, what a change may break, and which tests to run.
Compare with GitDiagram, mockserver or XcodeBuildMCP
MainWP: common questions
Can the AI change my sites without asking first?
By default, deleting a site, plugin, or theme shows a preview and runs only after you say yes. On Dashboard 6.3 and later, updates work the same way.
Does it install anything on my child sites?
No. The source says it runs on your own computer and nothing new is installed on your Dashboard or child sites.
How does the server sign in to my Dashboard?
It uses a WordPress Application Password, separate from your login password, that you can revoke at any time.
How do I install MainWP?
In Claude Code run claude mcp add mainwp -e MAINWP_URL=YOUR_MAINWP_URL -e MAINWP_USER=YOUR_MAINWP_USER -e MAINWP_APP_PASSWORD=YOUR_MAINWP_APP_PASSWORD -- npx -y @mainwp/mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is MainWP the official server?
MainWP is a community project by mainwp, not verified by a company domain.
Is MainWP free?
The code is published under the GPL-3.0 licence. The service it connects to may have its own pricing.
Is MainWP safe to use?
It scores 80 of 100. Grades: maintenance A, licence C, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to MainWP?
Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.
Does MainWP work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
