Skip to main content
Glama
Relace MCP Server

Relace MCP Server

by possible055

비공식 Relace MCP 서버

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

비공식 — 개인 프로젝트이며, Relace와는 관련이 없습니다.

AI로 구축됨 — 전적으로 AI 지원(Antigravity, Codex, Cursor, Github Copilot, Windsurf)을 받아 개발되었습니다.

AI 기반 코드 편집 및 지능형 코드베이스 탐색 도구를 제공하는 MCP 서버입니다.

이전

agentic_search + fast_apply 사용 시

수동 grep, 관련 파일 누락

자연어로 질문하여 정확한 위치 파악

편집 시 다른 곳의 import 깨짐

import 및 호출 체인 추적

전체 재작성으로 토큰 소모

변경 사항 설명, 줄 번호 불필요

줄 번호 오류로 코드 손상

10,000+ 토큰/초 병합

주요 기능

  • Fast Apply — Relace API를 통해 10,000+ 토큰/초의 속도로 코드 편집 적용

  • Agentic Search — 자연어 쿼리를 통한 에이전트형 코드베이스 탐색

  • Agentic Retrieval — 하이브리드 의미론적 힌트 + 실시간 코드 탐색, 오래된 힌트 지원 및 명시적 클라우드 유지 관리 (MCP_SEARCH_RETRIEVAL=1로 활성화; MCP_RETRIEVAL_BACKEND로 백엔드 선택)

  • Cloud Search — 클라우드 동기화 저장소에 대한 의미론적 코드 검색

Related MCP server: code-context

빠른 시작

필수 조건: uv, git, ripgrep (권장)

relace 백엔드(기본값) 사용: Relace 대시보드에서 API 키를 가져온 후 MCP 클라이언트에 추가하세요:

~/.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 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

~/.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"
      }
    }
  }
}

.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/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"

설정

변수

필수

설명

RELACE_API_KEY

✅*

Relace 대시보드의 API 키; Relace 제공자 및 클라우드 도구에 필수

MCP_SEARCH_RETRIEVAL

❌

agentic_retrieval 도구를 등록하려면 1로 설정

MCP_RETRIEVAL_BACKEND

❌

의미론적 검색 백엔드: relace (기본값), codanna, chunkhound, 또는 none

MCP_RETRIEVAL_HINT_POLICY

❌

검색 힌트 정책: prefer-stale (기본값) 또는 strict

MCP_BACKGROUND_INDEX_MONITOR

❌

로컬 인덱스에 대한 주기적 새로고침 모니터링 활성화; 고정된 MCP_BASE_DIR 및 로컬 백엔드 필요

MCP_BACKGROUND_INDEX_INTERVAL_SECONDS

❌

로컬 인덱스 모니터링 주기(초) (기본값: 300)

MCP_BACKGROUND_INDEX_INITIAL_DELAY_SECONDS

❌

첫 번째 로컬 인덱스 확인 전 초기 지연 시간(초) (기본값: 30)

MCP_SEARCH_TURN_STATUS_MODE

❌

턴 상태 사용자 메시지 정책: always (기본값), final-only, 또는 off

SEARCH_BASH_TOOLS

❌

검색 중 bash 활성화: 1 (켜짐, 기본값), 0 (꺼짐)

SEARCH_LSP_TOOLS

❌

LSP 지원 검색 활성화: 1 (켜짐), 0 (꺼짐, 기본값)

MCP_BASE_DIR

❌

프로젝트 루트 재정의 (MCP Roots → Git → 작업 공간 저장소 → CWD를 통해 자동 감지)

MCP_LOGGING

❌

파일 로깅: off (기본값), safe, full

MCP_DOTENV_PATH

❌

중앙 집중식 설정을 위한 .env 파일 경로

* 다음 두 가지 조건이 모두 충족될 경우 선택 사항: (1) APPLY_PROVIDER 및 SEARCH_PROVIDER가 Relace가 아닌 제공자일 경우, (2) MCP_RETRIEVAL_BACKEND가 codanna, chunkhound, 또는 none일 경우.

