WordPress Headless
v1.0.0Read WordPress content, ACF fields, and Yoast SEO data, and safely edit drafts.
Values you need
| Variable | What it is | |
|---|---|---|
WP_URL | required | Base URL of the WordPress site, without a trailing slash |
MCP_PROFILE | optional | Tool profile: public (read published content), editor (adds draft-only editing), or dev (adds developer tools) Default: public |
WP_USER | optional | WordPress user for the Application Password (editor and dev profiles) |
WP_APP_PASSWORD | optional secret | WordPress Application Password (editor and dev profiles) |
WP_CACHE_TTL | optional | Seconds to cache GET requests; 0 turns caching off Default: 60 |
ACF_JSON_PATH | optional | Absolute path to the theme's acf-json folder, for ACF labels, schemas, and TypeScript types |
MCP_CPTS | optional | Custom post type tools: auto, none, or a JSON array of {postType, singular, plural} Default: auto |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add wp-headless-mcp -e 'WP_URL=<WP_URL>' -- npx -y wp-headless-mcp@1.0.0Add to
claude_desktop_config.json{
"mcpServers": {
"wp-headless-mcp": {
"args": [
"-y",
"wp-headless-mcp@1.0.0"
],
"command": "npx",
"env": {
"WP_URL": "<WP_URL>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"wp-headless-mcp": {
"args": [
"-y",
"wp-headless-mcp@1.0.0"
],
"command": "npx",
"env": {
"WP_URL": "<WP_URL>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "WP_URL",
"id": "wp-url",
"password": true,
"type": "promptString"
}
],
"servers": {
"wp-headless-mcp": {
"args": [
"-y",
"wp-headless-mcp@1.0.0"
],
"command": "npx",
"env": {
"WP_URL": "${input:wp-url}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.wp-headless-mcp]
command = "npx"
args = ["-y", "wp-headless-mcp@1.0.0"]
env = { "WP_URL" = "<WP_URL>" }For AI agents
- Ask the user for: WP_URL. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: search_content, list_post_types, get_post, list_posts, list_terms, get_acf_fields, get_company_info.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json