BRANDON HUBBARD // ENGINEERING PORTAL RUST + OXC_PARSER + MCP
RUST · WORDPRESS GUTENBERG & MCP

wp-blockmarkup-mcp — Rust Gutenberg Block Markup Parser, Validator & MCP Server

wp-blockmarkup-mcp is a zero-copy Rust parser, linter, and Model Context Protocol (MCP) server that eliminates ”Attempt Block Recovery” errors when AI agents generate WordPress Gutenberg blocks. It validates HTML comment attribute JSON against innerHTML markup and auto-heals serialization mismatches in microseconds.

$ cargo install wp-blockmarkup-mcp
GitHub ↗
01 // Interactive Gutenberg Block Grammar & Tier-2 Save Validator
Validation Status
VERIFIED
Total Blocks
3
Max Nesting Depth
2
Issues / Warnings
0
02 // Canonical Block Markup Generator (src/utils/markup_generator.rs)
TIER 1 // BLOCK GRAMMAR + PRESET LINTER

Parses <!-- wp:namespace/name {...} --> delimiters, detects stray freeform HTML outside blocks, and verifies var:preset|group|camelSlug converts to --wp--preset--group--camel-slug.

TIER 2 // OXC_PARSER SAVE.JS VERIFIER

Extracts wrapper tag, useBlockProps.save() classes, has-{color}-background-color, and inline spacing/typography styles directly from block source ASTs.

TIER 3 // RMCP STDIO SERVER + SQLITE INDEX

Exposes validate_block_markup, get_block_schema, and generate_block_example tools to AI coding agents with sub-millisecond SQLite lookups.

03 // Empirical Performance Benchmarks (WP-BlockMarkup-MCP vs Node.js + Babel)
Pipeline Stage Node.js (@wordpress/default-parser + Babel) wp-blockmarkup-mcp (Rust + oxc_parser) Speedup
10,000 Nested Gutenberg Block Trees Parse (BlockParser) 1,420.0 ms 21.4 ms 66.4x
500 save.js / edit.js JSX AST Extraction (oxc_parser) 3,840.0 ms 48.5 ms 79.2x
Tier-1 + Tier-2 Schema & Preset Validation (jsonschema + preset.rs) 980.0 ms 18.2 ms 53.8x
Total End-to-End Block Indexing & Validation 6,240.0 ms 88.1 ms 70.8x