---
title: "MCP server"
description: "Connect Claude Code, Cursor, VS Code and other MCP clients to Baz for review guidelines, code search, memories and plans."
canonical: "https://baz.ai/docs/integrations/developer-tools/mcp"
---

# MCP server

Connect Claude Code, Cursor, VS Code and other MCP clients to Baz for review guidelines, code search, memories and plans.

Baz runs a hosted Model Context Protocol (MCP) server. Connect your editor or coding agent to it and the agent can read your organization's review guidelines and memories, search repositories you have not cloned, fetch the review discussions on your branch, and save plans to Baz.

The server URL is your Baz address followed by `/mcp`. On Baz cloud that is:

```text
https://baz.ai/mcp
```

## Sign in

Most clients sign in through the browser: the first time your agent calls a Baz tool, a window opens and you log in to Baz. For clients that cannot open a browser, such as CI or headless agents, send an [API key](/docs/admin/api-keys) in the `x-api-key` header. The key acts as you.

Both methods get the same tools.

## Install

<Tabs>
  <Tab title="Claude Code">
    ```bash title="Terminal"
    claude mcp add --transport http baz https://baz.ai/mcp
    ```

    With an API key:

    ```bash title="Terminal"
    claude mcp add --transport http baz https://baz.ai/mcp --header "x-api-key: <your-api-key>"
    ```
  </Tab>
  <Tab title="Cursor">
    Open **Settings → Integrations → MCP** in Baz and select **Add to Cursor** for a one-click install, or add the server to `~/.cursor/mcp.json`:

    ```json title="~/.cursor/mcp.json"
    {
      "mcpServers": {
        "baz": {
          "url": "https://baz.ai/mcp"
        }
      }
    }
    ```

    With an API key:

    ```json title="~/.cursor/mcp.json"
    {
      "mcpServers": {
        "baz": {
          "url": "https://baz.ai/mcp",
          "headers": {
            "x-api-key": "<your-api-key>"
          }
        }
      }
    }
    ```
  </Tab>
  <Tab title="VS Code">
    ```json title=".vscode/mcp.json"
    {
      "servers": {
        "baz": {
          "type": "http",
          "url": "https://baz.ai/mcp"
        }
      }
    }
    ```

    With an API key, add `"headers": { "x-api-key": "<your-api-key>" }` next to `url`.
  </Tab>
  <Tab title="Windsurf">
    ```json title="~/.codeium/windsurf/mcp_config.json"
    {
      "mcpServers": {
        "baz": {
          "serverUrl": "https://baz.ai/mcp"
        }
      }
    }
    ```

    With an API key, add `"headers": { "x-api-key": "<your-api-key>" }` next to `serverUrl`.
  </Tab>
  <Tab title="Claude Desktop">
    Open **Settings → Connectors → Add custom connector** and enter `https://baz.ai/mcp`. Claude Desktop connectors support browser sign-in only.
  </Tab>
  <Tab title="JetBrains">
    JetBrains IDEs need a small wrapper script around `mcp-remote`.

    ```bash title="Terminal"
    echo 'npx -y mcp-remote https://baz.ai/mcp 2>/dev/null' > mcp-wrapper.sh
    chmod +x mcp-wrapper.sh
    ```

    In the IDE's MCP settings, set **Command** to `./mcp-wrapper.sh` and **Working Directory** to the folder that contains the script.
  </Tab>
</Tabs>

## Tools

The tools let your agent search and read Baz from your editor. `repo_search`, `remote_grep`, and `remote_file_search` search your indexed repositories, and `organizational_review_guidelines` and `get_review_discussions` bring in your review rules and the comments on a branch. Other tools read and update memories, report evaluation metrics, and save, read, and link plans, such as `update_plan` and `link_plan_to_pr`.

The server also provides a `code-reviewer` skill. See [MCP tools](/docs/reference/mcp-tools) for arguments.

## Troubleshooting

<Accordion>
  <AccordionItem title="Authentication keeps failing">
    Clients that connect through `mcp-remote` store credentials in `~/.mcp-auth`. Clear it with `rm -rf ~/.mcp-auth` and restart the client.
  </AccordionItem>
  <AccordionItem title="VS Code shows old tool descriptions">
    Open the Command Palette and run `MCP: Reset cached tools`.
  </AccordionItem>
</Accordion>

## Related

<CardGroup cols={2}>
  <Card title="Planner plugin" href="/docs/integrations/developer-tools/planner-plugin" icon="pencil-line">
    The plugin that wires the MCP server, skills and commands for you.
  </Card>
  <Card title="MCP tools" href="/docs/reference/mcp-tools" icon="book-open">
    Arguments and client snippets for every tool.
  </Card>
</CardGroup>
