The Relace MCP Server provides AI-powered code editing and intelligent codebase search through Relace's API, integrating with MCP-compatible editors like Cursor, Claude Code, Windsurf, VS Code, and Codex CLI.
Core Capabilities:
Fast Code Editing (
fast_apply) - Apply code changes at 10,000+ tokens/sec to existing or new files with intelligent context-aware merging and smart truncation placeholdersAgentic Local Search (
fast_search) - Explore codebases using natural language queries with an autonomous agent that uses grep, ls, and file viewing tools
Cloud Capabilities (requires RELACE_CLOUD_TOOLS=1):
Cloud Synchronization (
cloud_sync) - Upload local codebases to Relace Cloud for semantic indexing with incremental, safe full, and mirror full sync modesSemantic Search (
cloud_search) - Perform AI-powered semantic code search using embeddings and reranking to find conceptually related code without exact keyword matchesRepository Management - List repositories (
cloud_list), check sync status (cloud_info), and delete repositories with local state cleanup (cloud_clear)
Key Features:
Automatic project root detection via MCP Roots or Git
Cross-platform support (Linux, macOS, Windows via WSL for full features)
Respects
.gitignoreduring cloud syncConfigurable via environment variables or
.envfilesOptional file logging to platform-specific directories
Custom encoding support for legacy repositories
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Relace MCP Serversearch for authentication middleware in the codebase"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Unofficial Relace MCP Server
Unofficial — Personal project, not affiliated with Relace.
Built with AI — Developed entirely with AI assistance (Antigravity, Codex, Cursor, Github Copilot, Windsurf).
MCP server providing AI-powered code editing and intelligent codebase exploration tools.
Without | With |
Manual grep, misses related files | Ask naturally, get precise locations |
Edits break imports elsewhere | Traces imports and call chains |
Full rewrites burn tokens | Describe changes, no line numbers |
Line number errors corrupt code | 10,000+ tokens/sec merging |
Features
Fast Apply — Apply code edits at 10,000+ tokens/sec via Relace API
Agentic Search — Agentic codebase exploration with natural language queries
Agentic Retrieval — Two-stage semantic + agentic code retrieval (requires
MCP_SEARCH_RETRIEVAL=1)Cloud Search — Semantic code search over cloud-synced repositories
Quick Start
Prerequisites: uv, git, ripgrep (recommended)
Using Relace (default) or RELACE_CLOUD_TOOLS=1: get your API key from Relace Dashboard, then add to your MCP client:
~/.cursor/mcp.json
~/.codeium/windsurf/mcp_config.json
.vscode/mcp.json
~/.codex/config.toml
Configuration
Variable | Required | Description |
| ✅* | API key from Relace Dashboard |
| ❌ | Set to |
| ❌ | Set to |
| ❌ | LSP tools: |
| ❌ | Project root (auto-detected via MCP Roots → Git → CWD) |
| ❌ | File logging: |
| ❌ | Path to |
* Optional if both: (1) APPLY_PROVIDER and SEARCH_PROVIDER are non-Relace providers, and (2) RELACE_CLOUD_TOOLS=false.
For .env usage, encoding settings, custom LLM providers, and more, see docs/advanced.md.
Tools
Core tools (fast_apply, agentic_search) are always available. Cloud tools require RELACE_CLOUD_TOOLS=1. agentic_retrieval requires MCP_SEARCH_RETRIEVAL=1.
For detailed parameters, see docs/tools.md.
Language Support
LSP tools use external language servers installed on your system.
Language | Language Server | Install Command |
Python | basedpyright | (bundled) |
TypeScript/JS | typescript-language-server |
|
Go | gopls |
|
Rust | rust-analyzer |
|
Dashboard
Real-time terminal UI for monitoring operations.
For detailed usage, see docs/dashboard.md.
Benchmark
Evaluate agentic_search performance using the Loc-Bench code localization dataset.
For grid search, analysis tools, and metrics interpretation, see docs/benchmark.md.
Platform Support
Platform | Status | Notes |
Linux | ✅ Fully supported | Primary development platform |
macOS | ✅ Fully supported | All features available |
Windows | ⚠️ Partial |
|
Troubleshooting
Error | Solution |
| Set the key in your environment or MCP config |
| Include 1–3 anchor lines before/after target block |
| File exceeds 10MB; split file |
| Set |
| Verify API key is valid and not expired |
| Too many requests; wait and retry |
| Check network connection or increase timeout setting |
| File path doesn't exist or no permission; verify path and access rights |
| Invalid edit_snippet format; ensure placeholder syntax is correct |
| No search results; try broader query or run |
| Repository not synced to Relace Cloud; run |
| Edit conflict; file was modified, re-read before editing |
Development
License
MIT