Back to catalog

Source to Knowledge Base MCP Server

Transform source code repositories and Notion content into searchable knowledge bases with AI-powered search using GPT-5, intelligent code chunking, and OpenAI embeddings for semantic code understanding.

Transform source code repositories and Notion content into searchable knowledge bases with AI-powered search using GPT-5, intelligent code chunking, and OpenAI embeddings for semantic code understanding.

Installation

NPM Global

npm install -g @vezlo/src-to-kb

NPX

npx @vezlo/src-to-kb /path/to/repo

Project Dependency

npm install @vezlo/src-to-kb

From Source

git clone https://github.com/vezlo/src-to-kb.git
cd src-to-kb
npm install

Features

  • Support for source code in multiple languages (JavaScript, TypeScript, Python, Java, C++, Go, Rust, and more)
  • Notion integration for importing pages and databases
  • Three response modes: End User (simple), Developer (technical), Copilot (code-focused)
  • REST API with Swagger documentation
  • Intelligent code chunking with configurable overlap
  • OpenAI embeddings for semantic search
  • External server integration for production deployments
  • MCP server for integration with Claude Code and Cursor
  • AI-powered search using OpenAI GPT-5
  • Optional API key authentication

Environment Variables

Optional

  • OPENAI_API_KEY - Required for embedding generation and AI-powered search
  • NOTION_API_KEY - Required for Notion integration to import pages and databases
  • EXTERNAL_KB_URL - URL for external server integration to send knowledge base data
  • EXTERNAL_KB_API_KEY - API key for authenticating with external knowledge base server
  • API_KEY - Optional API key to secure the REST API server
  • PORT - Port number for REST API server (default: 3000)

Usage Examples

Generate knowledge base from source code: src-to-kb ./my-nextjs-app --output ./my-kb
Search codebase: src-to-kb-search search "How does routing work?" --mode developer
Import Notion content: src-to-kb --source=notion --notion-url=https://notion.so/Your-Page-abc123
Start MCP server: src-to-kb-mcp
Get codebase statistics: src-to-kb-search stats --kb ./project-kb

Notes

Supports external server integration with a production-ready assistant-server for enterprise deployments. Includes auto-configuration tool (src-to-kb-mcp-install) for setting up Claude Code and Cursor. Available commands include src-to-kb (generation), src-to-kb-search (search), src-to-kb-api (REST server), and src-to-kb-mcp (MCP server).

Comments (0)

Sign In Sign in to leave a comment.