
granicil
Servidor MCP de Greptile - servidor de protocolo de contexto múltiple para Greptile
1
Github Watches
0
Github Forks
0
Github Stars
Greptile MCP Server
A WebSocket-based server that enables real-time code search and indexing capabilities across multiple repositories. It acts as a middleware between clients and the Greptile API, providing enhanced functionality for managing multiple search contexts and streaming results.
Features
- 🔌 WebSocket Server: Real-time communication with connection management and heartbeat mechanism
- 👥 Agent Management: Create and manage agent instances for different repositories
- 🔍 Repository Integration: Support repository indexing through Greptile API
- 🔎 Query Processing: Process and validate search queries with streaming results
- 🔐 Security: Secure WebSocket connections with API key authentication
- ⚙️ Configuration: Environment-based configuration with custom API endpoints
- 📊 Monitoring: Comprehensive logging system with performance metrics
- 📚 Client SDK: WebSocket client implementation with connection management
Installation
# Clone the repository
git clone https://github.com/yourusername/greptile-mcp.git
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Start the server
npm start
Environment Variables
# Server Configuration
PORT=3000
HOST=0.0.0.0
NODE_ENV=production
# Greptile API Configuration
GREPTILE_API_KEY=your-api-key
GITHUB_TOKEN=your-github-token
GREPTILE_BASE_URL=https://api.greptile.com/v2
# Authentication Configuration
AUTH_ENABLED=false
API_KEY=your-api-key-here
TOKEN_HEADER_NAME=X-API-Key
# Rate Limiting Configuration
RATE_LIMIT_ENABLED=true
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX=100
# Logging Configuration
LOG_LEVEL=info
LOG_FORMAT=combined
Usage
Creating an Agent
curl -X POST http://localhost:3000/api/agents \
-H "Content-Type: application/json" \
-d '{
"name": "Demo Agent",
"description": "Testing agent",
"repositoryUrl": "https://github.com/facebook/react",
"branch": "main"
}'
WebSocket Connection
import WebSocket from 'ws';
const ws = new WebSocket('ws://localhost:3000');
const agentId = 'your-agent-id';
ws.on('open', () => {
// Register the connection
ws.send(JSON.stringify({
type: 'register',
agentId: agentId
}));
});
ws.on('message', (data) => {
const message = JSON.parse(data.toString());
console.log('Received:', message);
});
Querying Code
// After registration
ws.send(JSON.stringify({
type: 'query',
query: 'Find function main',
options: {
stream: true,
maxResults: 5,
includeContext: true
}
}));
Development
# Run in development mode
npm run dev
# Run tests
npm test
# Run linting
npm run lint
# Build for production
npm run build
Testing
The project includes comprehensive tests:
# Run all tests
npm test
# Run specific test file
npm test -- tests/server.test.js
# Run with coverage
npm run test:coverage
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Greptile API for providing the core search functionality
- ws for the WebSocket implementation
- All contributors who have helped with the project
相关推荐
I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.
I find academic articles and books for research and literature reviews.
Confidential guide on numerology and astrology, based of GG33 Public information
Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.
Advanced software engineer GPT that excels through nailing the basics.
Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.
Converts Figma frames into front-end code for various mobile frameworks.
Take an adjectivised noun, and create images making it progressively more adjective!
Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.
La aplicación AI de escritorio todo en uno y Docker con trapo incorporado, agentes de IA, creador de agentes sin código, compatibilidad de MCP y más.
Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx
Plataforma de automatización de flujo de trabajo de código justo con capacidades de IA nativas. Combine el edificio visual con código personalizado, auto-anfitrión o nube, más de 400 integraciones.
🧑🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.
Espejo dehttps: //github.com/agentience/practices_mcp_server
Una lista curada de servidores de protocolo de contexto del modelo (MCP)
Reviews

user_rBcOGVIp
I've been using Greptile by sosacrazy126 for a while now, and it has completely transformed the way I handle my projects. The tool is incredibly efficient and user-friendly, making data manipulation a breeze. Highly recommend checking it out on GitHub!