.env 사용법, 인코딩 설정, 사용자 지정 LLM 제공자 등에 대한 자세한 내용은 docs/advanced.md를 참조하세요.

도구

항상 사용 가능: fast_apply, agentic_search. agentic_retrieval은 MCP_SEARCH_RETRIEVAL=1이 필요합니다. 클라우드 도구는 MCP_RETRIEVAL_BACKEND=relace일 때만 사용 가능합니다. index_status는 relace, codanna, chunkhound에서 사용 가능하며 MCP_RETRIEVAL_BACKEND=none일 때는 숨겨집니다.

MCP 기본 검색 인터페이스 사용: 도구는 list_tools(), 리소스는 list_resources()를 사용하세요.

자세한 매개변수는 docs/tools.md를 참조하세요.

언어 지원

LSP 도구는 시스템에 설치된 외부 언어 서버를 사용합니다.

언어

언어 서버

설치 명령어

Python

basedpyright

(번들 포함)

TypeScript/JS

typescript-language-server

npm i -g typescript-language-server typescript

Go

gopls

go install golang.org/x/tools/gopls@latest

Rust

rust-analyzer

rustup component add rust-analyzer

대시보드

작업 모니터링을 위한 실시간 터미널 UI.

pip install relace-mcp[tools]
relogs

자세한 사용법은 docs/dashboard.md를 참조하세요.

벤치마크

Loc-Bench 코드 로컬라이제이션 데이터셋을 사용하여 agentic_search 성능을 평가합니다.

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

# Build dataset from Hugging Face
uv run --extra benchmark python -m benchmark.cli.build_locbench --output artifacts/data/raw/locbench_v1.jsonl

# Run evaluation
uv run --extra benchmark python -m benchmark.cli.run --dataset artifacts/data/raw/locbench_v1.jsonl --limit 20

모든 벤치마크 아티팩트는 benchmark/.data/ 아래에 기록됩니다.

그리드 검색, 분석 도구 및 지표 해석에 대해서는 docs/benchmark.md를 참조하세요.

플랫폼 지원

플랫폼

상태

참고

Linux

✅ 완벽 지원

기본 개발 플랫폼

macOS

✅ 완벽 지원

모든 기능 사용 가능

Windows

⚠️ 부분 지원

bash 도구 사용 불가; 전체 기능을 사용하려면 WSL 권장

문제 해결

오류 또는 메시지

해결 방법

RELACE_API_KEY is required ...

Relace 제공자나 클라우드 도구 사용 시 RELACE_API_KEY 설정

NEEDS_MORE_CONTEXT

대상 블록 근처에 1-3개의 고유한 앵커 라인 포함

INVALID_PATH

경로가 존재하며 MCP_BASE_DIR 또는 허용된 추가 경로 내에 있는지 확인

FILE_TOO_LARGE

파일이 10MB를 초과함; 변경 사항을 더 작은 파일이나 편집으로 분할

ENCODING_ERROR

UTF-8이 아닌 프로젝트의 경우 RELACE_DEFAULT_ENCODING을 명시적으로 설정

AUTH_ERROR

API 키 및 제공자 설정 확인

RATE_LIMIT

나중에 다시 시도하거나 요청 볼륨을 줄임

NETWORK_ERROR / TIMEOUT_ERROR

네트워크 액세스 확인 후 다시 시도

APPLY_NOOP

병합이 diff를 생성할 수 있도록 더 구체적인 앵커나 구체적인 새 라인 추가

MARKER_LEAKAGE

자리 표시자 마커가 예상되는 리터럴 출력이 아닌 자리 표시자로만 사용되는지 확인

TRUNCATION_DETECTED

삭제가 많은 대규모 편집을 분할하거나 명시적인 제거 지시어 사용

BLAST_RADIUS_EXCEEDED

변경 사항을 더 작고 국소적인 편집으로 분할

개발

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

라이선스

MIT

Available Tools

7 tools
cloud_clearA
Destructive

Delete cloud repository and local sync state. IRREVERSIBLE.

Removes all indexed data from Relace Cloud. Use cloud_list to find repo IDs.

Inputs: confirm, repo_id. Returns: object

