MCP
Model Context Protocol server — search RefineUI docs, fetch component pages, and read design rules from AI tools.
@refineui/mcp is a stdio MCP server for editors and agents that support the Model Context Protocol. It embeds a build-time index of this documentation site so agents can query pages without pasting all of llm.txt into context.
Install
Section titled “Install”npm install -D @refineui/mcpyarn add -D @refineui/mcppnpm add -D @refineui/mcpbun add -D @refineui/mcpMCP configuration
Section titled “MCP configuration”Add to your MCP host config (see mcp.example.json):
{ "mcpServers": { "refineui": { "command": "bunx", "args": ["@refineui/mcp"] } }}Example for monorepo contributors (after bun run build:mcp):
{ "mcpServers": { "refineui": { "command": "node", "args": ["packages/mcp/lib/server.js"] } }}| Tool | Purpose |
|---|---|
search_docs | Keyword search across documentation |
get_doc_page | Fetch a page by slug (components/button, …) |
list_components | All component doc pages |
list_foundations | Foundation / token doc pages |
get_llm_index | Full llm.txt content |
get_design_rules | Full DESIGN.md (Stitch alpha) |
list_tokens | Token categories and semantic text roles |
get_index_meta | Index generation timestamp and page count |
run_doctor | Read-only workspace diagnostics (setup, tokens, composition) |
Resources
Section titled “Resources”| URI | Content |
|---|---|
refineui://llm.txt | Machine-readable docs index |
refineui://DESIGN.md | Stitch-compatible design identity |
refineui://design-rules | Alias of DESIGN.md |
vs DESIGN.md vs llms.txt vs Skill
Section titled “vs DESIGN.md vs llms.txt vs Skill”| DESIGN.md | llms.txt | Skill | MCP | |
|---|---|---|---|---|
| Format | Tokens YAML + prose | Static link index | Agent instructions | Live tools + resources |
| Best for | Visual identity / UI generation | Discovery of pages | Routing + rules | Dynamic search & page fetch |
| Updates | Deploy with site | Deploy with site | skills add from GitHub | npm package / rebuild index |
Use them together: DESIGN.md for look & feel, Skill for behavior, MCP for lookup, llms.txt as the curated index URL.
Development
Section titled “Development”bun run build:mcpPackage: packages/mcp