
How to add src-to-kb to Claude Desktop
Turn any source code repo into a searchable, AI-queryable knowledge base inside Claude or Cursor. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 14, 2026 ยท 34โ ยท stdio ยท no auth
Claude Desktop 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 Claude Desktop โ Settings โ Developer โ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the src-to-kb config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm src-to-kb's tools appear under the ๐ tools menu.
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 Claude Desktop
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 + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_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 Claude Desktop?
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.