Skip to content

Commit 82cf3eb

Browse files
committed
Update READMEs with MCP server setup and stdio transport docs
- Add MCP Server section to root README with Claude Desktop and Claude Code setup instructions - Update apps/mcp README with stdio usage for Claude Desktop - Update project structure to include stdio.ts entry point
1 parent cf5978c commit 82cf3eb

File tree

2 files changed

+90
-8
lines changed

2 files changed

+90
-8
lines changed

README.md

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,60 @@ make dev # Start all services
4242

4343
You can also use `pnpm` directly (`pnpm dev`, `pnpm dev:app`, `pnpm dev:agent`, etc.).
4444

45+
## MCP Server (Self-Hosted)
46+
47+
The repo includes a standalone [Model Context Protocol](https://modelcontextprotocol.io) server that exposes the design system, skill instructions, and an HTML document assembler to any MCP-compatible client — including Claude Desktop, Claude Code, and Cursor.
48+
49+
### What it provides
50+
51+
- **`assemble_document` tool** — wraps HTML fragments with the full design system CSS and bridge JS, returning an iframe-ready document
52+
- **Skill resources** — browse and read skill instruction documents (`skills://list`, `skills://{name}`)
53+
- **Prompt templates** — pre-composed prompts for widgets, SVG diagrams, and advanced visualizations
54+
55+
### Claude Desktop (stdio)
56+
57+
Add to your Claude Desktop config (`claude_desktop_config.json`):
58+
59+
```json
60+
{
61+
"mcpServers": {
62+
"open-generative-ui": {
63+
"command": "node",
64+
"args": ["dist/stdio.js"],
65+
"cwd": "/path/to/apps/mcp"
66+
}
67+
}
68+
}
69+
```
70+
71+
### Claude Code / HTTP clients
72+
73+
```bash
74+
# Start the HTTP server
75+
cd apps/mcp && pnpm dev
76+
```
77+
78+
Add to `.mcp.json`:
79+
80+
```json
81+
{
82+
"openGenerativeUI": {
83+
"url": "http://localhost:3100/mcp"
84+
}
85+
}
86+
```
87+
88+
See [apps/mcp/README.md](apps/mcp/README.md) for full configuration, Docker deployment, and API reference.
89+
4590
## Architecture
4691

47-
Turborepo monorepo with two apps:
92+
Turborepo monorepo with three packages:
4893

4994
```
5095
apps/
5196
├── app/ Next.js 16 frontend (CopilotKit v2, React 19, Tailwind 4)
52-
└── agent/ LangGraph Python agent (GPT-5.4, CopilotKit middleware)
97+
├── agent/ LangGraph Python agent (GPT-5.4, CopilotKit middleware)
98+
└── mcp/ Standalone MCP server (design system + skills + document assembler)
5399
```
54100

55101
### How It Works

apps/mcp/README.md

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,41 @@ LOG_LEVEL=info
6161

6262
## Usage
6363

64-
### From Claude Code
64+
### Claude Desktop (stdio)
65+
66+
Claude Desktop uses stdio transport. Build first, then add to your `claude_desktop_config.json`:
67+
68+
```bash
69+
pnpm build
70+
```
71+
72+
```json
73+
{
74+
"mcpServers": {
75+
"open-generative-ui": {
76+
"command": "node",
77+
"args": ["dist/stdio.js"],
78+
"cwd": "/absolute/path/to/apps/mcp"
79+
}
80+
}
81+
}
82+
```
83+
84+
For development, you can use `tsx` directly:
85+
86+
```json
87+
{
88+
"mcpServers": {
89+
"open-generative-ui": {
90+
"command": "npx",
91+
"args": ["tsx", "src/stdio.ts"],
92+
"cwd": "/absolute/path/to/apps/mcp"
93+
}
94+
}
95+
}
96+
```
97+
98+
### Claude Code (HTTP)
6599

66100
Add to `.mcp.json`:
67101

@@ -73,11 +107,12 @@ Add to `.mcp.json`:
73107
}
74108
```
75109

76-
Then use the available tools and resources in Claude conversations.
110+
Then start the HTTP server with `pnpm dev`.
77111

78-
### From Any MCP Client
112+
### Any MCP Client
79113

80-
Connect via HTTP MCP transport to `http://localhost:3100/mcp`.
114+
- **stdio**: Run `node dist/stdio.js` (or `pnpm start:stdio`)
115+
- **HTTP**: Connect to `http://localhost:3100/mcp` (start with `pnpm dev` or `pnpm start`)
81116

82117
## API Reference
83118

@@ -224,8 +259,9 @@ apps/mcp/
224259
├── Dockerfile # Container definition
225260
├── skills/ # Skill instruction files (copied from source)
226261
└── src/
227-
├── index.ts # Hono HTTP server entry point
228-
├── server.ts # MCP server construction
262+
├── index.ts # HTTP server entry point (Hono)
263+
├── stdio.ts # stdio transport entry point (Claude Desktop)
264+
├── server.ts # MCP server construction (shared)
229265
├── skills.ts # Skill file loader
230266
└── renderer.ts # Design system CSS + assembleDocument
231267
```

0 commit comments

Comments
 (0)