Fast Context MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/SammySnake-d/fast-context-mcp.git
cd fast-context-mcp
npm install
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add fast-context -- node "<FULL_PATH_TO_FAST_CONTEXT_FORK>/dist/index.js"

Replace <FULL_PATH_TO_FAST_CONTEXT_FORK>/dist/index.js with the actual folder you prepared in step 1.

README.md

AI-driven semantic code search as an MCP tool

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.*token

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 install

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 ~/Library/Application Support/Windsurf/User/globalStorage/state.vscdb
Windows %APPDATA%/Windsurf/User/globalStorage/state.vscdb
Linux ~/.config/Windsurf/User/globalStorage/state.vscdb

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_KEY is omitted, the server auto-discovers it from your local Windsurf installation.

Environment Variables

Variable Default Description
WINDSURF_API_KEY (auto-discover) Windsurf API key
FC_MAX_TURNS 3 Search rounds per query (more = deeper but slower)
FC_MAX_COMMANDS 8 Max parallel commands per round
FC_TIMEOUT_MS 30000 Connect-Timeout-Ms for streaming requests
FC_RESULT_MAX_LINES 50 Max lines per command output (truncation)
FC_LINE_MAX_CHARS 250 Max characters per output line (truncation)
WS_MODEL MODEL_SWE_1_6_FAST Windsurf model name
WS_APP_VER 1.48.2 Windsurf app version (protocol metadata)
WS_LS_VER 1.9544.35 Windsurf language server version (protocol metadata)

Available Models

The model can be changed by setting WS_MODEL (see environment variables above).

Available Models

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
query string Yes Natural language search query
project_path string No cwd Absolute path to project root
tree_depth integer No 3 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.
max_turns integer No 3 Search rounds (1-5). More = deeper search but slower. Use 1-2 for simple lookups, 3 for most queries, 4-5 for complex analysis.
max_results integer No 10 Maximum number of files to return (1-30). Smaller = more focused, larger = broader exploration.

Returns:

  1. Relevant files with line ranges
  2. Suggested search keywords (rg patterns used during AI search)
  3. 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/sr

Tools (1)

fast_context_searchAI-driven semantic code search with tunable parameters.

Environment Variables

WINDSURF_API_KEYWindsurf API key (auto-discovered if omitted)
FC_MAX_TURNSSearch rounds per query
FC_MAX_COMMANDSMax parallel commands per round
FC_TIMEOUT_MSConnect-Timeout-Ms for streaming requests
FC_RESULT_MAX_LINESMax lines per command output
FC_LINE_MAX_CHARSMax characters per output line
WS_MODELWindsurf model name
WS_APP_VERWindsurf app version
WS_LS_VERWindsurf language server version

Configuration

claude_desktop_config.json
{"fast-context": {"command": "node", "args": ["/absolute/path/to/fast-context-mcp/src/server.mjs"], "env": {"WINDSURF_API_KEY": "sk-ws-01-xxxxx"}}}

Try it

Search for the authentication logic in this codebase.
Find where the JWT verification is handled in the project.
Locate the user model definition and its related methods.
Perform a deep search for session token management logic.

Frequently Asked Questions

What are the key features of Fast Context MCP?

AI-driven semantic code search using Windsurf's SWE-grep protocol. Executes local search tools like ripgrep and tree-node-cli. Returns relevant file paths and line ranges to MCP clients. Auto-discovers Windsurf API keys from local SQLite databases. Supports tunable search parameters like tree depth and search rounds.

What can I use Fast Context MCP for?

Quickly locating specific business logic within large codebases. Performing semantic searches across monorepos using natural language. Automating the discovery of relevant files for complex refactoring tasks. Debugging authentication or middleware flows by finding related code snippets.

How do I install Fast Context MCP?

Install Fast Context MCP by running: git clone https://github.com/SammySnake-d/fast-context-mcp.git && cd fast-context-mcp && npm install

What MCP clients work with Fast Context MCP?

Fast Context MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Fast Context MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare