# MainWP

Connect an AI client to MainWP to inspect a WordPress network, review updates, and manage sites. Destructive changes require approval by default.

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

## What it does

MainWP gives an MCP-compatible AI client access to a MainWP Dashboard. Use it to check site connectivity and pending updates, apply updates, manage plugins and themes, or review client records. The server runs on the same computer as your AI tool; nothing needs to be installed on the Dashboard or child sites.

Setup requires Node.js 20.19 or later, a MainWP Dashboard version 6.0 or later reachable over HTTPS, and a WordPress Application Password. In Claude Code, add the server with `claude mcp add`. Site, plugin, and theme deletions show a preview and wait for approval by default; safe mode blocks those actions outright. If you need unattended deletion, that default behavior matters.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `MAINWP_URL`, `MAINWP_USER`, `MAINWP_APP_PASSWORD` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mainwp-mcp -e MAINWP_URL=<MAINWP_URL> -e MAINWP_USER=<MAINWP_USER> -e MAINWP_APP_PASSWORD=<MAINWP_APP_PASSWORD> -- npx -y @mainwp/mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add mainwp --env MAINWP_URL=<MAINWP_URL> --env MAINWP_USER=<MAINWP_USER> --env MAINWP_APP_PASSWORD=<MAINWP_APP_PASSWORD> -- npx -y @mainwp/mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mainwp": {
            "command": "npx",
            "args": [
                "-y",
                "@mainwp/mcp"
            ],
            "env": {
                "MAINWP_URL": "<MAINWP_URL>",
                "MAINWP_USER": "<MAINWP_USER>",
                "MAINWP_APP_PASSWORD": "<MAINWP_APP_PASSWORD>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mainwp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@mainwp/mcp"
            ],
            "env": {
                "MAINWP_URL": "<MAINWP_URL>",
                "MAINWP_USER": "<MAINWP_USER>",
                "MAINWP_APP_PASSWORD": "<MAINWP_APP_PASSWORD>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MAINWP_URL=<MAINWP_URL> -e MAINWP_USER=<MAINWP_USER> -e MAINWP_APP_PASSWORD=<MAINWP_APP_PASSWORD> mainwp npx -y @mainwp/mcp
```
Replace <…> with your own values

## When to use it
- find sites with pending plugin updates
- check which child sites are disconnected
- apply overdue updates across a network
- prepare a report on a client's sites
- review site security across the network

## Example prompts
- Show me the sites with pending plugin updates.
- Find child sites that are currently disconnected.
- Prepare an update plan for my MainWP network.

## Similar
- [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
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24242
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7506

---
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
