Claude Code

Claude Code runs in your terminal and reads a project's MCP servers from .mcp.json at its root, a file you can commit so everyone on the project gets the server.

Set up

Step 1: Add the registry

Claude Code installs with the shadcn CLI in your project, so the project names cilo's two registries in components.json, @cilo-pro with the header that carries your licence key, and keeps the key in .env.local. Skip this if Installation already had you do it.

components.jsonJSON
{
"registries": {
"@cilo": "https://registry.cilo.com/r/styles/{style}/{name}.json",
"@cilo-pro": {
"url": "https://registry.cilo.com/r/styles/{style}/{name}.json",
"headers": {
"Authorization": "Bearer ${CILO_TOKEN}"
}
}
}
}
.env.local
CILO_TOKEN=your-licence-key

Step 2: Connect Claude Code

Use the access key supplied for MCP. Where a configuration below names CILO_MCP_TOKEN, export that variable in the environment that starts your agent. This is separate from the project’s CILO_TOKEN for pro installs; do not assume the two keys are interchangeable.

Add cilo to the project. The single quotes keep ${CILO_MCP_TOKEN} in .mcp.json as it is, so the key stays out of git and Claude Code fills it in when it loads the file:

Terminal
claude mcp add --transport http --scope project cilo https://mcp.cilo.com --header 'Authorization: Bearer ${CILO_MCP_TOKEN}'

That writes this to .mcp.json:

.mcp.jsonJSON
{
"mcpServers": {
"cilo": {
"type": "http",
"url": "https://mcp.cilo.com",
"headers": {
"Authorization": "Bearer ${CILO_MCP_TOKEN}"
}
}
}
}

Or just for yourself, in every project, with your shell putting the key in your own config:

Terminal
claude mcp add --transport http --scope user cilo https://mcp.cilo.com --header "Authorization: Bearer $CILO_MCP_TOKEN"

Step 3: Check the connection

For a project-scope server, first start Claude Code in the project's folder. It asks once whether to use the servers in .mcp.json; allow cilo. Until then claude mcp list shows it as ⏸ Pending approval.

Then list the servers; cilo shows ✔ Connected, and /mcp in a session lists it with its tools:

Terminal
claude mcp list

Ask for Cilo’s block families and confirm a tool call succeeds. A visible server or tool list alone does not confirm access.

Step 4: Ask for a block

Ask Claude Code for a block by what it does, and name cilo, so it uses https://mcp.cilo.com rather than another source:

  • “Using cilo, add an order tracking card with the courier on a map to the order page.”

It finds the block with components_list, gets one install command from component_install, and runs it in your project once you agree. More asks are on MCP server.

Good to know

  • Your agent reads CILO_MCP_TOKEN from the environment it was started in, not from .env.local, which holds the project’s pro-install credential. Export it in your shell profile (export CILO_MCP_TOKEN=…) and start the agent from a new terminal.
  • Keep "type": "http" in the entry: Claude Code skips an entry with a url and no type, and reports: MCP server "cilo" has a "url" but no "type".
  • Claude Code reads .mcp.json when a session starts, so start a new one after you change the file. If ${CILO_MCP_TOKEN} is not set it warns and sends the text as it is, and the server refuses it.

Claude Code's guide to MCP(opens in a new tab)