scythe-context-mcp
Scythe Context MCP helps coding agents index and search a local repository to find relevant files, line ranges, snippets, and related code.
Check configuration, metadata, embedding coverage, and index freshness (
repo_index_status).Rebuild/update repository metadata, optionally with dry-run or Gemini embedding indexing (
repo_reindex).Run task-oriented code lookup for unknown file locations, defaulting to paths-only, with keyword/hybrid/semantic modes and related-file expansion (
repo_context_pack).Debug/rank search results across keyword, hybrid, or semantic modes with compact/snippet output (
repo_semantic_search).Inspect one indexed file’s symbols, imports, and reverse imports (
repo_related_files).Diagnose runtime, native modules, config, WSL interop, and index health without external API calls (
repo_doctor).Test the configured Gemini-compatible embedding endpoint with supplied text (
gemini_embedding_probe).Use local keyword search without an API key; hybrid/semantic search can send queries/chunks to Gemini if configured.
Integrates with Google's Gemini API for generating embeddings used in semantic search and context packing within code repositories.
Click on "Deploy 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., "@scythe-context-mcp find where auth token validation is handled"
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.
Scythe Context MCP
No longer maintained — 2026-10-19. Development and releases have ended. This public archive preserves the source, historical usage instructions and evaluation results. The evaluations did not establish a general speed or token-saving advantage over
rg. See the final larger TypeScript evaluation. Existing npm versions remain available for reference; the installation instructions below describe the historical setup.
Scythe Context MCP helps coding agents find relevant code and trace symbols, imports, and reverse imports. It returns file paths, line ranges, and selected snippets through CLI + Skill or MCP. Local keyword search works without an API key; semantic search is optional.
When to use it
What you need | Start with |
A known file, exact identifier, error message, or regular expression | Direct file reads or |
Ranked matches and related-file context in an unfamiliar repository | Scythe keyword search and navigation. |
Relevant code may use different wording from your description | Optional hybrid search with embeddings. |
Keyword search depends on matching terms. Scythe's additional value is ranking and cross-file context; it is not a replacement for every rg lookup.
Related MCP server: ragbox-mcp
Choose an interface
Both interfaces ship in the same scythe-context-mcp npm package. Choose either, or use both.
Interface | Use it when | Search default |
CLI + Skill | Your agent runs shell commands and loads skills, or you search from a terminal. | Local |
MCP | Your client uses MCP tools. |
|
Scythe requires Node.js >=24.11.0 <27; Node.js 24 is the tested baseline. Your target repository does not need Node.js. Install and run Scythe in the same environment as its files; see Windows, WSL, Linux, and macOS setup.
Quick start
CLI + Skill
1. Install the CLI and search your repository. Replace the path and query with your own repository and relevant terms:
cd /absolute/path/to/your/repo
npm install -g scythe-context-mcp@0.1.24
scythe-context index
scythe-context context "auth token" --format compact --max-results 1The example limits results to one with --max-results 1 for display; remove that option to return more matches.
index writes local metadata to .scythe-context/; it does not request embeddings. Refresh it after source changes. The terminal commands work without installing a Skill.
2. Install the Skill for your agent. Locate the global npm package directory:
npm root -gInside that directory, install the entire scythe-context-mcp/skills/scythe-context/ folder using your agent's skill installer, or copy it into the agent's configured skill directory. It teaches the agent when to use rg, Scythe, and embeddings. npm installation or upgrades do not install or refresh this separate copy. See client-specific Skill locations and invocation.
MCP
Codex configuration example. For Claude Code and Antigravity CLI, see client-specific MCP registration.
For Codex on Linux, macOS, or WSL, add the following to ~/.codex/config.toml (or your configured Codex home), then restart the client. For native Windows or Windows App + WSL, use the platform setup guide.
[mcp_servers.scythe_context]
command = "npx"
args = ["-y", "scythe-context-mcp"]Ask the agent to execute these MCP tool calls, not shell commands. Replace the path; reindex only when metadata is missing/stale:
repo_index_status({ "project_path": "/absolute/path/to/your/repo" })
repo_reindex({ "project_path": "/absolute/path/to/your/repo", "dry_run": false, "index_embeddings": false })
repo_context_pack({ "project_path": "/absolute/path/to/your/repo", "query": "auth token", "mode": "keyword" })This example stays local by explicitly selecting keyword. If setup fails, use repo_doctor and troubleshooting.
What a result looks like
Actual CLI output from a two-file src/auth.ts / src/app.ts example, using the command above; the project path is normalized. Results depend on your repository:
Project: /absolute/path/to/your/repo
Mode: keyword
src/auth.ts:1-3
keyword/path match
export function validateToken(token: string) {
return token.length > 0;
}
Related: src/auth.ts (source)
Related: src/app.ts (source)
Suggested: src/auth.ts
Suggested: src/app.tsThe agent can read the returned ranges and follow related files. See the command and output reference for search, related, status, doctor, JSON, budgets, and saved results.
Language support
Text search works on supported text files. Structure and local navigation cover:
Language | Navigation coverage |
JS / TS | Declarations, relative imports, config aliases/inheritance, explicit project references, declared workspace source exports. |
Python | Declarations, flat/ |
Go | Declarations and packages in the nearest |
Rust | Declarations, Cargo file modules, anchored paths, literal library/binary target roots. |
C# | Namespace/type/common method declarations and literal |
C++ | Namespace/type/common function declarations and exact file-relative quoted includes. |
No target-language compiler or SDK is required. Navigation uses conservative source parsing, with language-specific limits; see language support and config-driven navigation. Older installs should read index upgrade notes.
Optional: embeddings
Use keyword first when likely source terms are known. When wording differences make local results insufficient, hybrid combines keyword and vector retrieval; semantic uses vectors alone. The Skill guides initial vector creation and updates when useful and within the task's authorized scope.
Embeddings require a Gemini-compatible endpoint. Vector indexing sends code chunks; hybrid/semantic queries send query text when matching code vectors exist. Provider charges may apply. Without matching vectors, hybrid falls back locally and semantic errors before sending a query. CLI defaults to keyword; MCP defaults to hybrid.
See semantic search, credentials, updates, and privacy. An API key alone neither creates vectors nor enables automatic CLI mode switching.
Limits and privacy
Indexes need refreshing after edits; there is no automatic watcher. Related files are navigation hints, not compiler binding or a complete runtime call graph.
Exclude private files with the root
.gitignore. Keep.scythe-context/, legacy.repo-beacon/,.env, andlocal/out of version control.Retrieval benchmarks do not establish faster agent task completion or lower total token use. See the benchmark and task A/B protocol (Traditional Chinese).
More information
Available Tools
7 toolsgemini_embedding_probeGemini Embedding ProbeB
Send one embedding request and return diagnostics for official Gemini or proxy compatibility.
Inputs: text (required), project_path, response_mode.
repo_context_packRepo Context PackB
Preferred task-oriented code lookup for unknown file locations. Defaults to paths_only; use compact for short snippets and snippets for ranking/debug detail. Set mode=keyword for local lookup without embedding requests.
Inputs: query (required), mode, max_results, project_path, +11 more.
repo_doctorRepo DoctorB
Run local diagnostics for runtime, native modules, config, WSL interop, and index health without calling embedding APIs.
Inputs: project_path, response_mode.
repo_index_statusRepo Index StatusC
Show Scythe Context configuration and current index status.
Inputs: project_path, response_mode.
repo_reindexRepo ReindexC
Scan a project, write metadata, and optionally index embeddings.
Inputs: dry_run, project_path, response_mode, max_file_bytes, +6 more.
repo_semantic_searchRepo Semantic SearchA
Debug raw semantic or hybrid ranking over indexed chunks. Prefer repo_context_pack for normal lookup; use paths_only to scout cheaply and snippets only when scores or fuller snippets are needed.
Inputs: query (required), mode, max_results, project_path, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools have clearly distinct purposes, with explicit guidance that repo_context_pack is preferred for normal lookup and repo_semantic_search is for debugging rankings. The main possible confusion is between the two lookup tools, and secondarily between repo_doctor and gemini_embedding_probe, but descriptions mitigate this well.
All names use snake_case, and six of seven share a repo_ prefix, creating a mostly predictable pattern. The exception is gemini_embedding_probe, and the names mix noun phrases with action-oriented labels, preventing a perfect score.
With 7 tools, the set is well-scoped for a context/indexing MCP server. Each tool has a clear role spanning diagnostics, indexing, status, search, and related-file lookup without obvious redundancy.
The server covers diagnostics, indexing lifecycle, status, semantic search, context packing, and related-file inspection, which addresses the core workflows. Minor gaps exist, such as no explicit index deletion/reset or project listing tool, but agents can likely work around them.
Maintenance
Related MCP Connectors
Shared memory for coding agents. Stop re-explaining your codebase every session.
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
The context platform for AI agents: code search, team decisions, and grounded project context.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables semantic and keyword search over a local codebase by chunking source files along function and class boundaries, embedding them offline, and fusing vector and BM25 results. Runs entirely on your machine in a single SQLite file, so AI coding agents can find relevant code with no API keys, telemetry, or cloud calls.711 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables coding agents to search a locally indexed codebase with hybrid dense, lexical, and symbol-graph retrieval, returning ranked passages with exact file:line-line citations plus graph context and index status. It keeps its index in sync via a file watcher and runs as a local sidecar with no hosted service to deploy.25 PyPI1MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to pull focused, token-bounded context from a local structural code graph stored in SQLite, so they can locate relevant code, traverse relationships between entities, and carry recorded mistakes into later sessions instead of reading whole files. It also supports serving that context over an authenticated local HTTP dashboard.28 npmMIT
- AlicenseNot gradedqualityAmaintenanceServes AI coding agents focused context from a project-local SQLite graph of source entities and Git relationships, so they can retrieve relevant code, trace callers/callees and impact, and carry recorded mistakes into later sessions without reading whole files. Queries render bounded, token-estimated packets while all indexing stays on the local machine.28 npmMIT