MCP Directory

How to add src-to-kb to Windsurf

Turn any source code repo into a searchable, AI-queryable knowledge base inside Claude or Cursor. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

Last updated June 14, 2026 · 34 · stdio · no auth

Windsurf config for src-to-kb

npm install -g @vezlo/src-to-kb
{
  "mcpServers": {
    "src-to-kb": {
      "command": "node",
      "args": [
        "/Users/admin/Documents/AI-Playground/src-to-kb/mcp-server.mjs"
      ],
      "env": {
        "OPENAI_API_KEY": "your-api-key-here"
      }
    }
  }
}

Setup steps

  1. 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the src-to-kb config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 5src-to-kb's tools become available to Cascade.

Before you start

  • Node.js 14+ and npm
  • Claude Code, Claude Desktop, or Cursor with MCP support
  • The @vezlo/src-to-kb npm package installed (globally recommended)
  • OpenAI API key (OPENAI_API_KEY) — optional, only needed for embeddings and AI-powered answers

What src-to-kb can do in Windsurf

generate_kb

Generate a searchable knowledge base from a source code repository by chunking, cleaning, and optionally creating OpenAI embeddings. Params: repoPath (required), outputPath, chunkSize, chunkOverlap, excludePaths, includeExtensions, generateEmbeddings.

search_kb

Run an intelligent natural-language search across the knowledge base with AI-generated answers. Params: query (required), kbPath, limit, includeContext.

get_kb_stats

Return comprehensive statistics about an indexed knowledge base, including document/chunk counts, total size, language distribution, and file types. Param: kbPath.

list_kb_files

List all files indexed in the knowledge base, with optional filtering by programming language or file type (code/text/config/web). Params: kbPath, filterByLanguage, filterByType.

find_similar

Find files similar to a given file based on structure, language, and content patterns. Params: filePath (required), kbPath, limit.

extract_code

Extract specific code patterns from the codebase (e.g. all React component definitions).

update_kb

Update the knowledge base with new changes from the source code.

Security

All processing happens locally on your machine; no code is sent to external servers except optional OpenAI calls when embeddings are enabled (set OPENAI_API_KEY). Knowledge bases are stored in your local filesystem. The software is dual-licensed (AGPL-3.0 for non-commercial use; a commercial license is required for commercial use).

src-to-kb + Windsurf FAQ

Where is the Windsurf config file?

Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the src-to-kb config there under the "mcpServers" key and restart the client.

Is src-to-kb safe to use with Windsurf?

All processing happens locally on your machine; no code is sent to external servers except optional OpenAI calls when embeddings are enabled (set OPENAI_API_KEY). Knowledge bases are stored in your local filesystem. The software is dual-licensed (AGPL-3.0 for non-commercial use; a commercial license is required for commercial use).

Do I need an OpenAI API key?

No. The server and basic keyword search work without one. An OPENAI_API_KEY is only required if you want to generate embeddings for semantic search or AI-generated answers; set it in the MCP server's env.

Is my code sent to external servers?

No. All indexing and search happen locally on your machine. The only outbound calls are optional OpenAI requests when embeddings are enabled. (Pushing to an external assistant-server is a separate, opt-in CLI feature.)

Which editors does it work with?

Any MCP-compatible client. The docs cover Claude Code (via `claude mcp add`), Claude Desktop (via an mcpServers config block), and Cursor.

View repo Full src-to-kb page