Skip to content

Claude Code

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"

This saves the config to your project’s .claude/mcp.json. The server is available in all Claude Code sessions in that directory.

Header auth (--header) is the working connect method today and the more secure one — the key lives in a request header, never in the URL, so it won’t show up in shell history from the URL alone, in connector-settings screens, or in URL-based logs. Prefer this over URL-embedded keys whenever the client supports it.

Terminal window
claude mcp list

For a project-scoped setup, add .claude/mcp.json to your repo:

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

Add the key to .env and reference it via an environment variable if you need to avoid committing secrets.

Start each session with wp_introspect (machine-readable capabilities), then wp_onboard (full site briefing) before making any changes.