MCP Hub
Back to servers

relace-mcp

An unofficial MCP server for Relace.ai that provides high-speed automated code editing and agent-based codebase exploration using natural language.

Stars
18
Forks
2
Tools
4
Updated
Jan 6, 2026
Validated
Jan 9, 2026

English | 简体中文

Unofficial Relace MCP Server

PyPI Python 3.11+ License: MIT 100% AI-Generated OpenSSF Scorecard

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.

WithoutWith fast_search + fast_apply
Manual grep, misses related filesAsk naturally, get precise locations
Edits break imports elsewhereTraces imports and call chains
Full rewrites burn tokensDescribe changes, no line numbers
Line number errors corrupt code10,000+ tokens/sec merging

Features

  • Fast Apply — Apply code edits at 10,000+ tokens/sec via Relace API
  • Fast Search — Agentic codebase exploration with natural language queries
  • Cloud Sync — Upload local codebase to Relace Cloud for semantic search
  • Cloud Search — Semantic code search over cloud-synced repositories
  • Dashboard — Real-time terminal UI for monitoring operations

Quick Start

Prerequisites: uv, git, ripgrep (recommended)

Get your API key from Relace Dashboard, then add to your MCP client:

Cursor

~/.cursor/mcp.json

{
  "mcpServers": {
    "relace": {
      "command": "uv",
      "args": ["tool", "run", "relace-mcp"],
      "env": {
        "RELACE_API_KEY": "rlc-your-api-key",
        "MCP_BASE_DIR": "/absolute/path/to/your/project"
      }
    }
  }
}
Claude Code
claude mcp add relace \
  --env RELACE_API_KEY=rlc-your-api-key \
  --env MCP_BASE_DIR=/absolute/path/to/your/project \
  -- uv tool run relace-mcp
Windsurf

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "relace": {
      "command": "uv",
      "args": ["tool", "run", "relace-mcp"],
      "env": {
        "RELACE_API_KEY": "rlc-your-api-key",
        "MCP_BASE_DIR": "/absolute/path/to/your/project"
      }
    }
  }
}
VS Code

.vscode/mcp.json

{
  "mcp": {
    "servers": {
      "relace": {
        "type": "stdio",
        "command": "uv",
        "args": ["tool", "run", "relace-mcp"],
        "env": {
          "RELACE_API_KEY": "rlc-your-api-key",
          "MCP_BASE_DIR": "${workspaceFolder}"
        }
      }
    }
  }
}
Codex CLI

~/.codex/config.toml

[mcp_servers.relace]
command = "uv"
args = ["tool", "run", "relace-mcp"]

[mcp_servers.relace.env]
RELACE_API_KEY = "rlc-your-api-key"
MCP_BASE_DIR = "/absolute/path/to/your/project"

Configuration

VariableRequiredDescription
RELACE_API_KEYAPI key from Relace Dashboard
RELACE_CLOUD_TOOLSSet to 1 to enable cloud tools
MCP_BASE_DIRProject root (auto-detected via MCP Roots → Git → CWD)
MCP_LOGGINGSet to 1 to enable file logging
MCP_DOTENV_PATHPath to .env file for centralized config

For .env usage, encoding settings, custom LLM providers, and more, see docs/advanced.md.

Tools

Core tools (fast_apply, fast_search) are always available. Cloud tools require RELACE_CLOUD_TOOLS=1.

For detailed parameters, see docs/tools.md.

Dashboard

Real-time terminal UI for monitoring operations.

pip install relace-mcp[tools]
relogs

For detailed usage, see docs/dashboard.md.

Platform Support

PlatformStatusNotes
Linux✅ Fully supportedPrimary development platform
macOS✅ Fully supportedAll features available
Windows⚠️ Partialbash tool unavailable; use WSL for full functionality

Troubleshooting

ErrorSolution
RELACE_API_KEY is not setSet the key in your environment or MCP config
NEEDS_MORE_CONTEXTInclude 1–3 anchor lines before/after target block
FILE_TOO_LARGEFile exceeds 1MB; split or increase limit
ENCODING_ERRORSet RELACE_DEFAULT_ENCODING explicitly
AUTH_ERRORVerify API key is valid and not expired
RATE_LIMITToo many requests; wait and retry

Development

git clone https://github.com/possible055/relace-mcp.git
cd relace-mcp
uv sync --extra dev
uv run pytest

License

MIT

Reviews

No reviews yet

Sign in to write a review