Gemini CLI
Gemini CLI runs in your terminal and reads MCP servers from .gemini/settings.json in a project, or ~/.gemini/settings.json for every project.
Set up
Step 1: Add the registry
Gemini CLI installs with the shadcn CLI in your project. Name cilo's two registries in components.json, give both an Authorization header with your account's API key, and keep the key in .env.local. Free items and catalog searches require a key too. Skip this if Installation already had you do it.
{"registries": {"@cilo": {"url": "https://dev-api.cilo.sh/r/styles/{style}/{name}.json","headers": {"Authorization": "Bearer ${CILO_TOKEN}"}},"@cilo-pro": {"url": "https://dev-api.cilo.sh/r/styles/{style}/{name}.json?tier=pro","headers": {"Authorization": "Bearer ${CILO_TOKEN}"}}}}
CILO_TOKEN=your-api-key
Step 2: Connect Gemini CLI
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 registry requests, including free installs; do not assume the two keys are interchangeable.
Add cilo with Gemini CLI's own command. It writes the project's .gemini/settings.json, and the single quotes keep ${CILO_MCP_TOKEN} there as it is:
gemini mcp add --transport http --header 'Authorization: Bearer ${CILO_MCP_TOKEN}' cilo https://mcp.cilo.com
Or add it by hand. httpUrl is Gemini CLI's field for Streamable HTTP; url alone would mean SSE:
{"mcpServers": {"cilo": {"httpUrl": "https://mcp.cilo.com","headers": {"Authorization": "Bearer ${CILO_MCP_TOKEN}"}}}}
Step 3: Check the connection
List the servers; cilo shows as Connected:
gemini mcp list
In a session, /mcp shows the same, with cilo's tools.
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 Gemini CLI 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
- Gemini CLI fills ${CILO_MCP_TOKEN} from your shell or from a .env file (the project's, .gemini/.env or ~/.env), not from .env.local. If CILO_MCP_TOKEN is unset, the header carries no key and the server refuses the call.
- In a folder you have not trusted, Gemini CLI leaves the project's settings unread. Trust the folder when it asks.
- Its tools appear as mcp_cilo_components_list and so on.