BOIM WordPress Stack MCP
An MCP server providing WordPress development tools, code generation, and framework guides for Gutenberg blocks, GeneratePress themes, and WPCodebox snippets. It enables developers to generate standards-compliant code while following security and performance best practices.
README
BOIM WordPress Stack MCP
A Model Context Protocol (MCP) server that acts as a coding standards and framework guide for LLM connectors (like Claude Desktop or Cursor). It provides WordPress development knowledge, code generation tools, and best practices focused on Gutenberg blocks, GeneratePress theme, GenerateBlocks plugin, and WPCodebox code snippet formatting.
Overview
This MCP server does NOT directly access WordPress websites. Instead, it provides:
- Code Generation Tools: Generate WordPress code following best practices
- Coding Standards: WordPress coding standards validation and formatting
- Framework Guides: Knowledge base for Gutenberg, GeneratePress, GenerateBlocks, and WPCodebox
- Best Practices: Security, performance, and compatibility guidelines
Features
Code Generation
- Gutenberg block code (block.json, PHP registration, React components)
- GenerateBlocks-compatible block code
- WordPress functions, hooks, shortcodes, and REST API endpoints
- WPCodebox-formatted code snippets
Coding Standards
- PHP coding standards validation
- JavaScript coding standards validation
- CSS coding standards validation
- Security best practices (sanitization, escaping, nonces)
- Performance optimization guidelines
Knowledge Base
- WordPress coding standards reference
- Gutenberg block development patterns
- GenerateBlocks development guide
- WPCodebox snippet format specifications
- GeneratePress theme best practices
Quick Start: Connecting the MCP Server
Prerequisites
- Node.js 18.0.0 or higher
- npm or yarn
- Claude Desktop or Cursor installed
Follow these simple steps to connect this MCP server to Claude Desktop or Cursor.
Step 1: Install and Build
-
Clone the repository:
git clone https://github.com/JTruax/BOIM-WP-MCP.git cd BOIM-WP-MCP -
Install dependencies:
npm install -
Build the project:
npm run buildVerify the build succeeded: You should see a
dist/directory created withindex.jsinside it. If the build fails, check that all dependencies installed correctly. -
Note the full path to the
dist/index.jsfile. You'll need this in the next step.To get the full path:
- macOS/Linux: Run
pwdin the terminal aftercd BOIM-WP-MCP, then append/dist/index.js - Windows: Run
cdin Command Prompt aftercd BOIM-WP-MCP, then append\dist\index.js
Example paths:
- macOS/Linux:
/Users/yourname/BOIM-WP-MCP/dist/index.js - Windows:
C:\\Users\\yourname\\BOIM-WP-MCP\\dist\\index.js(use double backslashes\\in JSON, or forward slashes/)
- macOS/Linux: Run
Step 2: Configure Claude Desktop
-
Locate your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Open the config file in a text editor. If it doesn't exist, create it.
-
Add the MCP server configuration:
If the file is empty or doesn't have
mcpServers, use this:{ "mcpServers": { "wordpress-gutenberg": { "command": "node", "args": ["/full/path/to/BOIM-WP-MCP/dist/index.js"] } } }If the file already has
mcpServers, add to the existing object:{ "mcpServers": { "existing-server": { ... }, "wordpress-gutenberg": { "command": "node", "args": ["/full/path/to/BOIM-WP-MCP/dist/index.js"] } } } -
Replace
/full/path/to/BOIM-WP-MCP/dist/index.jswith your actual path from Step 1. -
Save the file and restart Claude Desktop.
Step 3: Configure Cursor
-
Open Cursor Settings:
- Press
Cmd/Ctrl + Shift + Pto open the command palette - Type "Preferences: Open User Settings (JSON)" and select it
- Or go to Settings → Extensions → MCP (if available)
- Press
-
Add the MCP server configuration:
Add this to your Cursor settings JSON:
{ "mcp.servers": { "wordpress-gutenberg": { "command": "node", "args": ["/full/path/to/BOIM-WP-MCP/dist/index.js"] } } } -
Replace
/full/path/to/BOIM-WP-MCP/dist/index.jswith your actual path from Step 1. -
Save the settings and restart Cursor.
Step 4: Verify Connection
-
Restart your application (Claude Desktop or Cursor).
-
Check for the MCP server:
- In Claude Desktop: The server should appear in the MCP servers list
- In Cursor: Check the MCP status indicator
-
Test a tool:
- Try asking: "Generate a Gutenberg block called 'custom-card'"
- Or: "Format this PHP code for WPCodebox: [your code]"
Troubleshooting
MCP server not appearing?
- Verify the path to
dist/index.jsis correct and absolute (not relative) - Make sure you ran
npm run buildsuccessfully - Check that Node.js is installed:
node --version(should be 18.0.0 or higher) - Restart your application completely
"Command not found" error?
- Make sure Node.js is in your system PATH
- Try using the full path to Node.js:
"/usr/local/bin/node"or"C:\Program Files\nodejs\node.exe"
JSON syntax error?
- Validate your JSON at jsonlint.com
- Make sure all quotes are properly escaped
- Ensure there are no trailing commas
Still having issues?
- Open an issue on GitHub with:
- Your operating system
- The error message (if any)
- Your configuration file (with paths redacted)
Available Tools
WPCodebox Tools
format_wpcodebox_snippet- Format code snippet for WPCodeboxget_wpcodebox_guidelines- Get WPCodebox usage guidelinesvalidate_wpcodebox_snippet- Validate snippet structure
Gutenberg Tools
generate_gutenberg_block- Generate complete Gutenberg block codegenerate_block_variation- Generate block variationgenerate_block_pattern- Generate block patternget_gutenberg_standards- Get Gutenberg development standards
GenerateBlocks Tools
generate_gb_block- Generate GenerateBlocks-compatible block codegenerate_gb_styles- Generate GenerateBlocks-specific CSSgenerate_gb_template- Generate GenerateBlocks template codeget_generateblocks_guide- Get GenerateBlocks development guide
WordPress Utility Tools
generate_php_function- Generate WordPress PHP functiongenerate_hook- Generate WordPress action or filter hookgenerate_shortcode- Generate WordPress shortcodegenerate_rest_endpoint- Generate WordPress REST API endpointformat_for_wpcodebox- Format any code for WPCodebox
Available Resources
Knowledge Base Resources
resource://wordpress-gutenberg-mcp/coding-standards- WordPress coding standardsresource://wordpress-gutenberg-mcp/gutenberg-patterns- Gutenberg block patternsresource://wordpress-gutenberg-mcp/generateblocks-guide- GenerateBlocks guideresource://wordpress-gutenberg-mcp/wpcodebox-format- WPCodebox formatresource://wordpress-gutenberg-mcp/generatepress-guide- GeneratePress guide
Examples
Generate a Gutenberg Block
// Use the generate_gutenberg_block tool
{
"name": "custom-card",
"title": "Custom Card",
"description": "A custom card block",
"category": "design"
}
Format Code for WPCodebox
// Use the format_wpcodebox_snippet tool
{
"title": "Custom Function",
"code": "function my_function() { ... }",
"language": "php",
"description": "A custom WordPress function",
"tags": ["function", "custom"]
}
Generate a WordPress Hook
// Use the generate_hook tool
{
"type": "filter",
"hook": "the_content",
"callback": "modify_content",
"description": "Modify post content"
}
Development
Project Structure
BOIM-WP-MCP/
├── src/
│ ├── index.ts # Main MCP server
│ ├── standards.ts # Coding standards
│ └── tools/
│ ├── wpcodebox.ts # WPCodebox tools
│ ├── gutenberg-blocks.ts # Gutenberg tools
│ ├── generateblocks.ts # GenerateBlocks tools
│ └── wordpress-utils.ts # WordPress utilities
├── resources/
│ ├── coding-standards.md # Coding standards guide
│ ├── gutenberg-patterns.md # Gutenberg patterns
│ ├── generateblocks-guide.md # GenerateBlocks guide
│ ├── wpcodebox-format.md # WPCodebox format
│ └── generatepress-guide.md # GeneratePress guide
├── package.json
├── tsconfig.json
└── README.md
Building
npm run build
Development Mode
npm run dev
Type Checking
npm run type-check
WordPress Best Practices
This MCP server follows and enforces WordPress best practices:
Security
- Sanitize all user input
- Escape all output
- Use nonces for forms
- Check user capabilities
- Validate and sanitize data
Performance
- Minimize database queries
- Use transients for expensive operations
- Optimize CSS/JS delivery
- Use lazy loading when appropriate
Compatibility
- GeneratePress theme compatibility
- GenerateBlocks plugin compatibility
- WordPress coding standards compliance
- Backward compatibility considerations
Contributing
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch
- Make your changes
- Follow WordPress coding standards
- Test your changes
- Submit a pull request
License
MIT License - see LICENSE file for details
Support
For issues, questions, or contributions, please open an issue on GitHub.
Acknowledgments
- WordPress community for coding standards
- GeneratePress team for the excellent theme
- GenerateBlocks team for the powerful block collection
- WPCodebox for code snippet management
Changelog
1.0.1
- Removed WPCodebox formatting overrides (code formatting now handled by default agent)
- Added SCSS formatting rule
1.0.0
- Initial release
- WPCodebox formatting tools
- Gutenberg block generation
- GenerateBlocks integration
- WordPress utility tools
- Coding standards validation
- Knowledge base resources
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.