How it works
MCP Server
A read-only Model Context Protocol server over the public catalogue, so a coding agent can search it and read the source instead of guessing.
3 min read · 5 sections
An agent asked to "add a dialog to this page" has three options: guess, search, or ask a tool that knows. Guessing produces a file nobody can maintain. Forme publishes a Model Context Protocol server so the third option exists.
Connect it#
The endpoint is https://formeui.com/mcp. It speaks Streamable HTTP over JSON-RPC 2.0 and is stateless — no session id, nothing carried between calls.
{
"mcpServers": {
"forme": { "url": "https://formeui.com/mcp" }
}
}Or from the terminal:
claude mcp add --transport http forme https://formeui.com/mcpThe tools#
| Tool | Returns |
|---|---|
search_components | Ranked matches with the exact command that installs each one. |
get_component | One item in full: description, category, npm dependencies, install command, and the files it will write. |
get_component_source | The complete readable source, as it lands in the user's project. |
Searching is the entry point, and the order matters: search_components, then get_component, then get_component_source. Each is cheaper than the last and answers a narrower question.
Try it without a client:
curl -s https://formeui.com/mcp -H 'Content-Type: application/json' -d '{
"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": { "name": "search_components", "arguments": { "query": "dialog" } }
}'Read-only, on purpose#
There is no install tool. An MCP server that writes files needs a filesystem, which means a stdio transport and a process on the user's machine — a different deployment, a different trust story, and a package to keep up to date.
The split follows from that, and it is the same split the reference libraries make:
- This server, remote and stateless, reads the catalogue.
- The shadcn CLI writes the files, from your shell, where you can see the command before you run it.
- The [agent skill](/docs/agent-skills) carries the rules.
Nothing is gained by an agent installing a component behind your back. What is gained is a reviewable command.
Pro over MCP#
Pro items are findable through this server, and that is deliberate. An agent that cannot see that a dashboard block exists will hand-roll one, and you get a worse result either way. So a Pro item shows its name, description, category and page.
What is withheld without a licence is the part that is actually worth buying: the source, and the install command.
AI Chat (ai-chat) is a Forme Pro template.
A complete agent conversation interface: a reader-aware message scroller,
message rows with tool and reasoning groups, and an auto-growing prompt input.
Page: https://formeui.com/templates/ai-chat
Its source is not available through this server, because you are not connected
with a Forme Pro licence. To read or install it:
npx @formeui/cli login
npx @formeui/cli add ai-chatOnce the connection carries a Pro licence, get_component and get_component_source return Pro items like any other.
Without a client#
Everything the server serves is plain HTTP, so nothing depends on MCP being present:
| URL | Returns |
|---|---|
/r/registry.json | The shadcn registry index. |
/llms.txt | Every item with the command that installs it. |
/r/skills/index.json | The agent skill index. |
/r/skills/forme/SKILL.md | Any single skill file, as markdown. |