ItchWPMCP

ItchWPMCP

Local MCP server for Codex/Claude to query and edit WordPress content through the WordPress REST API.

Category
Visit Server

README

ItchWPMCP

Local MCP server for Codex/Claude to query and edit WordPress content through the WordPress REST API.

It can be used with any WordPress site that has the REST API enabled and supports Application Password authentication.

Setup

  1. Create a WordPress application password: WordPress Admin -> Users -> Profile -> Application Passwords

  2. Copy .env.example to .env and fill in:

    WP_BASE_URL=https://your-wordpress-site.example
    WP_USERNAME=your-wordpress-username
    WP_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx
    WP_ALLOW_PRODUCTION_WRITES=false
    
  3. Install dependencies:

    npm install
    
  4. Run the server:

    npm start
    

    If Node cannot verify your site's certificate chain, set NODE_OPTIONS=--use-system-ca in your MCP client environment.

Tools

  • wordpress_list_pages: list WordPress pages.
  • wordpress_get_page: get a page by ID.
  • wordpress_create_page: create a page, defaulting to draft status.
  • wordpress_clone_page: clone an existing page into a new draft page.
  • wordpress_update_page: update title, content, excerpt, slug, status, parent, or menu order.
  • wordpress_update_page_status: update only a page status.
  • wordpress_delete_page: trash or delete a page with confirmation.
  • wordpress_list_posts: list WordPress posts.
  • wordpress_get_post: get a post by ID.
  • wordpress_create_post: create a post, defaulting to draft status.
  • wordpress_update_post: update a post.
  • wordpress_delete_post: trash or delete a post with confirmation.
  • wordpress_list_media: list media library items.
  • wordpress_upload_media: upload a local file to the media library.
  • wordpress_list_categories: list post categories.
  • wordpress_create_category: create a post category.
  • wordpress_list_tags: list post tags.
  • wordpress_create_tag: create a post tag.
  • wordpress_list_plugins: list plugins if the authenticated user has permission.
  • wordpress_update_plugin_status: activate or deactivate an installed plugin.
  • wordpress_get_settings: read general site settings.
  • wordpress_update_settings: update selected general site settings.
  • wordpress_list_users: list users if the authenticated user has permission.
  • wordpress_list_menus: list menus if the REST endpoint is available.
  • wordpress_list_menu_items: list menu items if the REST endpoint is available.
  • wordpress_rest_request: advanced REST API escape hatch.

Write tools are enabled on staging URLs. If WP_BASE_URL is changed to production, writes are blocked unless WP_ALLOW_PRODUCTION_WRITES=true is set in .env.

Use Another WordPress Site

Create an Application Password in that WordPress site's admin, then update .env:

WP_BASE_URL=https://another-wordpress-site.example
WP_USERNAME=your-wordpress-username
WP_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx
WP_ALLOW_PRODUCTION_WRITES=false

Keep WP_ALLOW_PRODUCTION_WRITES=false until you intentionally want write tools enabled on a production URL.

Port It For Another Person

  1. Copy this ItchWPMCP folder to their machine or publish it as a private/public repo.
  2. Run npm install inside the folder.
  3. Create a .env file from .env.example.
  4. In their WordPress admin, create an Application Password: Users -> Profile -> Application Passwords
  5. Put their site URL, username, and app password in .env.
  6. Register the MCP server in their MCP client.

Do not commit .env files. Application Passwords should stay local to each user/site.

Codex Config

Add this to ~/.codex/config.toml:

[mcp_servers.itch_wp_mcp]
command = "node"
args = ["<absolute-path-to-ItchWPMCP>/src/server.js"]
enabled = true
startup_timeout_sec = 20
tool_timeout_sec = 60

[mcp_servers.itch_wp_mcp.env]
WP_BASE_URL = "https://your-wordpress-site.example"
WP_USERNAME = "your-wordpress-username"
WP_APP_PASSWORD = "xxxx xxxx xxxx xxxx xxxx xxxx"
WP_ALLOW_PRODUCTION_WRITES = "false"
NODE_OPTIONS = "--use-system-ca"

If your MCP client cannot find node, set command to the absolute path of your Node executable. For example:

command = "<absolute-path-to-node>"

Claude Desktop Config

Add this to Claude Desktop's claude_desktop_config.json under mcpServers:

{
  "mcpServers": {
    "itch_wp_mcp": {
      "command": "node",
      "args": [
        "<absolute-path-to-ItchWPMCP>/src/server.js"
      ],
      "env": {
        "WP_BASE_URL": "https://your-wordpress-site.example",
        "WP_USERNAME": "your-wordpress-username",
        "WP_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx",
        "WP_ALLOW_PRODUCTION_WRITES": "false",
        "NODE_OPTIONS": "--use-system-ca"
      }
    }
  }
}

Restart Claude Desktop after changing the config.

Multi-Site Setup

You do not need a separate copy of ItchWPMCP for every WordPress website. Keep one codebase and register multiple MCP servers, each with different environment variables.

Codex Multi-Site Example

[mcp_servers.wp_site_staging]
command = "node"
args = ["<absolute-path-to-ItchWPMCP>/src/server.js"]
enabled = true
startup_timeout_sec = 20
tool_timeout_sec = 60

[mcp_servers.wp_site_staging.env]
WP_BASE_URL = "https://staging.example.com"
WP_USERNAME = "site-admin"
WP_APP_PASSWORD = "xxxx xxxx xxxx xxxx xxxx xxxx"
WP_ALLOW_PRODUCTION_WRITES = "false"
NODE_OPTIONS = "--use-system-ca"

[mcp_servers.wp_client_site]
command = "node"
args = ["<absolute-path-to-ItchWPMCP>/src/server.js"]
enabled = true
startup_timeout_sec = 20
tool_timeout_sec = 60

[mcp_servers.wp_client_site.env]
WP_BASE_URL = "https://client-site.example"
WP_USERNAME = "client-admin"
WP_APP_PASSWORD = "xxxx xxxx xxxx xxxx xxxx xxxx"
WP_ALLOW_PRODUCTION_WRITES = "false"
NODE_OPTIONS = "--use-system-ca"

Claude Multi-Site Example

{
  "mcpServers": {
    "wp_site_staging": {
      "command": "node",
      "args": ["<absolute-path-to-ItchWPMCP>/src/server.js"],
      "env": {
        "WP_BASE_URL": "https://staging.example.com",
        "WP_USERNAME": "site-admin",
        "WP_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx",
        "WP_ALLOW_PRODUCTION_WRITES": "false",
        "NODE_OPTIONS": "--use-system-ca"
      }
    },
    "wp_client_site": {
      "command": "node",
      "args": ["<absolute-path-to-ItchWPMCP>/src/server.js"],
      "env": {
        "WP_BASE_URL": "https://client-site.example",
        "WP_USERNAME": "client-admin",
        "WP_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx",
        "WP_ALLOW_PRODUCTION_WRITES": "false",
        "NODE_OPTIONS": "--use-system-ca"
      }
    }
  }
}

The .env file is now only a local fallback. Per-site MCP environment variables take precedence when provided by Codex or Claude.

Safety Model

  • New pages/posts default to draft.
  • Destructive tools require confirmDelete=true.
  • Non-staging writes are blocked unless WP_ALLOW_PRODUCTION_WRITES=true.
  • wordpress_rest_request only allows paths under /wp-json/.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured