Prerequisite: Get your API key from app.greptile.com/settings/organization/api (Settings > Organization > API Keys)
Setup by IDE
- Claude Code (CLI)
- Cursor
- Claude Desktop
- VS Code
- Codex (CLI)
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:Verify Connection
Test your setup with curl:Troubleshooting
Server shows as disconnected
Server shows as disconnected
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)
Authentication failed
Authentication failed
Verify:
- API key was copied without extra spaces
- Your account has access to the repositories you’re querying
- API key hasn’t been revoked
No tools available
No tools available
Solutions:
- Restart your IDE completely
- Check server shows “Connected” or “Running” status
- Verify MCP is enabled in IDE settings
Tools return empty results
Tools return empty results
Check:
- You have repositories indexed with Greptile
- Your API key has access to those repositories
- There are actual Greptile comments on your PRs
Claude Desktop: GitHub token validation failed
Claude Desktop: GitHub token validation failed
Check:
- Token hasn’t expired
- Token was copied without extra spaces or missing characters
- Token has required scopes for the repositories you’re accessing
Claude Desktop: Failed to start server
Claude Desktop: Failed to start server
Check:
- Both
GREPTILE_API_KEYandGITHUB_TOKENare set in the config - The
greptile-mcp-serverpackage can be accessed via npx
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














