Skip to main content

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.

Configure the Greptile MCP server in your IDE to access code analysis tools and review data.

Setup in Claude Code

1

Get Your Greptile API Key

Obtain your API key from app.greptile.com/settings/organization/api (Settings > Organization > API Keys).
2

Add Greptile MCP Server

In your terminal, run the command to add the Greptile MCP server:
claude mcp add --transport http greptile https://api.greptile.com/mcp \
  --header "Authorization: Bearer YOUR_GREPTILE_API_KEY"
Replace YOUR_GREPTILE_API_KEY with your actual API key.
3

Verify Server Installation

Check that the server was added successfully:
claude mcp list
You should see greptile in the list of configured servers with ✓ Connected status.
4

Start Claude Code Session

Open Claude Code and start a new session. The Greptile MCP server tools will be available automatically.

Alternative: Project-Level Configuration

For team-shared configuration, create a .mcp.json file in your project root:
{
  "servers": {
    "greptile": {
      "transport": "http",
      "url": "https://api.greptile.com/mcp",
      "headers": {
        "Authorization": "Bearer ${GREPTILE_API_KEY}"
      }
    }
  }
}
Set the environment variable:
export GREPTILE_API_KEY=your-api-key-here

Setup in Cursor

1

Get Your API Key

Get your Greptile API key from app.greptile.com/settings/organization/api (Settings > Organization > API Keys).
2

Open Cursor Settings

Go to SettingsFeaturesModel Context Protocol.
3

Add New Server Configuration

Click “Add Server” and configure:
  • Name: greptile
  • Type: Select “HTTP”
  • URL: https://api.greptile.com/mcp
  • Headers: Add header with key Authorization and value Bearer YOUR_GREPTILE_API_KEY
4

Replace API Key

Replace YOUR_GREPTILE_API_KEY with your actual Greptile API key from step 1.
5

Save and Restart

Click “Save” and restart Cursor to activate the MCP server connection.

Alternative: Project-Level Configuration

You can also configure MCP servers per-project by creating a .mcp.json file in your project root:
{
  "greptile": {
    "type": "http",
    "url": "https://api.greptile.com/mcp",
    "headers": {
      "Authorization": "Bearer YOUR_GREPTILE_API_KEY"
    }
  }
}
Replace YOUR_GREPTILE_API_KEY with your actual Greptile API key, then restart Cursor.

Setup in Codex CLI

1

Get Your API Key

Get your Greptile API key from app.greptile.com/settings/organization/api (Settings > Organization > API Keys).
2

Add Greptile MCP Server

In your terminal, run:
codex mcp add greptile --url https://api.greptile.com/mcp \
  --bearer-token-env-var GREPTILE_API_KEY
Then set your API key as an environment variable:
export GREPTILE_API_KEY=your-api-key-here
3

Verify Server Installation

Check that the server was added:
codex mcp list
You should see greptile in the list of configured servers.
4

Start Codex Session

Open Codex. The Greptile MCP tools are available automatically.

Alternative: Project-Level Configuration

For team-shared configuration, create a .codex/config.toml file in your project root:
[mcp_servers.greptile]
url = "https://api.greptile.com/mcp"
bearer_token_env_var = "GREPTILE_API_KEY"
Set the environment variable:
export GREPTILE_API_KEY=your-api-key-here

Verification

Once configured, test the connection:
1

Check Connection Status

In Claude Code, run claude mcp list to confirm:
greptile: https://api.greptile.com/mcp (HTTP) - ✓ Connected
2

Test Basic Functionality

Ask your IDE:
  • “What custom context does my organization have?”
  • “List recent merge requests”
  • “Show me any security-related comments”
3

Verify Data Access

Confirm the tools return your organization’s actual data, not authentication errors.

Troubleshooting

Connection Issues

Server shows as disconnected:
  • Verify API key is correct and hasn’t expired
  • Check internet connection
  • Ensure the endpoint URL is exactly https://api.greptile.com/mcp
Authentication errors:
  • Confirm API key has organization access
  • Check that the bearer token format is correct
  • Verify your account has access to the repositories you’re querying
No tools available:
  • Restart your IDE after adding the server
  • Check that the server shows as “Connected” in the status
  • Verify the MCP client is properly configured

Common Fixes

1

Restart IDE

Close and reopen Claude Code, Cursor, or Codex after configuration changes.
2

Check API Key

Test your API key with curl:
curl -X POST https://api.greptile.com/mcp \
  -H "Authorization: Bearer YOUR_GREPTILE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"ping"}'
You should receive: {"jsonrpc":"2.0","id":1,"result":{}}
3

Verify Configuration

Double-check server URLs and authentication headers in your configuration.

Next Steps

Once configured, you can: