> ## Documentation Index
> Fetch the complete documentation index at: https://spyro.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini CLI

> Add Spyro AI to Gemini CLI with browser sign-in or a key, restrict which tools it can use, and manage the server from the terminal.



Let your AI agent configure this for you

        Copy configuration prompt


      \<details><summary>Preview the prompt</summary>
        \<pre /></details>

Gemini CLI is Google's open source agent for the terminal. It can call Spyro AI tools while it works on your project.## Connect with sign-in**1. Add the server**Add it to `~/.gemini/settings.json` (or `.gemini/settings.json` for one project). The `httpUrl` field selects the streamable HTTP transport:```json ~/.gemini/settings.json theme={null}
{
  "mcpServers": {
    "spyro-ai": {
      "httpUrl": "https://mcp.spyro.app/mcp"
    }
  }
}
```Or use the command: `gemini mcp add --transport http spyro-ai https://mcp.spyro.app/mcp`**2. Sign in**Start Gemini CLI and run:```text theme={null}
/mcp auth spyro-ai
```Sign in in your browser, pick your workspaces and click **Allow**.## Connect with a keyUse a key for headless or CI use. Create it in **Settings → MCP**.```json ~/.gemini/settings.json theme={null}
{
  "mcpServers": {
    "spyro-ai": {
      "httpUrl": "https://mcp.spyro.app/mcp",
      "headers": {
        "Authorization": "Bearer $SPYRO_AI_MCP_KEY"
      }
    }
  }
}
```Set `SPYRO_AI_MCP_KEY` in your environment first. If your version does not expand the variable, check Gemini CLI's configuration guide, and keep the key out of any file you commit.## Limit which tools it can useGemini CLI can allow or block individual tools per server. This is useful to keep it away from the tools that make changes:```json theme={null}
{
  "mcpServers": {
    "spyro-ai": {
      "httpUrl": "https://mcp.spyro.app/mcp",
      "excludeTools": [
        "manageCalendar",
        "manageArticle",
        "managePublishing",
        "managePrompts",
        "manageKeywords",
        "manageSiteAudit",
        "manageInternalLinks",
        "manageCompetitors",
        "manageSettings"
      ]
    }
  }
}
```A key or approval with **Read** access already hides these tools. Excluding them is a second layer.## Manage itInside Gemini CLI, `/mcp` lists servers, their status and the tools they offer. Use it to confirm the Spyro AI tools loaded.## Try these prompts- *"Use Spyro AI to list my critical audit issues and fix the ones in this repo."*
- *"Ask Spyro AI which pages lost the most clicks in the last 28 days."*
- *"Audit [https://example.com/blog/post](https://example.com/blog/post) with Spyro AI and rewrite the intro."*## If it fails- **Server not listed in `/mcp`:** check the JSON is valid and the key is `httpUrl`, not `url` (which means the older SSE transport).
- **401 error:** sign in again with `/mcp auth spyro-ai`, or check the key.
- More: [Troubleshooting](https://spyro.app/docs/product/mcp-troubleshooting.md).Google's guide: [MCP servers with Gemini CLI](https://geminicli.com/docs/tools/mcp-server).## Related- [Gemini app and Gemini Enterprise](https://spyro.app/docs/product/mcp-gemini.md)
- [All connection options](https://spyro.app/docs/product/mcp-connect.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.