OSS Quick Start
read as.md Scaffold a complete ggui agentic app and run it locally — your agent, the ggui MCP server, a sample MCP server, and a web client — in one npx.
agent ── MCP ──→ ggui serve ──→ MCP-Apps resource ui://ggui/render/<id>Prerequisites
Section titled “Prerequisites”- Node.js 20+
- pnpm, npm, or bun — any recent package manager.
- An MCP-capable agent runtime (Claude Desktop, Claude Code, Cursor, or anything that reads
.mcp.json). - No account, no API key. Everything is local.
Step 1: Scaffold a project
Section titled “Step 1: Scaffold a project”npx @ggui-ai/create-agentic-app my-appcd my-apppnpm install # or: npm install / bun install@ggui-ai/create-agentic-app scaffolds a small monorepo from an official template (claude-agent-sdk / openai-agents-sdk / google-adk): servers/ggui/ (the ggui MCP server config), servers/agent/ (your agent), servers/mcps/todo/ (a sample MCP server), and apps/web/ (a web client). See @ggui-ai/create-agentic-app for the template list.
Step 2: Boot the server
Section titled “Step 2: Boot the server”Set an LLM key in .env.local at the project root (any one — the boot probe walks anthropic → openai → google → openrouter):
ANTHROPIC_API_KEY=sk-ant-...pnpm devpnpm dev boots the whole project together — the ggui MCP server (ggui serve from @ggui-ai/cli, embedding @ggui-ai/mcp-server), your agent, the sample MCP server, and the web client. The ggui server (servers/ggui) defaults to http://127.0.0.1:6781:
- MCP endpoint:
http://127.0.0.1:6781/mcp - WebSocket (live channel):
ws://127.0.0.1:6781/ws - Operator console:
http://127.0.0.1:6781/
Granular scripts (dev:ggui, dev:agent, dev:mcps, dev:web, dev:stop) run the pieces individually — see the scaffold’s README.
Step 3: Point an agent runtime at the local MCP
Section titled “Step 3: Point an agent runtime at the local MCP”Add this entry to the scaffold’s existing .mcp.json (it already contains a ggui-dev helper server):
{ "mcpServers": { "ggui": { "url": "http://127.0.0.1:6781/mcp", "headers": { "Authorization": "Bearer dev" } } }}Claude Desktop, Claude Code, Cursor, and any runtime that reads .mcp.json will discover the agent-facing tool catalogue — ggui_handshake / ggui_render / ggui_update / ggui_emit / ggui_consume, plus discovery tools (ggui_get_session, ggui_list_sessions, ggui_list_gadgets, ggui_list_themes, blueprint search/render).
The flow is handshake → render, with ggui_update to mutate props on a delivered render. Write a system prompt that tells the LLM when to render UIs — the Examples section has working recipes per framework.
What works today
Section titled “What works today”- ✅ Local server + wsToken-gated WebSocket subscribe → ack work end-to-end — the iframe receives
wsUrl/wsTokenon theai.ggui/renderslice. Render plumbing is production-shaped, not a mock. - ✅
handshake→renderdelivers an MCP-Apps resource (ui://ggui/render/<id>) that an MCP-Apps host mounts. - ✅ Component generation is wired via BYOK. Export
ANTHROPIC_API_KEY(orOPENAI_API_KEY/GOOGLE_API_KEY/OPENROUTER_API_KEY) beforeggui serveandggui_renderruns the real@ggui-ai/ui-genpipeline (blueprint match → synth). Without any key,ggui_renderreturns a “Connect Claude” card pointing at the local/settingspage rather than failing. - ✅ Per-app theming. The scaffold’s
servers/ggui/ggui.jsonsetstheme: {preset: 'indigo', mode: 'dark'}; agents can list presets viaggui_list_themesand override per render withggui_render({themeId}). - 🔒 Default auth is pair-minted.
/mcprejects bearers that weren’t issued by the pairing flow. Pass--dev-allow-allto accept any non-empty bearer asbuilder(safe only on127.0.0.1), or swap in a realAuthAdapterviacreateGguiServer({ auth })before exposing the server beyond localhost.
What this is not
Section titled “What this is not”- Not a hosted service. No ggui cloud account, no billing, no managed dashboards. For those, see the Hosted Quick Start (coming soon).
- Not a managed billing surface. Generation runs on YOUR provider key (BYOK) — every
ggui_renderbills the provider directly. The hosted ggui cloud (coming soon) will bundle credit-metered billing and managed keys; this OSS path runs on your own provider key today.
Vocabulary
Section titled “Vocabulary”- Tool — an agent-side action exposed over MCP (
ggui_render,ggui_handshake, …). - Gadget — a renderer-side capability surfaced inside the viewer (formerly
clientLibraries). - Blueprint — a cached component recipe matched before generation runs.
Full definitions: Glossary.
Just the bare MCP server
Section titled “Just the bare MCP server”The scaffold orchestrates everything through pnpm dev. If you only want the OSS MCP server — no agent or web supervision — run ggui serve against a ggui.json directly (the same ggui serve the scaffold’s servers/ggui runs):
# = ggui serve --mcp-only --dev-allow-all --port 6781pnpm --filter ./servers/ggui startWorking from a monorepo clone rather than the published packages? Build the workspace copies first:
pnpm --filter @ggui-ai/cli buildnode packages/ggui-cli/dist/cli.js serve --mcp-onlyWhat’s next
Section titled “What’s next”- MCP Protocol Reference — wire format and tool catalogue (same on OSS and hosted).
- WebSocket Protocol — live-channel envelopes (
ActionEnvelope,StreamEnvelope). - Examples — MCP-config-only integrations with system-prompt recipes (Claude, OpenAI, Gemini, OpenClaw, generic MCP).
- Hosted Quick Start — managed generation and dashboards on ggui cloud (coming soon).
- GitHub repo — source, issue tracker, full monorepo walkthrough.