cloud_listA
Read-onlyIdempotent

[ADMIN] List all repositories in your Relace Cloud account.

Use to find repo_id for cloud_clear. Not needed for normal search/sync workflow. Returns repository IDs, names, and indexing status.

Inputs: no named parameters. Returns: object

cloud_syncA
Idempotent

Upload or refresh codebase to Relace Cloud for semantic search.

Check index_status() first—skip this if cloud freshness is already 'fresh'. Syncs git-tracked files to enable cloud_search. Incremental by default.

Advanced (Relace-specific): force=True Re-upload all files; use after large refactors. force=True+mirror=True Delete cloud files absent locally; use after branch switch.

Returns: {sync_mode (str), files_created (int), files_updated (int), files_deleted (int), files_unchanged (int), warnings (list[str]), repo_id (str), repo_head (str)}. Check warnings[] for truncation or suppressed deletes. Fails if not in a git repo or RELACE_API_KEY is not set.

Inputs: force, mirror. Returns: object

fast_applyA
Destructive

Edit or create a file using intelligent merging.

For new files: writes content directly. For existing files: merges edit_snippet with current content using anchor lines. Anchor lines are verbatim lines copied from the existing file that help locate the exact edit target. Include 1-2 unique lines adjacent to the change. Truncation markers are recommended for larger scoped edits but not required. Markdown files keep fenced code blocks verbatim; outer fence stripping is skipped for .md/.mdx targets.

On error, the response includes a code field:

  • NEEDS_MORE_CONTEXT: merge model could not locate the target - add 1-2 unique anchor lines from immediately around the edit location.

  • APPLY_NOOP: merge returned an identical file even though the snippet contained explicit remove directives or concrete new lines not present in the original.

  • BLAST_RADIUS_EXCEEDED: edit scope too large - split into smaller edits.

  • MARKER_LEAKAGE: placeholder marker text leaked into merged output (treated as literal text).

  • TRUNCATION_DETECTED: merged output shrank drastically and no explicit remove directive was provided.

On success: {status: "ok", diff: str | None (unified diff, None for new files or no-op)}.

Do NOT use this tool to delete files or clear file contents. Use a dedicated file management tool for those operations.

Inputs: path (required), edit_snippet (required), instruction. Returns: object

index_statusA
Read-onlyIdempotent

Inspect the single active indexing backend in read-only mode.

Use this before retrieval when you need to know whether the active backend is fresh and whether semantic hints are usable. Returns active_backend, a single backend status object with freshness and hints_usable, and background_monitor (state, reason). This tool never refreshes indexes; if active_backend is relace and backend.status.needs_sync is true, run cloud_sync().

Inputs: no named parameters. Returns: trace_id, active_backend, base_dir, base_dir_source, +3 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with descriptions that explicitly differentiate similar tools (e.g., agentic_search vs cloud_search based on query type). There is no functional overlap.

    Naming Consistency3/5

    Cloud operations use a consistent 'cloud_' prefix, but 'agentic_search', 'fast_apply', and 'index_status' break the pattern. Mix of verb_noun and adjective_noun styles reduces predictability.

    Tool Count5/5

    Seven tools is well-scoped for a code search and editing server. Each tool addresses a specific need without redundancy or excessive complexity.

    Completeness3/5

    Covers search (local and cloud) and file editing, but lacks tools for reading full file content, deleting files, or managing local files beyond edits. Users may need to rely on external tools for basic operations.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      Provides AI-powered code intelligence for any codebase using local LLMs and vector search, enabling semantic code search, pattern analysis, and context-optimized code generation with 90% token savings.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI coding assistants to automatically scan, store, and query API endpoints from codebases, providing instant lookup and semantic search to reduce context switching and token consumption.
      1
      MIT
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Make any LLM a codebase expert instantly. Provides deep code intelligence through semantic search, architecture mapping, security analysis, and smart context that fits perfectly in token windows.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides structured, token-efficient code context for AI assistants by indexing codebases with AST-level analysis, supporting 17+ languages, enabling semantic search, call-site tracking, and PR attribution.
      70 PyPI
      52
      MIT