W

Wp Headless MCP

by aj-ua · io.github.aj-ua/wp-headless-mcp

Enables AI assistants to read a WordPress site's posts, pages, custom post types, ACF fields, and Yoast SEO data, and to safely create or update content as drafts through permission-scoped public, editor, and dev profiles. It works over stdio or HTTP against any WordPress site exposing the REST API, returning Markdown with source URLs, SEO audits, and developer tools such as content models, ACF schemas, and TypeScript type generation.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

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

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-aj-ua-wp-headless-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "wp-headless-mcp"
      ],
      "env": {
        "WP_URL": "<VALUE>",
        "MCP_PROFILE": "public",
        "WP_USER": "<VALUE>",
        "WP_APP_PASSWORD": "<YOUR_VALUE>",
        "WP_CACHE_TTL": "60",
        "ACF_JSON_PATH": "<VALUE>",
        "MCP_CPTS": "auto",
        "MCP_HTTP_HOST": "127.0.0.1",
        "MCP_HTTP_PORT": "3333",
        "MCP_TRANSPORT": "stdio",
        "MCP_HTTP_TOKEN": "<VALUE>",
        "MCP_HTTP_SESSIONS": "false",
        "MCP_HTTP_ALLOWED_ORIGINS": "<VALUE>",
        "MCP_HTTP_SESSION_IDLE_MINUTES": "30"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-aj-ua-wp-headless-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "wp-headless-mcp"
      ],
      "env": {
        "WP_URL": "<VALUE>",
        "MCP_PROFILE": "public",
        "WP_USER": "<VALUE>",
        "WP_APP_PASSWORD": "<YOUR_VALUE>",
        "WP_CACHE_TTL": "60",
        "ACF_JSON_PATH": "<VALUE>",
        "MCP_CPTS": "auto",
        "MCP_HTTP_HOST": "127.0.0.1",
        "MCP_HTTP_PORT": "3333",
        "MCP_TRANSPORT": "stdio",
        "MCP_HTTP_TOKEN": "<VALUE>",
        "MCP_HTTP_SESSIONS": "false",
        "MCP_HTTP_ALLOWED_ORIGINS": "<VALUE>",
        "MCP_HTTP_SESSION_IDLE_MINUTES": "30"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-aj-ua-wp-headless-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "wp-headless-mcp"
      ],
      "env": {
        "WP_URL": "<VALUE>",
        "MCP_PROFILE": "public",
        "WP_USER": "<VALUE>",
        "WP_APP_PASSWORD": "<YOUR_VALUE>",
        "WP_CACHE_TTL": "60",
        "ACF_JSON_PATH": "<VALUE>",
        "MCP_CPTS": "auto",
        "MCP_HTTP_HOST": "127.0.0.1",
        "MCP_HTTP_PORT": "3333",
        "MCP_TRANSPORT": "stdio",
        "MCP_HTTP_TOKEN": "<VALUE>",
        "MCP_HTTP_SESSIONS": "false",
        "MCP_HTTP_ALLOWED_ORIGINS": "<VALUE>",
        "MCP_HTTP_SESSION_IDLE_MINUTES": "30"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-aj-ua-wp-headless-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "wp-headless-mcp"
      ],
      "env": {
        "WP_URL": "<VALUE>",
        "MCP_PROFILE": "public",
        "WP_USER": "<VALUE>",
        "WP_APP_PASSWORD": "<YOUR_VALUE>",
        "WP_CACHE_TTL": "60",
        "ACF_JSON_PATH": "<VALUE>",
        "MCP_CPTS": "auto",
        "MCP_HTTP_HOST": "127.0.0.1",
        "MCP_HTTP_PORT": "3333",
        "MCP_TRANSPORT": "stdio",
        "MCP_HTTP_TOKEN": "<VALUE>",
        "MCP_HTTP_SESSIONS": "false",
        "MCP_HTTP_ALLOWED_ORIGINS": "<VALUE>",
        "MCP_HTTP_SESSION_IDLE_MINUTES": "30"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-aj-ua-wp-headless-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "wp-headless-mcp"
      ],
      "env": {
        "WP_URL": "<VALUE>",
        "MCP_PROFILE": "public",
        "WP_USER": "<VALUE>",
        "WP_APP_PASSWORD": "<YOUR_VALUE>",
        "WP_CACHE_TTL": "60",
        "ACF_JSON_PATH": "<VALUE>",
        "MCP_CPTS": "auto",
        "MCP_HTTP_HOST": "127.0.0.1",
        "MCP_HTTP_PORT": "3333",
        "MCP_TRANSPORT": "stdio",
        "MCP_HTTP_TOKEN": "<VALUE>",
        "MCP_HTTP_SESSIONS": "false",
        "MCP_HTTP_ALLOWED_ORIGINS": "<VALUE>",
        "MCP_HTTP_SESSION_IDLE_MINUTES": "30"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-aj-ua-wp-headless-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "wp-headless-mcp"
      ],
      "env": {
        "WP_URL": "<VALUE>",
        "MCP_PROFILE": "public",
        "WP_USER": "<VALUE>",
        "WP_APP_PASSWORD": "<YOUR_VALUE>",
        "WP_CACHE_TTL": "60",
        "ACF_JSON_PATH": "<VALUE>",
        "MCP_CPTS": "auto",
        "MCP_HTTP_HOST": "127.0.0.1",
        "MCP_HTTP_PORT": "3333",
        "MCP_TRANSPORT": "stdio",
        "MCP_HTTP_TOKEN": "<VALUE>",
        "MCP_HTTP_SESSIONS": "false",
        "MCP_HTTP_ALLOWED_ORIGINS": "<VALUE>",
        "MCP_HTTP_SESSION_IDLE_MINUTES": "30"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
WP_URL Yes Site base URL, for example http://aj-ua.local
MCP_PROFILE No Access profile: public, editor, or dev Default: public
WP_USER No Application Password user (editor and dev profiles)
WP_APP_PASSWORD secret No Application Password (editor and dev profiles)
WP_CACHE_TTL No Seconds to cache GET requests; 0 turns caching off Default: 60
ACF_JSON_PATH No Path to the theme's acf-json folder, for ACF labels, schemas, and TypeScript types
MCP_CPTS No Custom post type tools: auto, none, or JSON such as [{"postType":"project","singular":"project","plural":"projects"}] Default: auto
MCP_HTTP_HOST No HTTP bind address; use 0.0.0.0 only behind an HTTPS reverse proxy Default: 127.0.0.1
MCP_HTTP_PORT No HTTP port Default: 3333
MCP_TRANSPORT No stdio for local clients, http for remote clients Default: stdio
MCP_HTTP_TOKEN No Bearer token for HTTP mode, at least 32 characters
MCP_HTTP_SESSIONS No true keeps one session per client; default is stateless Default: false
MCP_HTTP_ALLOWED_ORIGINS No Comma-separated browser origins allowed by CORS; empty means server-to-server only
MCP_HTTP_SESSION_IDLE_MINUTES No Idle session timeout Default: 30

Similar servers