
How to add src-to-kb to Cursor
Turn any source code repo into a searchable, AI-queryable knowledge base inside Claude or Cursor. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 14, 2026 · 34★ · stdio · no auth
Cursor 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
- 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the src-to-kb config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of src-to-kb's tools to confirm it's connected.
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 Cursor
generate_kbGenerate 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_kbRun an intelligent natural-language search across the knowledge base with AI-generated answers. Params: query (required), kbPath, limit, includeContext.
get_kb_statsReturn comprehensive statistics about an indexed knowledge base, including document/chunk counts, total size, language distribution, and file types. Param: kbPath.
list_kb_filesList 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_similarFind files similar to a given file based on structure, language, and content patterns. Params: filePath (required), kbPath, limit.
extract_codeExtract specific code patterns from the codebase (e.g. all React component definitions).
update_kbUpdate 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 + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the src-to-kb config there under the "mcpServers" key and restart the client.
Is src-to-kb safe to use with Cursor?
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.