Skip to main content
Configure the Greptile MCP server in your IDE to access code review tools and custom context.
Prerequisite: Get your API key from app.greptile.com/settings/organization/api (Settings > Organization > API Keys)

Setup by IDE

1

Add Greptile MCP Server

Run the following command in your terminal:
Replace YOUR_GREPTILE_API_KEY with your actual API key.
2

Verify Installation

Check that the server was added:
You should see:
3

Start Using

Open Claude Code. The Greptile MCP tools are now available automatically.

Project-Level Configuration

For team-shared configuration, create a .mcp.json file in your project root:
Then set the environment variable:

Verify Connection

Test your setup with curl:
Expected response:

Troubleshooting

Check:
  • API key is correct and hasn’t expired
  • URL is exactly https://api.greptile.com/mcp
  • Authorization header format: Bearer YOUR_API_KEY (with Bearer prefix)
Fix: Restart your IDE after making configuration changes.
Verify:
  • API key was copied without extra spaces
  • Your account has access to the repositories you’re querying
  • API key hasn’t been revoked
Test: Use the curl command in the “Verify Connection” section above to verify your API key works.
Solutions:
  1. Restart your IDE completely
  2. Check server shows “Connected” or “Running” status
  3. Verify MCP is enabled in IDE settings
Check:
  • You have repositories indexed with Greptile
  • Your API key has access to those repositories
  • There are actual Greptile comments on your PRs
Check:
  • Token hasn’t expired
  • Token was copied without extra spaces or missing characters
  • Token has required scopes for the repositories you’re accessing
Fix: Generate a new token at github.com/settings/tokens
Check:
  • Both GREPTILE_API_KEY and GITHUB_TOKEN are set in the config
  • The greptile-mcp-server package can be accessed via npx
Fix: Verify your config file syntax is valid JSON

Configuration File Locations

Next Steps

Auto-Fix Workflow

Learn to resolve Greptile comments from your IDE

Tools Reference

Complete API documentation for all 11 tools