Skip to content

Your First Connection

import { Tabs, TabItem, Aside } from ‘@astrojs/starlight/components’;

Once you have an API key, add MCPWP as an MCP server in your AI client. The MCP endpoint is:

https://YOUR-SITE.com/wp-json/mcpwp/v1/mcp

API key auth is the working connect method today. Header-based clients (Claude Code, Cursor, Windsurf) keep the key out of the URL entirely — that’s the more secure shape. Claude Desktop’s “Add custom connector” flow is URL-only, so the key rides in a query parameter instead; see the security note on the Claude Desktop page.

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
"mcpServers": {
"my-site": {
"url": "https://YOUR-SITE.com/wp-json/mcpwp/v1/mcp",
"headers": {
"X-API-Key": "mcpwp_YOUR_KEY"
}
}
}
}

Restart Claude Desktop. The site tools appear automatically. This manual config-file method uses a header, so the key never appears in a URL — see Claude Desktop for the alternative “Add custom connector” (URL-only) method if you’d rather not edit a config file.

Terminal window
claude mcp add my-site \
--transport http \
--url "https://YOUR-SITE.com/wp-json/mcpwp/v1/mcp" \
--header "X-API-Key: mcpwp_YOUR_KEY"

In .cursor/mcp.json or .windsurf/mcp.json:

{
"mcpServers": {
"my-site": {
"url": "https://YOUR-SITE.com/wp-json/mcpwp/v1/mcp",
"headers": {
"X-API-Key": "mcpwp_YOUR_KEY"
}
}
}
}

Once connected, the first call for any client should be wp_introspect — it returns a machine-readable description of the site’s available tools and current capabilities. Follow it with wp_onboard for a full narrative briefing (content inventory, active integrations, site health).

Or just ask your AI agent:

“What pages are on my WordPress site?”

→ See Claude Desktop setup for a full walkthrough.