Relace MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| RELACE_API_KEY | Yes | API key from Relace Dashboard (https://app.relace.ai/settings/billing) | |
| RELACE_LOGGING | No | Enable file logging (set to 1 to enable) | 0 |
| RELACE_BASE_DIR | No | Absolute path to project root (auto-detected via MCP Roots or Git if not set) | |
| RELACE_TIMEOUT_SECONDS | No | Timeout for API requests in seconds | |
| RELACE_DEFAULT_ENCODING | No | Force file encoding (e.g., gbk, big5) for legacy repos | |
| RELACE_ENCODING_SAMPLE_LIMIT | No | Max files for auto-detecting encoding | 30 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| fast_applyA | 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:
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. |
| agentic_searchA | Search codebase for code locations matching a query. Use when you know the name or structure you're looking for — function names, class names, modules, or how components connect. For conceptual/behavioral queries without known identifiers, use agentic_retrieval instead. Returns file paths with line ranges and an explanation of findings. Keys: explanation (str), files (dict[path → {lines, snippet}]), turns_used (int). |
| index_statusA | 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 |
| cloud_syncA | 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. |
| cloud_searchA | Search for code by meaning using AI embeddings. Requires cloud_sync first. Use for conceptual queries where you don't know the exact file, class, or function name. Prefer agentic_search when you know the exact identifier or symbol name. Prerequisite: cloud_sync must have been run at least once. Fails if RELACE_API_KEY is not set or no sync state exists. Returns: {results (list), result_count (int), warnings (list[str]), query (str), branch (str), repo_id (str)}. Check warnings[] for stale index alerts (e.g., uncommitted local changes). |
| cloud_clearA | Delete cloud repository and local sync state. IRREVERSIBLE. Removes all indexed data from Relace Cloud. Use cloud_list to find repo IDs. |
| cloud_listA | [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. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| cloud_status | Current cloud sync status — lightweight, reads local state file only (no API calls). For dashboard/UI display. Agents should use the index_status tool instead, which covers Relace, Codanna, and ChunkHound backends with recommended_action. |
TDQS
Scored across 7 tools
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.
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.
Seven tools is well-scoped for a code search and editing server. Each tool addresses a specific need without redundancy or excessive complexity.
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.