MainWP MCP Server
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MainWP MCP ServerWhat sites need updates?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MainWP MCP Server
A MainWP Labs project, powered by MainWP
Manage your whole WordPress network by talking to your AI assistant. MainWP MCP Server connects Claude, Cursor, OpenAI Codex, VS Code Copilot, and other MCP-compatible tools to your MainWP Dashboard, so you can ask in plain English:
"Which sites have pending plugin updates?"
"Update WooCommerce everywhere it's behind."
"Which client sites are disconnected right now?"
The server is a small program that runs on your own computer, alongside your AI tool. Nothing new is installed on your Dashboard or your child sites. Your Dashboard stays in control: it exposes only the tools you allow, and by default anything classified as destructive stops for your confirmation before it runs.
What You Can Do
Site Management: List sites, check connection status, sync data, add or remove child sites
Update Management: See pending updates across all sites, apply core/plugin/theme updates
Plugin and Theme Control: View installed plugins and themes, activate or deactivate them
Client Organization: Manage client records, assign sites to clients, track costs
Bulk Operations: Sync, reconnect, or check connectivity across dozens of sites at once
Built for WordPress agencies and site managers who want AI assistance with their MainWP workflows.
Related MCP server: WP Pinch
Documentation
Full documentation lives at docs.mainwp.com/mcp-server:
Quickstart with screenshots, if this is your first MCP server
Setup for every AI client: Claude Desktop, Claude Code, Cursor, VS Code Copilot, OpenAI Codex, ZenCoder, and others
Safety & Permissions: the confirmation flow, safe mode, and tool filtering
Prompt Cookbook: ready-to-use prompts by task
Quick Start
Requirements: Node.js >=20.19.0 and MainWP Dashboard 6.0+
1. Create an Application Password. This is a separate password WordPress issues for tools like this one; it never changes your login and you can revoke it at any time.
Log into your MainWP Dashboard as an administrator
Go to Users > Profile (click your username in the top right)
Scroll to the Application Passwords section
Enter a name like "MainWP MCP Server" and click Add New Application Password
Copy the generated password immediately (it is only shown once; spaces are fine either way)
Tip: Create a dedicated WordPress user for API access rather than using your main admin account. It keeps the audit trail clean and is easy to revoke later.
2. Add the server to your AI tool. For Claude Desktop and most other MCP clients, the config block looks like this:
{
"mcpServers": {
"mainwp": {
"command": "npx",
"args": ["-y", "@mainwp/mcp"],
"env": {
"MAINWP_URL": "https://your-dashboard.com",
"MAINWP_USER": "admin",
"MAINWP_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
}
}
}
}Config file locations and variants for each client are in the client setup guide. Prefer a central credentials file, or manage several Dashboards? See the configuration reference.
3. Restart your AI tool and ask: "List all my sites". A working setup returns your child sites by name and URL.
Start bounded. You don't have to expose every tool on day one. Grant the smallest set your workflow needs and widen from there. See Restrict Available Tools.
For development, clone and build instead of npx:
git clone https://github.com/mainwp/mainwp-mcp.git
cd mainwp-mcp
npm ci
npm run buildConfiguration
Variable | Required | Default | Description |
| Yes | Base URL of your MainWP Dashboard | |
| For basic auth | WordPress admin username | |
| For basic auth | WordPress Application Password | |
| No | Compatibility only; the Abilities API is expected to reject bearer tokens. Use an Application Password | |
| No |
| Skip SSL verification (dev only) |
| No |
| Allow HTTP URLs (credentials sent in plain text) |
| No |
| Block destructive operations |
| No |
| Require two-step confirmation for destructive operations |
| No | Whitelist of tools to expose | |
| No | Blacklist of tools to hide | |
| No |
|
|
| No |
| Response JSON formatting: |
| No |
| Maximum API requests per minute ( |
| No |
| Request timeout in milliseconds |
| No |
| Maximum single response size in bytes (10MB) |
| No |
| Maximum cumulative session data in bytes (50MB) |
| No |
| Enable automatic retry for transient errors |
| No |
| Total retry attempts including initial request |
| No |
| Base delay between retries in milliseconds |
| No |
| Maximum delay between retries in milliseconds |
| No |
| Comma-separated ability namespace allowlist |
⚠️ Security Warning: SSL Verification
Setting
MAINWP_SKIP_SSL_VERIFY=truedisables SSL certificate verification, making your connection vulnerable to man-in-the-middle (MITM) attacks. Only use for local development with self-signed certificates or isolated test environments. Never use in production or on untrusted networks.
Instead of environment variables, you can use a settings.json file in the working directory or ~/.config/mainwp-mcp/settings.json; environment variables override file settings. Field names, the settings-to-variable mapping, and per-setting detail are in the Configuration Reference.
Tools
Around 60 tools, organized by category (the exact count varies by Dashboard version):
Category | Tools | Reference |
Sites | 30 | |
Updates | 13 | |
Clients | 11 | |
Tags | 7 | |
Batch Operations | 1 |
Tool names drop the mainwp/ namespace and use underscores: the ability mainwp/list-sites-v1 is the tool list_sites_v1. Naming rules, the built-in MCP resources (mainwp://abilities, mainwp://status, and friends), and namespace prefixing for third-party abilities are covered in Tools & Resources.
Safety
Operations classified as destructive (the deletion tools, plus any ability that does not declare itself non-destructive) use a two-step flow by default: the server returns a preview and a one-time token, your AI shows you what will be affected, and only your explicit approval executes it. Disabling the flow (MAINWP_REQUIRE_USER_CONFIRMATION=false) removes that gate. Safe mode (MAINWP_SAFE_MODE=true) blocks destructive operations entirely, and tool filtering can remove them from the AI's view altogether. The full model, including what safe mode does and does not protect against, is on Safety & Permissions; the underlying trust and credential model is in the Security Model.
Contributing
npm ci # install dependencies
npm run dev # run in watch mode
npm run inspect # test with MCP Inspector
npm test # run tests
npm run lint # check code style
npm run format # fix formattingCI runs lint, format check, type check, tests, and build on every pull request.
When changing configuration options, update both the environment-variable table above and the docs-site configuration reference; they are maintained in parallel.
License
GPL-3.0. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to manage WordPress sites through natural conversation, supporting post creation, content updates, site queries, and draft-to-publish workflows via the WordPress REST API.Last updated9MIT
- Alicense-qualityBmaintenanceEnables AI assistants to manage and interact with WordPress sites through MCP, providing tools for content creation, moderation, WooCommerce operations, and governance.Last updated46GPL 2.0
- Alicense-qualityCmaintenanceEnables AI assistants to manage WordPress content, design, SEO, WooCommerce, and more through natural language commands.Last updated303MIT
- Alicense-qualityCmaintenanceEnables AI to manage WordPress sites with 190+ tools for complete control over content, themes, plugins, files, and more.Last updated37MIT
Related MCP Connectors
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
AI-powered design and management for Webflow Sites
Sync Lightroom, Figma, Dropbox & Canva assets to WordPress and Shopify via natural language.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mainwp/mainwp-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server