Fast Context 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., "@Fast Context MCPfind where the authentication logic is defined"
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.
Fast Context MCP
AI-driven semantic code search as an MCP tool — powered by Windsurf's reverse-engineered SWE-grep protocol.
Any MCP-compatible client (Claude Code, Claude Desktop, Cursor, etc.) can use this to search codebases with natural language queries. All tools are bundled via npm — no system-level dependencies needed (ripgrep via @vscode/ripgrep, tree via tree-node-cli). Works on macOS, Windows, and Linux.
How It Works
You: "where is the authentication logic?"
│
▼
┌─────────────────────────┐
│ Fast Context MCP │
│ (local MCP server) │
│ │
│ 1. Maps project → /codebase
│ 2. Sends query to Windsurf Devstral API
│ 3. AI generates rg/readfile/tree commands
│ 4. Executes commands locally (built-in rg)
│ 5. Returns results to AI
│ 6. Repeats for N rounds
│ 7. Returns file paths + line ranges
│ + suggested search keywords
└─────────────────────────┘
│
▼
Found 3 relevant files.
[1/3] /project/src/auth/handler.py (L10-60)
[2/3] /project/src/middleware/jwt.py (L1-40)
[3/3] /project/src/models/user.py (L20-80)
Suggested search keywords:
authenticate, jwt.*verify, session.*tokenRelated MCP server: code-rag
Prerequisites
Node.js >= 18
Windsurf account — free tier works (needed for API key)
No need to install ripgrep — it's bundled via @vscode/ripgrep.
Installation
git clone https://github.com/SammySnake-d/fast-context-mcp.git
cd fast-context-mcp
npm installSetup
1. Get Your Windsurf API Key
The server auto-extracts the API key from your local Windsurf installation. You can also use the extract_windsurf_key MCP tool after setup, or set WINDSURF_API_KEY manually.
Key is stored in Windsurf's local SQLite database:
Platform | Path |
macOS |
|
Windows |
|
Linux |
|
2. Configure MCP Client
Claude Code
Add to ~/.claude.json under mcpServers:
{
"fast-context": {
"command": "node",
"args": ["/absolute/path/to/fast-context-mcp/src/server.mjs"],
"env": {
"WINDSURF_API_KEY": "sk-ws-01-xxxxx"
}
}
}Claude Desktop
Add to claude_desktop_config.json under mcpServers:
{
"fast-context": {
"command": "node",
"args": ["/absolute/path/to/fast-context-mcp/src/server.mjs"],
"env": {
"WINDSURF_API_KEY": "sk-ws-01-xxxxx"
}
}
}If
WINDSURF_API_KEYis omitted, the server auto-discovers it from your local Windsurf installation.
Environment Variables
Variable | Default | Description |
| (auto-discover) | Windsurf API key |
|
| Search rounds per query (more = deeper but slower) |
|
| Max parallel commands per round |
|
| Connect-Timeout-Ms for streaming requests |
|
| Max lines per command output (truncation) |
|
| Max characters per output line (truncation) |
|
| Windsurf model name |
|
| Windsurf app version (protocol metadata) |
|
| Windsurf language server version (protocol metadata) |
Available Models
The model can be changed by setting WS_MODEL (see environment variables above).

