# Connect Gryz MCP in Gemini CLI

Source: https://www.gryz.ai/docs/guides/setup/gemini-cli-mcp-walkthrough/
Updated: 2026-12-04

## Before you start [#before-you-start]

Connect Gryz and Gemini CLI can save and recall what you decided, read and publish your Gryz documents, and work from the same context as your other AI tools, like Claude Code, Codex and Cursor.

You need:

* A free Gryz account ([sign up](https://www.gryz.ai/login/))
* [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed
* A web browser on the same computer, for sign-in
* The Gryz MCP server URL (always use `www`):

```text
https://www.gryz.ai/api/mcp
```

## Step 1: Add the Gryz server [#step-1-add-the-gryz-server]

```bash
gemini mcp add --transport http -s user gryz https://www.gryz.ai/api/mcp
```

`--transport http` is the streamable HTTP transport Gryz uses. `-s user` adds Gryz for every project. Leave it out to add Gryz to the current project only.

Prefer to edit the file? Add this to `~/.gemini/settings.json`. Use `httpUrl`, not `url`: `url` is for the older SSE transport.

```json
{
  "mcpServers": {
    "gryz": {
      "httpUrl": "https://www.gryz.ai/api/mcp"
    }
  }
}
```

## Step 2: Sign in to Gryz [#step-2-sign-in-to-gryz]

Start Gemini CLI, then run:

```text
/mcp auth gryz
```

1. Your browser opens to Gryz
2. Sign in with Google, GitHub, an email code or a password
3. Select **Allow**
4. Go back to Gemini CLI

No API key is needed. Gemini CLI keeps the sign-in in `~/.gemini/mcp-oauth-tokens.json` and refreshes it on its own. If it ever stops working, run `/mcp auth gryz` again.

On the Allow screen, Gemini CLI shows as **Not verified**. That is expected: only apps Gryz has checked show **Verified by Gryz**.

<Tip>
  Sign-in needs a browser on the same computer. It does not work over SSH without a browser or inside a container. Finish sign-in in the browser window Gemini CLI opens.
</Tip>

## Step 3: Confirm the connection [#step-3-confirm-the-connection]

In Gemini CLI:

```text
/mcp list
```

Or in your terminal:

```bash
gemini mcp list
```

`gryz` should show as connected, with its tools listed.

## Step 4: Make it automatic [#step-4-make-it-automatic]

Ask Gemini: `Set up Gryz`. Gryz offers to add a short note to `~/.gemini/GEMINI.md` that tells Gemini to check Gryz when you ask about your work and to save your decisions. Gemini shows you the change and waits for your approval before it writes anything. See [Make it automatic](/docs/getting-started/agents/) for what the note says.

## Step 5: Verify with a prompt [#step-5-verify-with-a-prompt]

* `List my Gryz documents`
* `Remember that this repo uses pnpm, not npm`
* `What did we decide about the database schema?`

## Example prompts [#example-prompts]

* `Save this plan to Gryz as a private document`
* `Recall my open decisions for this project from Gryz before you start`
* `Update my Gryz project doc with what we changed today`

## Troubleshooting [#troubleshooting]

| Issue                        | Fix                                                                                             |
| ---------------------------- | ----------------------------------------------------------------------------------------------- |
| `gryz` shows as disconnected | Run `/mcp auth gryz` and finish sign-in in the browser                                          |
| No browser opens             | Sign-in needs a local browser. Run Gemini CLI on your own computer, not over SSH                |
| Connection failed            | Check the URL uses `www` and has no trailing slash. The bare domain redirects and drops sign-in |
| Tools not showing            | Check `settings.json` uses `httpUrl`, not `url`, then restart Gemini CLI                        |
| Duplicate `gryz` entry       | `gemini mcp remove gryz`, then add it again                                                     |

Gemini CLI's own reference is its [MCP servers guide](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md).

## Reference [#reference]

For Claude, ChatGPT, Cursor, Codex and other apps, plus the tools table and API key sign-in, see the [MCP setup reference](/docs/mcp/setup/). Using Google Antigravity instead? See [Connect in Antigravity](/docs/mcp/setup/#connect-in-antigravity).

## Related reading [#related-reading]

* [Shared context for AI agents](/topics/shared-context/)
* [Shared context for AI coding agents, over MCP](/gryzle/shared-context-for-ai-coding-agents/)
