WordPress Headless

v1.0.0
io.github.aj-ua/wp-headless-mcp Checked 2 days ago Published 24 days ago

Read WordPress content, ACF fields, and Yoast SEO data, and safely edit drafts.

Values you need

VariableWhat it is
WP_URLrequired Base URL of the WordPress site, without a trailing slash
MCP_PROFILEoptional Tool profile: public (read published content), editor (adds draft-only editing), or dev (adds developer tools) Default: public
WP_USERoptional WordPress user for the Application Password (editor and dev profiles)
WP_APP_PASSWORDoptional secret WordPress Application Password (editor and dev profiles)
WP_CACHE_TTLoptional Seconds to cache GET requests; 0 turns caching off Default: 60
ACF_JSON_PATHoptional Absolute path to the theme's acf-json folder, for ACF labels, schemas, and TypeScript types
MCP_CPTSoptional 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.0
Add 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

  1. Ask the user for: WP_URL. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. 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).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: search_content, list_post_types, get_post, list_posts, list_terms, get_acf_fields, get_company_info.
  5. 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