| title | MCP Compatibility |
|---|---|
| layout | default |
| parent | Architecture |
| nav_order | 3 |
This document outlines codetect's compatibility with MCP (Model Context Protocol) clients and plans for supporting other CLI-based LLM tools.
Model Context Protocol (MCP) is an open standard developed by Anthropic for connecting AI assistants to external tools and data sources. It provides a standardized way for LLM applications to:
- Discover available tools
- Call tools with structured inputs
- Receive structured outputs
codetect implements an MCP server that exposes code search capabilities via the stdio transport.
| Tool | Support Status | Notes |
|---|---|---|
| Claude Code | Fully supported | Primary target, tested extensively |
| Cursor | Should work | MCP support added late 2024 |
| Cline (VS Code) | Should work | Full MCP support |
| Continue | Should work | Open source IDE extension with MCP |
| Zed | Should work | Built-in MCP support |
- Claude Code on macOS with stdio transport
We welcome reports of codetect working with other MCP clients. Please open an issue or PR to add your configuration.
codetect uses the standard .mcp.json configuration format:
{
"mcpServers": {
"codetect": {
"command": "codetect",
"args": ["mcp"],
"cwd": "/path/to/your/project"
}
}
}Most MCP clients will automatically discover this configuration when placed in the project root.
cd /path/to/project
codetect init # Creates .mcp.json
codetect index # Index symbols
claude # Start Claude CodeCursor reads .mcp.json from the workspace root. After running codetect init, restart Cursor to pick up the configuration.
These VS Code extensions typically read MCP configuration from:
.mcp.jsonin workspace root- VS Code settings
codetect is currently MCP-only. Tools that don't support MCP cannot directly use it.
| Tool | MCP Support | Alternative Approach |
|---|---|---|
| OpenAI Codex CLI | No | Planned: HTTP API mode |
| Google Gemini CLI | No | Planned: HTTP API mode |
| Aider | No | Planned: CLI mode |
| GPT-Engineer | No | Planned: CLI mode |
We plan to expand codetect to support non-MCP tools through additional interfaces:
Add an HTTP server mode that exposes the same tools via REST API:
# Start HTTP server
codetect serve --port 8080
# Query via curl
curl -X POST http://localhost:8080/search_keyword \
-H "Content-Type: application/json" \
-d '{"query": "func main", "top_k": 5}'This would enable integration with any tool that can make HTTP requests.
Add direct CLI commands for querying:
# Direct CLI usage
codetect search "func main" --limit 5
codetect symbol Server --kind struct
codetect semantic "error handling logic"This would allow tools to shell out to codetect directly.
LSP integration could provide IDE-native symbol search and navigation, complementing the MCP interface.
We welcome contributions to expand tool support:
- Testing with MCP clients: Report which clients work with codetect
- HTTP API implementation: Help build the REST interface
- CLI query mode: Help build direct CLI commands
- Documentation: Add setup guides for specific tools
See CONTRIBUTING.md for guidelines.