fastcontext-mcp
Click on "Install 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., "@fastcontext-mcpfind all places that call the payment API"
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.
fastcontext-mcp
An MCP server that wraps FastContext-1.0 as a repo-exploration subagent for Claude Code.
Instead of letting Sonnet spend half its context budget grepping around a codebase, you offload that work to a dedicated 4B model trained specifically to explore repos. FastContext issues parallel READ/GLOB/GREP calls, then returns compact file paths + line ranges as grounded citations. Claude Code gets clean context; FastContext does the legwork.
Claude Code (Sonnet) ──explore_repo──▶ fastcontext-mcp ──READ/GLOB/GREP──▶ your repo
▲ │
└──── file:line citations ──────────────┘Based on Microsoft's FastContext paper: integrating FastContext improves coding agent accuracy by up to 5.5% while reducing main-agent token consumption by up to 60%.
Requirements
Python 3.10+
A running FastContext inference server (SGLang or vLLM, OpenAI-compatible)
Claude Code
Related MCP server: git-context-mcp
Setup
1. Serve FastContext locally
You need a GPU with ~6GB VRAM for the 4B model. The 4B-RL variant slightly outperforms 4B-SFT on most benchmarks and is recommended for deployment.
pip install sglang[all]
# SFT variant (default)
./scripts/serve.sh microsoft/FastContext-1.0-4B-SFT
# RL variant (recommended)
./scripts/serve.sh microsoft/FastContext-1.0-4B-RLOr with vLLM:
pip install vllm
vllm serve microsoft/FastContext-1.0-4B-SFT --tool-call-parser hermesThe server will be available at http://localhost:30000.
2. Install this MCP server
git clone https://github.com/YOUR_USERNAME/fastcontext-mcp
cd fastcontext-mcp
pip install -e .3. Register with Claude Code
Add to your ~/.claude/claude_desktop_config.json (or project-level .mcp.json):
{
"mcpServers": {
"fastcontext": {
"command": "fastcontext-mcp",
"env": {
"FASTCONTEXT_BASE_URL": "http://localhost:30000/v1",
"FASTCONTEXT_MODEL": "FastContext-1.0-4B-SFT"
}
}
}
}Restart Claude Code. You should see explore_repo in the available tools.
Usage
Once registered, Claude Code can call explore_repo automatically, or you can invoke it explicitly:
explore_repo("where is the rate limiting middleware defined")
explore_repo("find all places that call the payment API", repo_root="/path/to/repo")FastContext will issue several parallel read/search calls internally and return something like:
<final_answer>
- src/middleware/ratelimit.py: lines 12-47
- src/middleware/__init__.py: line 8
- tests/test_ratelimit.py: lines 1-30
</final_answer>Claude Code then uses those citations as focused context rather than reading the whole codebase.
Configuration
Env var | Default | Description |
|
| SGLang/vLLM server URL |
|
| Model name as registered in the server |
|
| Max exploration turns before giving up |
|
| Max lines returned per READ call |
No GPU? Remote inference
If you don't have a local GPU, you can serve FastContext on a remote machine and point FASTCONTEXT_BASE_URL at it. The MCP server itself is CPU-only and just proxies requests.
Why not just use Claude Code directly?
You can. But FastContext is trained specifically for the locate-relevant-code task, and it's 4B parameters — it's faster and cheaper per exploration call than routing everything through Sonnet. On large codebases the token savings are significant (the paper reports up to 60% reduction in main-agent tokens).
License
MIT. FastContext model weights are also MIT licensed by Microsoft.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceProvides Cursor-like code intelligence using tools like ripgrep, ctags, and tree-sitter to help LLMs explore and understand entire codebases. It implements a structured, phase-gated workflow to ensure high-confidence code modifications and eliminate hallucinations.Last updated
- FlicenseBqualityDmaintenanceProvides AI coding agents with structured Git repository context including project state, code structure, activity, and risk analysis without modifying or uploading code.Last updated53
- Alicense-qualityDmaintenanceEnables AI agents to fetch and pack the most relevant files from any GitHub repository for a given query, within token limits. Works with Claude Desktop, Cursor, Windsurf, and VS Code Copilot.Last updatedMIT
- AlicenseAqualityBmaintenanceProvides shared real-time context for Claude Code agents, including scope awareness, prior decisions, and anti-overlap, using only files in the repo.Last updated5MIT
Related MCP Connectors
Securely search and manage workspace context files for AI agents and teams.
Token-efficient search for coding agents over public and private documentation.
Cross-agent artifact workspace with provenance across Claude Code, Codex, Cursor, LangGraph.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jmacd867/fastcontext-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server