Greptile
About
# 🚀 Greptile MCP Server - TypeScript Edition [](https://badge.fury.io/js/greptile-mcp-server) [](http://www.typescriptlang.org/) [![MCP…
Explore
- Zero-installation experience via NPX
- Natural language queries about codebases
- Deep code analysis and architecture understanding
- Cross-repository insights and comparisons
- Session continuity for progressive exploration
- Streaming support with Server-Sent Events
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
GreptileCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
- Node.js 18+ (for optimal performance)
- Greptile API Key - Get yours at app.greptile.com
- GitHub Token - Generate at github.com/settings/tokens with repo permissions
npx greptile-mcp-server --api-key=xxx --github-token=yyy
npx greptile-mcp-server init
Linux/macOS (Bash/Zsh):
Greptile API Key:
1. Visit Greptile Settings
2. Generate a new API key
3. Copy the key to your environment
GitHub Token:
1. Visit GitHub Settings > Personal Access Tokens
2. Create a "Fine-grained personal access token" for better security
3. Grant repo permissions for repositories you want to index
4. Copy the token to your environment
python -m src.main
npx greptile-mcp-server
Always test your configuration after setup:
npx greptile-mcp-server test
Problem: Server can't find your API keys
Solutions:
- Restart your terminal after setting permanent environment variables
- Verify environment variables are set:
Problem: Greptile API key is invalid or expired
Solutions:
- Get a new API key from Greptile Settings
- Verify the key is correctly copied (no extra spaces)
- Check if your API key has expired
- Run npx greptile-mcp-server init for interactive setup
- Run npx greptile-mcp-server test for detailed diagnostics
- Check the Greptile Documentation for API-specific issues
- Visit MCP Documentation for client integration help
A: No! The server runs via NPX with zero installation required. Just run npx greptile-mcp-server and it will download and run automatically.
A:
- .env files are great for local development - they only work in the directory where the file exists
- Environment variables are system-wide and work everywhere, making them better for global usage with npx
git clone https://github.com/greptile/mcp-server.git
cd mcp-server
npm install
- TypeScript: ES2022 target with strict mode
- Build Tool: tsup for dual ESM/CJS output
- Testing: Mocha + Chai with TypeScript support
- Code Quality: ESLint + Prettier with TypeScript rules
| Variable | Description | Default |
|----------|-------------|---------|
| GREPTILE_API_KEY | Greptile API key | Required |
| GITHUB_TOKEN | GitHub personal access token | Required |
| GREPTILE_BASE_URL | API base URL | https://api.greptile.com/v2 |
Create greptile.config.js:
javascriptexport default {
apiKey: process.env.GREPTILE_API_KEY,
githubToken: process.env.GITHUB_TOKEN,
repositories: [
{ remote: 'github', repository: 'owner/repo', branch: 'main' }
],
features: {
streaming: true,
orchestration: true,
flowEnhancement: true
}
};
Deploy instantly to Smithery with zero configuration:
bash
npm install -g smithery
smithery deploy
smithery deploy --config smithery.yaml
smithery status
smithery logs
bash
docker run -e GREPTILE_API_KEY=your_key \
-e GITHUB_TOKEN=your_token \
-p 8080:8080 \
greptile-mcp
```bash
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"greptile": {
"greptile": {
"command": "npx",
"args": [
"greptile-mcp-server"
],
"env": {
"GREPTILE_API_KEY": "your_api_key",
"GITHUB_TOKEN": "your_github_token"
}
}
}
}
}
McpServers
{
"greptile": {
"command": "npx",
"args": [
"greptile-mcp-server"
],
"env": {
"GREPTILE_API_KEY": "your_api_key",
"GITHUB_TOKEN": "your_github_token"
}
}
}
A modern, TypeScript-powered MCP (Model Context Protocol) server that provides AI-powered code search and querying capabilities through the Greptile API. Built with the official MCP SDK and designed for seamless integration with AI tools like Claude Desktop, Continue, and other MCP-compatible clients.
✨ Features
🔥 Zero-Installation Experience
```bashSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