Default: MODEL_SWE_1_6_FAST — fastest speed, richest grep keywords, finest location granularity.
MCP Tools
fast_context_search
AI-driven semantic code search with tunable parameters.
Parameter | Type | Required | Default | Description |
| string | Yes | — | Natural language search query |
| string | No | cwd | Absolute path to project root |
| integer | No |
| Directory tree depth for repo map (1-6). Higher = more context but larger payload. Auto falls back to lower depth if tree exceeds 250KB. Use 1-2 for huge monorepos (>5000 files), 3 for most projects, 4-6 for small projects. |
| integer | No |
| Search rounds (1-5). More = deeper search but slower. Use 1-2 for simple lookups, 3 for most queries, 4-5 for complex analysis. |
| integer | No |
| Maximum number of files to return (1-30). Smaller = more focused, larger = broader exploration. |
Returns:
Relevant files with line ranges
Suggested search keywords (rg patterns used during AI search)
Diagnostic metadata (
[config]line showing actual tree_depth used, tree size, and whether fallback occurred)
Example output:
Found 3 relevant files.
[1/3] /project/src/auth/handler.py (L10-60, L120-180)
[2/3] /project/src/middleware/jwt.py (L1-40)
[3/3] /project/src/models/user.py (L20-80)
grep keywords: authenticate, jwt.*verify, session.*token
[config] tree_depth=3, tree_size=12.5KB, max_turns=3Error output includes status-specific hints:
Error: Request failed: HTTP 403
[hint] 403 Forbidden: Authentication failed. The API key may be expired or revoked.
Try re-extracting with extract_windsurf_key, or set a fresh WINDSURF_API_KEY env var.Error: Request failed: HTTP 413
[diagnostic] tree_depth_used=3, tree_size=280.0KB (auto fell back from requested depth)
[hint] If the error is payload-related, try a lower tree_depth value.extract_windsurf_key
Extract Windsurf API Key from local installation. No parameters.
Project Structure
fast-context-mcp/
├── package.json
├── src/
│ ├── server.mjs # MCP server entry point
│ ├── core.mjs # Auth, message building, streaming, search loop
│ ├── executor.mjs # Tool executor: rg, readfile, tree, ls, glob
│ ├── extract-key.mjs # Windsurf API Key extraction (SQLite)
│ └── protobuf.mjs # Protobuf encoder/decoder + Connect-RPC frames
├── README.md
└── LICENSEHow the Search Works
Project directory is mapped to virtual
/codebasepathDirectory tree generated at requested depth (default L=3), with automatic fallback to lower depth if tree exceeds 250KB
Query + directory tree sent to Windsurf's Devstral model via Connect-RPC/Protobuf
Devstral generates tool commands (ripgrep, file reads, tree, ls, glob)
Commands executed locally in parallel (up to
FC_MAX_COMMANDSper round)Results sent back to Devstral for the next round
After
max_turnsrounds, Devstral returns file paths + line rangesAll rg patterns used during search are collected as suggested keywords
Diagnostic metadata appended to help the calling AI tune parameters
Technical Details
Protocol: Connect-RPC over HTTP/1.1, Protobuf encoding, gzip compression
Model: Devstral (
MODEL_SWE_1_6_FAST, configurable)Local tools:
rg(bundled via @vscode/ripgrep),readfile(Node.js fs),tree(tree-node-cli),ls(Node.js fs),glob(Node.js fs)Auth: API Key → JWT (auto-fetched per session)
Runtime: Node.js >= 18 (ESM)
Dependencies
Package | Purpose |
| MCP server framework |
| Bundled ripgrep binary (cross-platform) |
| Cross-platform directory tree (replaces system |
| Read Windsurf's local SQLite DB |
| Schema validation (MCP SDK requirement) |
License
MIT
Available Tools
2 toolsextract_windsurf_keyA
Extract Windsurf API Key from local installation. Auto-detects OS (macOS/Windows/Linux) and reads the API key from Windsurf's local database. Set the result as WINDSURF_API_KEY env var.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses OS auto-detection, reading from the local database, and setting the result as an env var. It does not mention error cases or prerequisites, but it is transparent about its main side effect.
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?
The description is two sentences, front-loaded with the primary action, and every sentence adds value without redundancy.
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?
For a zero-parameter tool with no output schema, the description covers the core function and side effect. It lacks mention of failure cases or requirements, but is otherwise complete for its simplicity.
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?
The tool has zero parameters and 100% schema coverage (empty), so the baseline is 4. No additional parameter explanation is needed.
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?
The description clearly states 'Extract Windsurf API Key from local installation', a specific verb+resource with source. It distinguishes itself from the unrelated sibling fast_context_search.
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?
The description provides clear context for when to use the tool (to get the API key and set it as an env var), and the sibling tool is unrelated, so no exclusions are needed. It does not explicitly list alternatives, but usage is apparent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fast_context_searchA
AI-driven semantic code search using Windsurf's Devstral model. Searches a codebase with natural language and returns relevant file paths with line ranges, plus suggested grep keywords for follow-up searches. Parameter tuning guide:
tree_depth: Controls how much directory structure the remote AI sees before searching. If you get a payload/size error, REDUCE this value. If search results are too shallow (missing files in deep subdirectories), INCREASE this value.
max_turns: Controls how many search-execute-feedback rounds the remote AI gets. If results are incomplete or the AI didn't find enough files, INCREASE this value. If you want a quick rough answer, use 1. Response includes a [config] line showing actual parameters used — use this to decide adjustments on retry.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural language search query (e.g. "where is auth handled", "database connection pool") | |
| max_turns | No | Number of search rounds. Each round: remote AI generates search commands → local execution → results sent back. Default 3. Use 1 for quick simple lookups. Use 4-5 for complex queries requiring deep tracing across many files. More rounds = better results but slower and uses more API quota. | |
| tree_depth | No | Directory tree depth for the initial repo map sent to the remote AI. Default 3. Use 1-2 for huge monorepos (>5000 files) or if you get payload size errors. Use 4-6 for small projects (<200 files) where you want the AI to see deeper structure. Auto falls back to a lower depth if tree output exceeds 250KB. | |
| max_results | No | Maximum number of files to return. Default 10. Use a smaller value (3-5) for focused queries. Use a larger value (15-30) for broad exploration queries. | |
| project_path | No | Absolute path to project root. Empty = current working directory. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses the multi-round search-execute-feedback mechanism and the '[config] line showing actual parameters used' for retry adjustments. It does not cover error handling, but it adds meaningful behavioral context beyond the schema.
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?
Well-structured with a clear purpose statement, a bulleted parameter tuning guide, and a closing note about the config line. Every sentence earns its place, and the front-loaded purpose aids quick comprehension.
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?
With 5 parameters, no output schema, and no annotations, the description covers purpose, tuning, and response characteristics effectively. It could be improved by explicitly stating output format or error behavior, but the content is sufficient for an agent to use the tool correctly.
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?
Schema coverage is 100%, so baseline is 3. The description adds a valuable tuning guide with diagnostic heuristics (e.g., 'If you get a payload/size error, REDUCE this value' for tree_depth) and explains the functional meaning of max_turns rounds, going beyond the schema field descriptions.
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?
The description clearly states 'AI-driven semantic code search' with specific outputs: 'relevant file paths with line ranges, plus suggested grep keywords'. This specific verb+resource combination distinguishes it from the unrelated sibling tool extract_windsurf_key.
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?
Provides actionable tuning guidance (e.g., 'If search results are too shallow... INCREASE this value') and suggests using max_turns=1 for 'quick rough answer'. However, it does not explicitly mention when not to use or alternative tools, though the sibling is unrelated and the context implies use cases.
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. Dates show when Glama detected each change.
2 tool updates
v1.0.0- First observed
extract_windsurf_key - First observed
fast_context_search
TDQS
The two tools serve completely distinct purposes: one performs AI-powered code search, and the other extracts an API key. There is no overlap or ambiguity between them.
Both tools use snake_case and follow a descriptive noun-verb pattern (fast_context_search, extract_windsurf_key). The naming is mostly consistent, though one is more of an adjective_noun_verb while the other is a clear verb_noun.
With only two tools, the server feels thin for its purpose. However, it is narrowly focused on AI-driven search, and each tool is substantial, so the count is borderline acceptable.
The core search workflow is covered by the search tool, which includes configurable parameters for depth and turns. The key extraction is a necessary setup step. There are no obvious dead ends, though a few extra utilities (e.g., search history or config management) could enhance completeness.
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 Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
An MCP server that gives your AI access to the source code and docs of all public github repos
Search GitHub, npm, PyPI, StackOverflow, ArXiv from one MCP — built for coding agents.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables AI-driven semantic code search by leveraging Windsurf's reverse-engineered protocol to perform multi-round local searches using natural language. It automatically executes bundled ripgrep and file operations to return relevant code snippets and file paths to MCP-compatible clients.2289358MIT
- FlicenseNot gradedqualityCmaintenanceA semantic code search MCP server that enables natural language queries against your codebase, supporting features like related file discovery and context expansion, all running locally.2-
- AlicenseAqualityAmaintenanceLocal MCP server for semantic code search using Tree-sitter AST parsing, local embeddings, and hybrid search; enables indexing and querying codebases entirely offline.5MIT
- AlicenseAqualityDmaintenanceLocal-first MCP server for semantic + keyword hybrid code search. Zero external services, no API keys required.2MIT
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/TripQi/fast-context-fork'
If you have feedback or need assistance with the MCP directory API, please join our Discord server