mcp-wordpress
MCP server for WordPress REST API. Lets Claude Code read, edit, and manage WordPress pages, posts, shortcodes, and media — all from the CLI.
Works with any WordPress site, any theme, any set of plugins.
Power your agent
การติดตั้งจากผู้เผยแพร่ ไม่ใช่เอนด์พอยต์ของ PlugMCP
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
MCP server for WordPress REST API. Lets Claude Code read, edit, and manage WordPress pages, posts, shortcodes, and media — all from the CLI.
Works with any WordPress site, any theme, any set of plugins.
MCP server for WordPress REST API — manage pages, posts, shortcodes and Elementor content from Claude Code.
npx @leonardobora/mcp-wordpress
# or clone and run locally:
git clone https://github.com/leonardobora/mcp-wordpress.git
cd mcp-wordpress && npm install
Add a .mcp.json to the root of your project:
{
"mcpServers": {
"wordpress": {
"command": "npx",
"args": ["-y", "@leonardobora/mcp-wordpress"],
"env": {
"WP_SITE_URL": "https://your-site.com",
"WP_USERNAME": "your-username",
"WP_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
}
}
}
}
Or if running from a local clone:
{
"mcpServers": {
"wordpress": {
"command": "node",
"args": ["path/to/mcp-wordpress/src/server.js"],
"env": {
"WP_SITE_URL": "https://your-site.com",
"WP_USERNAME": "your-username",
"WP_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
}
}
}
}
Copy examples/mcp-wordpress-flush-cache.php to your WordPress wp-content/mu-plugins/ directory. This enables the wp_flush_cache tool.
If your site already has a custom cache flush endpoint, set the WP_FLUSH_ENDPOINT env var:
"env": {
"WP_FLUSH_ENDPOINT": "my-plugin/v1/flush-cache"
}
Once registered, Claude Code can:
> List all pages on the site
> Show me the shortcodes on the Home page
> Replace the hero title on the About page to "Our Story"
> Insert a testimonials section after the feature cards on the Home page
> What images do we have in the media library?
> Flush the cache for page #275
The server connects to the WordPress REST API using Basic Auth (Application Passwords). It exposes MCP tools that Claude Code can call to read and modify content.
For shortcode operations, the server includes a custom parser (shortcode-utils.js) that understands WordPress shortcode syntax — [tag attr="value"] and [tag]content[/tag] — enabling surgical find-and-replace without touching surrounding content.
The news-portal recipe in src/portal/home.js generates canonical Gutenberg sections for breaking news, category grids, latest posts, popularity, and up to three sponsors, plus an ordered sidebar recipe. Its Docker integration test applies the recipe through the registered MCP tools and verifies the resulting public HTML. Popularity is explicit: comments mode is labelled “Em alta por comentários”; “Mais vistas” requires a real view-provider shortcode.
Elementor _elementor_data is protected post meta and cannot be safely read or written through the core posts REST controller. The compatibility tools therefore fail explicitly instead of reporting false success.
All supported mutations accept dry_run:true. Set WP_MCP_DRY_RUN=1 to force previews globally. Set WP_MCP_CONFIRM_DESTRUCTIVE=1 to require a matching dry-run immediately before any permanent (force:true) deletion.
.env or Application Passwords to version controledit_post for that page; an explicit site-wide flush requires edit_pagesRun unit, type, lint, and offline MCP smoke checks:
npm test
npm run typecheck
npm run lint
npm run test:smoke
Run the isolated WordPress 6.8 + Blocksy integration suite with Docker:
npm run integration:up
WP_MCP_IT=1 npm run test:integration
npm run integration:down
The integration environment uses only project-scoped containers and named volumes. integration:down removes those test volumes.
Recent work brought the server from a single-file shortcode/Elementor tool to an 80-tool modular MCP server with a real WordPress test loop:
src/tools/*.js) behind a shared registry (src/registry.js), and added opt-in dry_run previews plus the WP_MCP_DRY_RUN / WP_MCP_CONFIRM_DESTRUCTIVE env-var safeguards for destructive calls.wp_ensure_category/wp_ensure_tag.wp_list_media, wp_upload_media, wp_update_media, wp_delete_media, wp_set_featured_image).test/integration/) that provisions a real WordPress 6.8 + Blocksy site and runs end-to-end tests against it (WP_MCP_IT=1 npm run test:integration), wired into CI.src/portal/home.js) that assembles canonical Gutenberg sections for breaking news, category grids, latest posts, popularity, and sponsors.src/blocks/ad.js) with a full_width option for edge-to-edge placements.The expansion from a 14-tool server to the current 80-tool modular MCP server was authored by André Escocard (andreescocard) and merged in PR #1: tool registry, dry-run and destructive-operation safeguards, content/media/taxonomy tools, Gutenberg blocks, menus, widgets, revisions, patterns, settings, the Blocksy companion endpoints, the Docker WordPress integration suite, and CI/lint/typecheck coverage.
MIT
MCP server for WordPress REST API — manage pages, posts, shortcodes and Elementor content from Claude Code.
เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
MCP Wordpress ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-10-28 MCP server for WordPress REST API — manage pages, posts, shortcodes and Elementor content from Claude Code.