PW

pluginslab/wp-blockmarkup-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

40 stars 5 forks 品質 73 トレンド 16MIT

wp-blockmarkup-mcp は、WordPress コア、WooCommerce、または使用するブロックベースのプラグインから、すべての Gutenberg ブロックを抽出、検証、インデックスするローカル MCP サーバーです.

概要

wp-blockmarkup-mcp は、WordPress コア、WooCommerce、または使用するブロックベースのプラグインから、すべての Gutenberg ブロックを抽出、検証、インデックスするローカル MCP サーバーです。 ClaudeコードのようなAIツールは、ブロックスキーマ、属性、および検証済みのマークアップ例の検証済みデータベースをクエリに提供します。代わりに、ブロック構造を幻覚し、属性を発明し、エディタで「Attempt Block Recovery」をトリガーするマークアップを生成します。 121 コア Gutenberg ブロックのインデックス — 静的ブロックのマークアップ例の 100% は、構造的および機能的な検証の両方を渡します。 AI アシスタントは、WordPress コンテンツをプログラム的に生成するためにますます使われています。REST API 経由でページを構築し、プラットフォーム間でコンテンツを移行し、ヘッドレス フロントエンドをポップアップします。 しかし、すべてのAIモデルは同じ盲点を共有します.

概要(AI 翻訳)

AIアシスタントに検証されたブロックマークアップデータベースを組み込むと、Gutenberg HTMLを推測できます。

wp-blockmarkup-mcp は、WordPress コア、WooCommerce、または使用するブロックベースのプラグインから、すべての Gutenberg ブロックを抽出、検証、インデックスするローカル MCP サーバーです。 ClaudeコードのようなAIツールは、ブロックスキーマ、属性、および検証済みのマークアップ例の検証済みデータベースをクエリに提供します。代わりに、ブロック構造を幻覚し、属性を発明し、エディタで「Attempt Block Recovery」をトリガーするマークアップを生成します。

現行の検証結果: 121コアグテンベルクブロックインデックス — 静的ブロックマークアップ例の100%は、構造的および機能的検証の両方を通過します。

なぜこの例

AI アシスタントは、WordPress コンテンツをプログラム的に生成するためにますます使われています。REST API 経由でページを構築し、プラットフォーム間でコンテンツを移行し、ヘッドレス フロントエンドをポップアップします。 しかし、すべてのAIモデルは同じブラインドスポットを共有します。ブロックマークアップは、実際のブロックソースコードからではなく、トレーニングデータから来ています。

つまり:

  • [["large"]のような文字列のスラグを期待する数字として、 — [[fontSize]が存在しないモデルの発明属性

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

wp-blockmarkup-mcp

Give your AI assistant a verified block markup database instead of letting it guess Gutenberg HTML.

wp-blockmarkup-mcp is a local MCP server that extracts, validates, and indexes every Gutenberg block from WordPress core, WooCommerce, or any block-based plugin you work with. It gives AI tools like Claude Code a verified database of block schemas, attributes, and validated markup examples to query — instead of relying on training data that hallucinates block structures, invents attributes, and produces markup that triggers “Attempt Block Recovery” in the editor.

Current validation results: 121 core Gutenberg blocks indexed — 100% of static block markup examples pass both structural and save-function validation.

Why This Exists

AI assistants are increasingly used to generate WordPress content programmatically — building pages via the REST API, migrating content between platforms, populating headless frontends. But every AI model shares the same blind spot: block markup comes from training data, not from the actual block source code.

This means:

  • Models invent attributes that don’t exist — fontSize as a number when it expects a string slug like "large"
  • Class naming patterns are wrong — has-background-color-vivid-red instead of has-vivid-red-background-color
  • Block nesting rules are ignored — putting blocks inside containers that don’t support InnerBlocks
  • Dynamic blocks get static markup — generating HTML for blocks that only accept comment delimiters with attributes
  • Third-party blocks are invisible — WooCommerce blocks, Kadence blocks, ACF blocks are all unknown to training data
  • Subtle mismatches break silently — the markup looks right but the editor flags it as invalid, requiring manual recovery

You only discover these problems when content lands in the editor and every block shows a yellow warning bar. In an agentic workflow where the AI generates and pushes content autonomously, bad markup means broken pages.

The Solution

Feed the AI real block data. Instead of hoping the model remembers the right markup format, give it a verified database to query and validate against.

wp-blockmarkup-mcp parses the actual source code of any block-based plugin, extracts every block’s schema, and validates generated markup through a two-tier pipeline — first using the official WordPress block parser for structural correctness, then verifying HTML output patterns against the block’s save() function AST. Your AI assistant queries this database before generating content, and can validate its output before pushing it.

This fits naturally into content generation workflows. When Claude Code (or any MCP-compatible assistant) needs to generate Gutenberg block markup, it:

GitHub で README 全文を見る

インストール

npx wp-blockmarkup-mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "wp-blockmarkup": { "command": "npx", "args": ["wp-blockmarkup-mcp"] } } }