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
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
Setup
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:
Claude Desktop
Add to claude_desktop_config.json under mcpServers:
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:
Error output includes status-specific hints:
extract_windsurf_key
Extract Windsurf API Key from local installation. No parameters.
Project Structure
How 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