Skip to main content
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.
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.
2

Open Cursor Settings

Go to Settings → Features → Model 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.

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 or Cursor after configuration changes.
2

Check API Key

Test your API key with curl:
curl -H "Authorization: Bearer YOUR_GREPTILE_API_KEY" https://api.greptile.com/mcp
3

Verify Configuration

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

Next Steps

Once configured, you can:
⌘I