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

# MCP Overview

> Access Greptile's code review tools from your IDE using Model Context Protocol

The Greptile MCP server gives AI coding assistants direct access to your code review data and custom context. Resolve comments, apply fixes, and enforce coding patterns without leaving your editor.

<Note>
  **Quick Start:** Get your API key → [Configure your IDE](/docs/mcp/setup) → Start using tools
</Note>

## What You Can Do

<CardGroup cols={2}>
  <Card title="Auto-Fix Comments" icon="wand-magic-sparkles" href="/docs/mcp/auto-fix">
    Fetch unaddressed Greptile comments and apply fixes directly from your IDE
  </Card>

  <Card title="Access Custom Context" icon="brain" href="/docs/mcp/custom-context">
    Supply your team's coding patterns to AI assistants during development
  </Card>

  <Card title="Generate Reports" icon="chart-line" href="/docs/mcp/reports">
    Generate code review reports and analytics
  </Card>

  <Card title="Search Reviews" icon="magnifying-glass" href="/docs/mcp/tools">
    Search across all Greptile comments to find patterns and past feedback
  </Card>
</CardGroup>

## Available Tools

11 tools across 4 categories:

| Category           | Tools   | Purpose                              |
| ------------------ | ------- | ------------------------------------ |
| **Custom Context** | 4 tools | Manage coding patterns and standards |
| **Pull Requests**  | 3 tools | Access PR data and comments          |
| **Code Reviews**   | 3 tools | Manage review lifecycle              |
| **Comments**       | 1 tool  | Search review feedback               |

See [Tools Reference](/docs/mcp/tools) for complete documentation.

## Supported IDEs

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={}
    claude mcp add --transport http greptile https://api.greptile.com/mcp \
      --header "Authorization: Bearer YOUR_GREPTILE_API_KEY"
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `mcp.json`:

    ```json theme={}
    {
      "mcpServers": {
        "greptile": {
          "type": "http",
          "url": "https://api.greptile.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_GREPTILE_API_KEY"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="VS Code">
    Use Command Palette → **MCP: Add Server** → HTTP → `https://api.greptile.com/mcp`
  </Tab>

  <Tab title="Codex CLI">
    ```bash theme={}
    codex mcp add greptile --url https://api.greptile.com/mcp \
      --bearer-token-env-var GREPTILE_API_KEY
    ```
  </Tab>
</Tabs>

See [IDE Setup Guide](/docs/mcp/setup) for detailed instructions.

## Next Steps

<Steps>
  <Step title="Get API Key">
    Sign up at [app.greptile.com](https://app.greptile.com/signup), then go to Settings > Organization > API Keys and copy your API key.
  </Step>

  <Step title="Configure Your IDE">
    Follow the [IDE Setup Guide](/docs/mcp/setup) for Claude Code, Cursor, VS Code, or Codex CLI.
  </Step>

  <Step title="Start Using">
    Ask your AI assistant: "Show me unaddressed Greptile comments for this PR"
  </Step>
</Steps>
