Get the plugin
WP MCP/Docs/Cursor and WordPress

Cursor and WordPress · connection guide

WordPress MCP for Cursor: connect Cursor to your site.

Cursor can work on a WordPress site once the site runs an MCP server. WP MCP is a free WordPress plugin that adds one. Paste one JSON entry into Cursor and its agent can read and edit your content, blocks, menus and settings over HTTP, with a snapshot saved before every write.

Free and GPL-2.0 · self-hosted · snapshot before every write

Before you start

What you need.

  • A WordPress 6.9 or newer site on PHP 8.1 or newer, with the free WP MCP plugin installed and active.
  • A WordPress user for the agent with at least the edit_posts capability (Editor or Administrator). A dedicated user is easier to audit and revoke than your own account.
  • The WP MCP, Connection screen in wp-admin. It creates the application password and shows every snippet below already filled in for your site.

Connect

2 ways to connect Cursor to WordPress.

01 / Easiest

A .cursor/mcp.json entry

Signs in with a WordPress application password, sent as a Basic header.

  1. In wp-admin open WP MCP, Connection and create an application password. The screen shows the Cursor block with your site and credential filled in.
  2. Paste it into .cursor/mcp.json in the project, or ~/.cursor/mcp.json to make it available everywhere.
  3. Open Cursor's MCP settings and check that wpmcp is listed and enabled.

.cursor/mcp.json

{
  "mcpServers": {
    "wpmcp": {
      "type": "http",
      "url": "https://your-site.com/wp-json/mcp/wpmcp-server",
      "headers": {
        "Authorization": "Basic BASE64_OF_username:application-password"
      }
    }
  }
}

encode the credential

echo -n "your-username:xxxx xxxx xxxx xxxx xxxx xxxx" | base64

02 / Same endpoint

VS Code

The same application password; a different top-level key.

  1. VS Code reads a top-level servers key from .vscode/mcp.json, not mcpServers.
  2. The Connection screen shows the VS Code block ready to paste.

.vscode/mcp.json

{
  "servers": {
    "wpmcp": {
      "type": "http",
      "url": "https://your-site.com/wp-json/mcp/wpmcp-server",
      "headers": {
        "Authorization": "Basic BASE64_OF_username:application-password"
      }
    }
  }
}

Which client

What works best today, client by client.

The Claude clients are the most tested path and work on a default install with an application password. Clients that can only sign in with OAuth, ChatGPT among them, need OAuth switched on first: it ships off.

ClientHow it signs inSetup it needsHow well tested
Claude CodeApplication passwordOne command, or one .mcp.json entry. Works on a default install.Most tested, alongside Claude Desktop.
Claude DesktopApplication password (desktop bundle or config file). OAuth for the custom connector.Download the bundle from the Connection screen and enter the password. The custom connector needs OAuth switched on first.Most tested, alongside Claude Code.
CursorApplication passwordOne entry in .cursor/mcp.json. Works on a default install.Supported through the standard MCP config. Our own testing is done mostly with Claude clients.
ChatGPTOAuth only. It cannot send an application password.A site administrator switches OAuth on in wp-config.php (it ships off), then adds the site in ChatGPT as a custom MCP server.Works through OAuth once it is enabled. Not fully tested yet. A one-click switch is planned.

Check it

Verify the connection.

Ask the Cursor agent to call list-post-types or list-posts. A result means the connection works. On a 401 or 403, check the WordPress user's role and the Base64 credential.

If it does not work

Common snags.

The server shows as failed
Check the URL ends in /wp-json/mcp/wpmcp-server and that the site is reachable from your machine over HTTPS.
401 on every call
Rebuild the Base64 string from username:application-password, keeping the spaces in the password.
Too many tools in the list
WP MCP has a compact mode that exposes a small set of dispatch tools instead of the full list; the docs cover it.

Frequently asked

Cursor and WordPress: questions, answered.

Does Cursor work with WordPress?

Yes, through MCP. With WP MCP installed on the site, Cursor's agent calls tools that read and change WordPress content and settings directly.

Where does the WordPress MCP config go in Cursor?

In .cursor/mcp.json inside the project, or in ~/.cursor/mcp.json for every project. The entry holds the endpoint URL and a Basic Authorization header.

Is it safe to let Cursor write to a live site?

Every write goes through one engine that saves a snapshot first, so a change or a whole session can be restored in one click. Destructive tools are off until you opt in.

Does it work in VS Code too?

Yes. VS Code uses the same endpoint and header in .vscode/mcp.json under a top-level servers key.

Is it free?

The plugin is free and GPL, including the undo engine. WP MCP Pro adds deep page builder editing and unlimited history.

Connect Cursor to your WordPress site.