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).

bash
pnpm add -D @slipstream-ui/mcp-server
json
// .mcp.json (Claude Code) or client MCP settings
{
"mcpServers": {
"slipstream-ui": {
"command": "npx",
"args": ["-y", "@slipstream-ui/mcp-server"]
}
}
}

The five tools

ToolWhat it returns
list_componentsBrowse components with package/tier filters.
search_componentsFind components by capability keywords ("streaming", "citation").
get_component_manifestFull COMPONENT_MANIFEST: props, defaults, examples, a11y.
get_usage_examplesUsage examples, composition rules, and anti-patterns.
validate_usageValidate 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.

text
1. search_components("streaming chat")
-> Conversation, PromptInput, Response, MessageActions
2. get_component_manifest("prompt-input")
-> exact prop schema, defaults, required flags
3. 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:

text
GET /llms.txt -> library index for agents
GET /llm/index.md -> all components with descriptions
GET /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:

bash
curl https://slipstreamui.com/registry/all.json # index of every component
curl 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_usage in CI if your pipeline generates UI code.
  • Manifests carry anti-patterns and composition rules — surface them in your system prompt for even better output.
Was this page helpful?