Skip to main content
Gremorie

MCP server

The AI-native differentiator: tools that let LLMs query the registry and corpus when generating UI.

The Gremorie MCP server exposes the registry and corpus to language models via the Model Context Protocol. Claude, Cursor, Codex, and any other MCP-compatible client can call its tools to list components, fetch source, and read the corpus on demand.

This is the Gremorie differentiator. A traditional design system documents itself for humans; Gremorie documents itself for both humans and LLMs, structurally, through the registry and the MCP layer.

Endpoint

The server runs at /api/mcp on this site. It speaks the standard MCP transport (POST for tool calls, SSE for streams).

Tools

ToolPurpose
list_components(category?)Enumerate primitives, optionally filtered by category
search_components(query)Substring + fuzzy search across the registry
get_component(name)Full source plus usage doc for one primitive
get_block(name)A composition with wiring (e.g. chat-surface)
get_guidelines(topic?)Read corpus articles (heuristics, patterns, UX writing)

The full schema is served by the MCP server itself; any client that introspects tools/list gets the canonical definition.

Configuring a client

{
  "mcpServers": {
    "gremorie": {
      "url": "https://gremorie.com/api/mcp"
    }
  }
}
{
  "mcpServers": {
    "gremorie": {
      "url": "https://gremorie.com/api/mcp"
    }
  }
}
{
  "mcp_servers": {
    "gremorie": {
      "transport": "http",
      "url": "https://gremorie.com/api/mcp"
    }
  }
}

After restarting the client, the Gremorie tools appear in the model's tool inventory and can be invoked through natural-language requests like "add a chat surface to my React project".

How an LLM uses it

A typical flow:

The user asks: "Build me a chat surface with streaming."

The model calls search_components("chat") and gets back rx-prompt-input, rx-conversation, rx-message.

The model calls get_component("rx-prompt-input") and reads the source, props, and accessibility notes from the registry item.

The model calls get_guidelines("loading-empty-error") from the corpus and learns Gremorie's loading-state pattern.

The model writes code that uses the real component APIs and the right patterns -- no hallucination, no stale prop names.

Why it matters

LLMs trained on generic public code emit plausible-looking but wrong component code: prop names from old versions, mismatched edition shapes, missing accessibility wiring. The MCP layer closes that gap by handing the model the current source and the canonical guidelines on demand.

Source

The route lives at apps/docs/app/api/[transport]/route.ts. It reads the registry as a server module and serves MCP requests over the same domain as the docs site -- no separate deployment.

On this page