The project includes an optional Model Context Protocol (MCP) server that provides resources, prompts, and tools for AI assistants like Claude.
The MCP server lives in apps/mcp/.
| URI | Description |
|---|---|
skills://list |
JSON array of available skill names |
skills://{name} |
Full text of an individual skill document |
| Name | Description |
|---|---|
create_widget |
Instructions for building interactive HTML widgets |
create_svg_diagram |
Instructions for SVG diagram generation |
create_visualization |
Instructions for advanced visualizations |
| Name | Description |
|---|---|
assemble_document |
Wraps an HTML fragment with the full design system (CSS variables, SVG classes, form styles, bridge JS) |
# Start with hot reload (development)
make dev-mcp # Starts on http://localhost:3100
# Or directly
cd apps/mcp && pnpm devCreate apps/mcp/.env:
MCP_PORT=3100 # Server port
NODE_ENV=development
ALLOWED_ORIGINS=* # CORS origins
SKILLS_DIR=./skills # Path to skill documents
LOG_LEVEL=infoSet MCP_SERVER_URL in your environment to connect the MCP server to CopilotKit:
MCP_SERVER_URL=http://localhost:3100/mcpThe CopilotKit API route automatically picks this up:
// apps/app/src/app/api/copilotkit/route.ts
new CopilotRuntime({
agents: { default: defaultAgent },
...(process.env.MCP_SERVER_URL && {
mcpApps: {
servers: [{
type: "http",
url: process.env.MCP_SERVER_URL,
serverId: "example_mcp_app",
}],
},
}),
})For the stdio transport (Claude Desktop integration), add to your claude_desktop_config.json:
{
"mcpServers": {
"open-generative-ui": {
"command": "node",
"args": ["dist/stdio.js"],
"cwd": "/path/to/apps/mcp"
}
}
}Build first:
cd apps/mcp && pnpm buildAdd to your .mcp.json:
{
"openGenerativeUI": {
"url": "http://localhost:3100/mcp"
}
}- Architecture — How MCP fits into the overall system
- Deployment — Deploy the MCP server alongside other services