Connect an AI agent to your component library
Slipstream is an MCP component library: the spec your agent needs lives behind the Model Context Protocol, not in a README it has to guess from. Three consumption paths, pick per tool — MCP first, markdown as fallback, raw JSON when you want zero ceremony.
Path 1 — MCP server (recommended)
Install @slipstream-ui/mcp-server and point your client at its slipstream-mcp binary (stdio transport).
pnpm add -D @slipstream-ui/mcp-server
// .mcp.json (Claude Code) or client MCP settings{"mcpServers": {"slipstream-ui": {"command": "npx","args": ["-y", "@slipstream-ui/mcp-server"]}}}
The five tools
| Tool | What it returns |
|---|---|
| list_components | Browse components with package/tier filters. |
| search_components | Find components by capability keywords ("streaming", "citation"). |
| get_component_manifest | Full COMPONENT_MANIFEST: props, defaults, examples, a11y. |
| get_usage_examples | Usage examples, composition rules, and anti-patterns. |
| validate_usage | Validate generated JSX against the manifest before emitting. |
The zero-hallucination loop
The point of the library: the agent checks itself before code lands in your diff.
1. search_components("streaming chat")-> Conversation, PromptInput, Response, MessageActions2. get_component_manifest("prompt-input")-> exact prop schema, defaults, required flags3. agent writes JSX<PromptInput onSubmit={handle} isLoading={busy} onStop={stop} />4. validate_usage({ componentId: "prompt-input", props: [...] })-> ok: true (or flags hallucinated / missing required props)5. emit only after validation passes
validate_usage catches invented prop names, wrong types, and missing requireds — the three ways agents usually break component APIs.
Path 2 — canonical markdown routes
No MCP client? Every agent that can fetch can read plain markdown — same content as the manifests, no HTML scraping:
GET /llms.txt -> library index for agentsGET /llm/index.md -> all components with descriptionsGET /llm/components/<id>.md -> props, anti-patterns, a11y, composition
Point tools that support llms.txt at slipstreamui.com/llms.txt; per-component pages are generated from the manifests on every build, so they cannot drift.
Path 3 — raw registry JSON
For build-time tooling, fetch the static registry directly:
curl https://slipstreamui.com/registry/all.json # index of every componentcurl https://slipstreamui.com/registry/message.json # full manifest + shadcn payload
Tips
- Give the agent the docs page link too — humans and agents read the same source of truth.
- Run
validate_usagein CI if your pipeline generates UI code. - Manifests carry anti-patterns and composition rules — surface them in your system prompt for even better output.