Skip to main content

Model Context Protocol (MCP) Server

Step-by-step setup instructions, client configurations, tool references, and verification guides for the native Boodoo MCP server.

Overview

The Boodoo framework includes an official, zero-dependency Model Context Protocol (MCP) server implemented in standard ECMAScript modules (mcp/server.mjs). By connecting your AI coding environment directly to Boodoo's live design tokens, component catalog, accessibility specifications, and syntax linter, your AI assistants (Claude, Cursor, Copilot, Windsurf, Cline) generate 100% compliant, production-grade code without hallucinations.

Zero External Dependencies

Communicates over native JSON-RPC 2.0 stdio using built-in Node.js modules. No heavy runtime SDKs or external network dependencies required.

Secure Path Traversal Protection

All code retrieval tools enforce platform target allowlisting and strict path containment checks to ensure safe workspace sandboxing.

Built-in Quality Linter

Directly invokes Boodoo's 14-point production quality rules to validate form IDs, semantic text wrapping, and React Native style cleanliness.

MCP Tools Reference

The Boodoo MCP server exposes 8 dedicated tools to your AI assistant:

Tool Name Parameters Description & Purpose
search_components query (string, optional) Searches 50+ built-in components by keyword, UI category, or features (e.g., "modal", "table", "disclosure").
get_component_docs name (string, required) Returns full documentation, CSS classes, HTML markup conventions, and WCAG 2.2 AA accessibility requirements for a specified component.
get_component_example name (string, required), target (enum: vanilla-js, react, vue, react-native) Retrieves verified, runnable code samples across Web (vanilla JS), React, Vue 3, or React Native Mobile with strict sandbox security.
search_utilities query (string, optional) Searches 150+ CSS utility classes covering responsive spacing, flexbox, 2D CSS grid, typography, borders, and elevation.
get_design_tokens None Returns the universal design token system: color palettes, generous spacing scale, border radii, shadows, and z-index layers.
get_design_token name (string, required) Queries a specific token by dot-notation path or token name (e.g., "colors.primary", "spacing.2", "radii.lg").
validate_component_usage code (string, required), platform (enum: web, react, vue, react-native) Performs automated linting on generated code: ensures mandatory form field IDs, semantic text node wrapping, and zero React Native inline styles.
get_installation_guide target (string, optional) Provides exact, tested setup instructions for npm, yarn, pnpm, high-speed CDN, React, Vue, or React Native projects.

IDE & Client Setup Instructions

Configure your favorite coding assistant or editor to communicate with the Boodoo MCP server. Replace <PATH_TO_BOODOO_REPO> with the absolute path to your local Boodoo workspace (for example: /Users/name/projects/boodoo on macOS/Linux or C:/Users/name/apps/budu on Windows).

Open your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the Boodoo MCP server entry under mcpServers:

{
  "mcpServers": {
    "boodoo": {
      "command": "node",
      "args": ["<PATH_TO_BOODOO_REPO>/mcp/server.mjs"]
    }
  }
}

Restart Claude Desktop. The hammer icon in the prompt input will display Boodoo's 8 registered tools.

In Cursor, open your project workspace settings or create a .cursor/mcp.json file in the root of your project:

{
  "mcpServers": {
    "boodoo": {
      "command": "node",
      "args": ["<PATH_TO_BOODOO_REPO>/mcp/server.mjs"]
    }
  }
}

Alternatively, navigate to Cursor Settings > Features > MCP, click + Add New MCP Server, name it boodoo, select command, and enter node <PATH_TO_BOODOO_REPO>/mcp/server.mjs.

In VS Code with the Cline extension installed, open the Cline tab, click the MCP Servers icon, or edit cline_mcp_settings.json:

{
  "mcpServers": {
    "boodoo": {
      "command": "node",
      "args": ["<PATH_TO_BOODOO_REPO>/mcp/server.mjs"],
      "disabled": false,
      "autoApprove": [
        "search_components",
        "get_component_docs",
        "get_component_example",
        "search_utilities",
        "get_design_tokens",
        "get_design_token",
        "validate_component_usage"
      ]
    }
  }
}

In Windsurf, open Cascade > Plugins > MCP Configuration or edit ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "boodoo": {
      "command": "node",
      "args": ["<PATH_TO_BOODOO_REPO>/mcp/server.mjs"]
    }
  }
}

Cascade will now automatically call Boodoo tools when you ask questions about styling, components, or layout.

Testing & Manual Verification

You can test the MCP server directly from your terminal using standard input/output JSON-RPC payloads:

# Run server test query in Node
node -e "
const proc = require('child_process').spawn('node', ['mcp/server.mjs']);
proc.stdout.on('data', d => console.log('MCP Response:', d.toString()));
proc.stdin.write(JSON.stringify({
  jsonrpc: '2.0',
  id: 1,
  method: 'tools/call',
  params: { name: 'get_design_token', arguments: { name: 'colors.primary' } }
}) + '\n');
"

Expected output returns the canonical Boodoo primary brand token:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\n  \"value\": \"#7c3aed\",\n  \"token\": \"colors.primary\"\n}"
      }
    ]
  }
}

AI Prompting Best Practices

When prompting an AI assistant connected via MCP, follow these best practices for optimal results:

  • Search First: Instruct the model: "Search Boodoo components before creating custom UI elements."
  • Token Verification: Tell the model: "Query Boodoo design tokens using get_design_token to ensure proper color and spacing variables are used."
  • Automated Linting: Prompt: "Run validate_component_usage on the final code to ensure form IDs and semantic text tags adhere to WCAG standards."