repo-context
This MCP server provides read-only repository exploration and search for AI agents through the explore_repository tool.
Search code, documentation, and configuration using a natural-language query.
Resolve exact file paths, unique symbols, or file#line anchors locally when possible.
Fall back to model-guided search via an OpenAI-compatible endpoint for broader queries.
Return repository-relative file-line citations, optional prose, or JSON with compact snippets.
Validate paths and source ranges while enforcing read-only safety and resource limits.
Tune behavior with optional
citation,max_turns, andrepo_rootarguments.
Integrates with OpenAI-compatible chat completion APIs to enable repository exploration through natural language queries, providing read-only tools like file reading, glob, and grep.
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., "@repo-contextFind the request validation logic in the repository"
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.
flash-context
A lightweight, model-agnostic repository search tool for AI agents. Find relevant code, documentation, and configuration through exact lookups or model-guided search, and retrieve compact snippets with validated file-line citations. Available as a Python CLI and Model Context Protocol (MCP) server.
CLI and MCP share a read-only core with path safety and resource limits. Exact lookups can resolve locally; broader queries delegate search and reading to a utility model through an OpenAI-compatible endpoint. Validation checks paths and source ranges; semantic relevance remains the model's judgment. See safety and evidence validation for details and limitations.
Inspired by FastContext, a now-withdrawn paper on separating repository exploration from task solving, using specialized models to return focused file-line evidence while reducing the coding agent's context and token overhead.
Quickstart
Requires Python 3.13+, uv, and an OpenAI-compatible model endpoint with tool
calling support.
uv tool install flash-context
export FLASH_CONTEXT_BASE_URL=http://localhost:1234/v1
export FLASH_CONTEXT_MODEL=your-model
flash-context search --repo . --query "Find the request validation logic"Replace the endpoint and model with your settings. Set FLASH_CONTEXT_API_KEY
if authentication is required. Installed commands use environment variables;
source checkouts also support project-root config.yaml and .env.
Default output is repository-relative citations:
src/api/validation.py:42-88Use --no-citation for prose, --format json for results with snippets, or
--max-turns N to override the 12-turn default. Exact path and unique symbol
lookups can resolve locally without an endpoint. See the
CLI contract for options,
output schemas, and exit codes.
For example, --query 'httpx/_client.py' returns a bounded file preview, while
--query 'BaseTransport' returns its definition if unique within a complete
Python source/stub scan. Local successes report turns_used: 0 in JSON.
Use --query 'httpx/_client.py#BaseClient._redirect_method' to resolve a parsed
definition locally. A leaf name such as httpx/_client.py#_redirect_method works
when unique in that file. Unresolved anchors fall back to model-guided search.
Warnings go to stderr in both output formats. An empty result after scan-budget exhaustion exits 6 while preserving stdout; a complete empty search exits 0. For large repositories, see scan-budget tuning.
Models select symbol or line anchors; the controller resolves bounded syntax regions and returns structural precision metadata. See the shared contract for evidence rules and limits.
Related MCP server: RepoGrammar
MCP
uvx --from 'flash-context[mcp]' flash-context mcp --transport stdioExposes search_repository(query, repo_root?, max_turns?, citation?).
See MCP integration for editor configuration and source launches.
Documentation
Configuration: endpoint settings, precedence, and limits.
Architecture and scope: shared core and module responsibilities.
Contributing: development setup, tests, and pull requests.
Changelog: release history and migration instructions.
Releasing: package checks and tag-driven TestPyPI/PyPI publishing.
License
Available Tools
1 toolexplore_repositoryD
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| repo_root | No | ||
| max_turns | No | ||
| citation | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
explore_repository
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of ambiguity between tools.
With a single tool, naming consistency is inherently perfect; no pattern deviations exist.
A single tool is far too few for a server presumably focused on repository context, suggesting an underdeveloped or trivial surface.
A single generic 'explore' tool without any specialized operations (e.g., get commits, list branches) is severely incomplete for repository exploration.
Maintenance
Related MCP Connectors
Repo intel for AI coding agents: overview, PRs, contributors, hot files, CI, deps. Remote MCP.
Repository knowledge graph MCP server for codebase understanding and debugging.
Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides autonomous codebase exploration through a plan-execute-reflect-report pipeline, generating onboarding reports with file:line references. Exposes both a high-level investigation tool and low-level read-only file access tools via MCP.MIT
- AlicenseAqualityAmaintenanceLocal, read-only MCP server for coding agents. Indexes repeated implementations in your repository (FastAPI routes, pytest fixtures, Pydantic and SQLAlchemy models) and returns source-backed examples with a bounded read plan, or a typed UNKNOWN when evidence is insufficient. No LLM or network calls.13 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables people and AI agents to query local code repositories as graphs through stdio MCP tools for project listing, search, dependency tracing, impact analysis, bridge detection, node inspection, bounded code reading, and optional LSP definition/reference lookups.MIT
- AlicenseAqualityAmaintenanceLocal-first code context CLI + MCP server: discover, index, and search repos; generate task-aware context packs, code maps, agent harnesses, and PR-review/merge-readiness gates for coding agents and reviewers.14718 npm3MIT