ItchWPMCP
Local MCP server for Codex/Claude to query and edit WordPress content through the WordPress REST API.
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
-
Create a WordPress application password:
WordPress Admin -> Users -> Profile -> Application Passwords -
Copy
.env.exampleto.envand 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 -
Install dependencies:
npm install -
Run the server:
npm startIf Node cannot verify your site's certificate chain, set
NODE_OPTIONS=--use-system-cain 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
- Copy this
ItchWPMCPfolder to their machine or publish it as a private/public repo. - Run
npm installinside the folder. - Create a
.envfile from.env.example. - In their WordPress admin, create an Application Password:
Users -> Profile -> Application Passwords - Put their site URL, username, and app password in
.env. - 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_requestonly allows paths under/wp-json/.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。