Prerequisite: Get your API key from app.greptile.com/settings/api
Setup by IDE
- Cursor
- Claude Code (CLI)
- VS Code
1
Open Settings
Click the ‘Settings’ icon or press
Ctrl + Shift + J (Windows/Linux) or Cmd + Shift + J (macOS).2
Go to Tools & MCP
Click Tools & MCP in the left sidebar.

3
Add Custom MCP
Click Add Custom MCP.

4
Configure mcp.json
Add the following configuration:Replace
YOUR_GREPTILE_API_KEY with your actual API key. Save the file.5
Verify Connection
Return to Tools & MCP. You should see Greptile with all 11 tools enabled.

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
Configuration File Locations
| IDE | Config File |
|---|---|
| Claude Code | ~/.mcp.json or project .mcp.json |
| Cursor | ~/.cursor/mcp.json |
| VS Code | ~/.config/Code/User/mcp.json (Linux)~/Library/Application Support/Code/User/mcp.json (macOS) |



