AI Skill Hub 推荐使用:区块级MCP工具 是一款优质的MCP工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
区块级MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
区块级MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/GravityKit/block-mcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"---mcp--": {
"command": "npx",
"args": ["-y", "block-mcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 区块级MCP工具 执行以下任务... Claude: [自动调用 区块级MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"___mcp__": {
"command": "npx",
"args": ["-y", "block-mcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Block MCP is the WordPress MCP built for the way agents actually edit — one block at a time, across multiple turns, without corrupting the page. It's an MCP server plus WordPress plugin that exposes Gutenberg content as a structured, addressable block tree instead of raw HTML, so an agent can change a single heading without rewriting the page. Every block carries a stable gk_ref UUID that survives sibling shifts (no other WordPress MCP has this), so multi-turn edit chains don't re-fetch the page between calls. Every write creates a WordPress revision for rollback, ETag/If-Match guards against concurrent overwrites, and a server-side tier policy stops legacy blocks from ever hitting disk. Backed by 326 PHP tests, 249 TypeScript tests, CI on PHP 8.2/8.3 + Node 20, and translations to 20 languages.
Read - Full block tree as structured JSON: paths, names, attributes, refs, text_preview of each block's content - Page summary in one call: block type counts, headings with paths, section markers, max nesting depth - Outline mode for fast page structure inspection - Search blocks by text or block name - Render mode expands shortcodes, resolves synced patterns, marks dynamic blocks
Write — by index, by ref, or by path - update_block — flat-index OR ref - update_blocks — atomic N-update batch in ONE revision; all-or-nothing validation, max 50 items, counts as one write against the rate limit - delete_block — top-level counter OR ref - insert_blocks — anchor on after_top_level/before_top_level OR after_ref/before_ref - edit_block_tree — 9 path-based or ref-based structural ops: - update-attrs, update-html, replace-block, remove-block - wrap-in-group, unwrap-group, insert-child, duplicate, move - rewrite_post_blocks — full page rewrite - dry_run parameter to validate any mutation without writing
Safety - Auto-transform keeps innerHTML in sync when attributes change (heading level, list ordered, group tagName, button URL, image src, spacer height, etc.) - Static block guards warn when an attribute change may leave rendered markup stale - Configurable preference tiers: legacy blocks rejected on insert, avoid-tier blocks return warnings with suggested replacements - Per-post rate limiting (10 writes/min, 2 full rewrites/min) - Every write creates a WordPress revision; revert_to_revision undoes any edit
Discover - List block types filtered by namespace, category, or preference tier - Browse patterns (synced + registered) scored by recency, reference count, and legacy content - Site-wide block/pattern usage analytics (cached) - Resolve any URL or slug to its post ID, type, and edit link
Easiest — download the latest ZIP: gk-block-mcp.zip (auto-built from main on every push).
Then in WordPress: Plugins → Add New → Upload Plugin and pick the ZIP.
Or copy wordpress-plugin/gk-block-mcp/ to your site's wp-content/plugins/ and activate manually. Or via WP-CLI:
wp plugin install https://github.com/GravityKit/block-mcp/releases/download/latest/gk-block-mcp.zip --activate
Prefer to wire it up by hand? Create an Application Password and register the server yourself.
In WordPress admin: Users → Profile → Application Passwords. Or via CLI:
wp user application-password create <username> "Block MCP" --porcelain
Read endpoints require the edit_posts capability; write endpoints require edit_post on the specific post being changed. Then build and register the server:
git clone https://github.com/GravityKit/block-mcp
cd block-mcp
npm install # auto-builds dist/index.cjs via the prepare script
Register the server in your MCP client. Example for Claude Code's ~/.claude.json:
{
"mcpServers": {
"block-mcp": {
"command": "node",
"args": ["/absolute/path/to/block-mcp/dist/index.cjs"],
"env": {
"WORDPRESS_URL": "https://example.com",
"WORDPRESS_USER": "your-wp-username",
"WORDPRESS_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
}
}
}
}
Restart your MCP client. Run npm run inspect to test the tools interactively.
Update a heading by URL
"Change the H2 'Welcome' on /about/ to 'About Us'."
resolve_url({ url: "/about/" }) → post IDget_page_blocks({ post_id, outline: true }) → finds heading at path: [4], ref blk_a3f2c1q9edit_block_tree({ post_id, op: "update-attrs", ref: "blk_a3f2c1q9", attributes: { content: "About Us" } })Auto-transform updates both the content attribute and the inner <h2> text. Revision created.
Chained edit workflow (where refs shine)
"On the homepage: delete the third paragraph, change the next H2 to H3, and add a CTA button after it."
get_page_blocks({ post_id }) once — capture refs for all three target blocksdelete_block({ post_id, ref: <para-ref> })edit_block_tree({ post_id, op: "update-attrs", ref: <heading-ref>, attributes: { level: 3 } })insert_blocks({ post_id, after_ref: <heading-ref>, blocks: [{ name: "core/buttons", … }] })With path-based addressing, the agent would need to re-fetch between every step. With refs, one read covers the whole chain.
Author and publish a doc
list_terms({ taxonomy: "category", search: "Documentation" }) → category IDcreate_post({ title: "Getting Started", status: "draft", categories: [<id>], blocks: [...] }) → post IDupload_media({ path: "/tmp/screenshot.png", alt_text: "...", post_id }) → attachment ID + URLinsert_blocks({ post_id, after_top_level: 0, blocks: [{ name: "core/image", attributes: { id: <atch>, url, alt: "..." } }] })yoast_update_seo({ post_id, title: "...", description: "...", focus_keyword: "..." })update_post({ post_id, status: "publish" })When the plugin is active, an admin page appears at Settings → Block MCP. The defaults work out of the box, but it's worth a look — this is where you decide which blocks AI agents are allowed to write, what to suggest as replacements, and which post types create_post can target.

See the Configuration section below for the full breakdown.
Everything in this section is editable at Settings → Block MCP in WordPress admin. Defaults are sensible — none of this is required to get started.
The WordPress MCP space is small, and Block MCP is the only one operating at the block-tree layer. The other projects work at different layers and target different workflows — they're often complementary rather than head-to-head, but the agent-loop bench above shows they don't all produce correct results when asked to edit a block.
InstaWP/mcp-wp — A REST-API-wrapping MCP that operates on whole posts, plus broad coverage of users, comments, media, plugins, and plugin-repo search. Standout feature: multi-site management from one MCP instance. Reach for it when you need post-level CRUD across many sites or general-purpose WordPress administration. Not block-aware: editing a single heading inside a long page means reading and rewriting the entire post, and the round-trip through wp/v2's update_page strips every `` block marker. In our bench it failed validation on 7 of 9 trials across Haiku/Sonnet/Opus.
AI Engine Pro — Self-hosted MCP server inside WordPress (Streamable HTTP at /wp-json/mcp/v1/http), built by Meow Apps and the most-installed WordPress AI plugin (100K+). Free tier exposes posts/comments/users/media as MCP tools; Pro adds an Editor Assistant sidebar and additional MCP plumbing. Its wp_alter_post tool is block-aware — block-comment markers survive — but it can desync the block's declared attributes from its innerHTML (e.g., comment marker still says level: 2 while the inner tag is <h3>), and the block editor flags that as broken too. Sonnet and Opus retry until consistent and pass; Haiku sometimes gives up at 7–12 tool calls. 8 of 9 in the bench.
Block MCP (this project) — Operates one layer below: inside a single post's block tree. Path- and ref-based addressing, auto-transforms that keep attributes and innerHTML in sync server-side, preference-tier enforcement, per-block revisions. None of those exist in the other three. Reach for it when an agent needs to edit blocks — change a heading level, swap a column layout, insert a CTA after the third paragraph — without rewriting the surrounding content. 9 of 9 in the bench, perfect across all three Claude models, including the cheapest.
These can coexist. Block MCP could (and likely will) be exposed through the official adapter as registered abilities once that path matures — same logic, blessed plumbing. See issues for the roadmap.
高质量的开源MCP工具,提供WordPress区块级CRUD操作
该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。
总体来看,区块级MCP工具 是一款质量良好的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | block-mcp |
| 原始描述 | 开源MCP工具:WordPress block-level CRUD MCP server — path-based mutations, safety guards, pre。⭐27 · JavaScript |
| Topics | mcpjavascriptwordpress |
| GitHub | https://github.com/GravityKit/block-mcp |
| License | NOASSERTION |
| 语言 | JavaScript |
收录时间:2026-06-09 · 更新时间:2026-06-09 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端