Codebase Rag

Provides a local MCP server with code graph knowledge, Web UI, and REST API for repository analysis and query capabilities.
  • python

7

GitHub Stars

python

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "royisme-codebase-rag": {
      "command": "python",
      "args": [
        "start_mcp.py"
      ],
      "env": {
        "TOP_K": "5",
        "MCP_PORT": "8000",
        "NEO4J_URI": "bolt://localhost:7687",
        "CHUNK_SIZE": "512",
        "NEO4J_USER": "neo4j",
        "OLLAMA_HOST": "http://localhost:11434",
        "WEB_UI_PORT": "8080",
        "LLM_PROVIDER": "ollama",
        "OLLAMA_MODEL": "llama3.2",
        "CHUNK_OVERLAP": "50",
        "NEO4J_DATABASE": "neo4j",
        "NEO4J_PASSWORD": "password",
        "VECTOR_DIMENSION": "384",
        "EMBEDDING_PROVIDER": "ollama",
        "OLLAMA_EMBEDDING_MODEL": "nomic-embed-text"
      }
    }
  }
}

You run an MCP server that exposes a dedicated protocol port for AI assistants, a web UI for human users, and a REST API for programmatic access. It combines a fast, graph-backed knowledge graph with flexible AI tooling to ingest code, analyze dependencies, and answer questions about your codebase in real time.

How to use

Connect to the MCP server with your MCP client to orchestrate AI-assisted code understanding. Use the MCP SSE endpoint to receive real-time task updates and chat-style interactions with your AI tools. For human collaboration and programmatic access, use the Web UI and REST API respectively. Typical workflows include ingesting repositories, querying the knowledge graph for code relationships, inspecting impact of changes, and storing insights from conversations or edits.

How to install

Prerequisites are installed on your machine or in your environment before you start. You will need Python for the MCP server, Node.js for the Web UI, and Docker if you plan to run Neo4j in a container.

Additional configuration and usage notes

Configure the following environment variables to tailor the server to your environment. These control ports, database access, and AI/embedding providers.

Tools and endpoints overview

The server exposes tools to ingest repositories, relate code elements, analyze impact, query the knowledge base, and manage project memory. Use the MCP client to discover and invoke these tools in your AI-assisted workflows.

Available tools

codegraph_ingest_repo

Ingest a code repository into the knowledge graph for analysis and querying.

codegraph_related

Find related code elements and dependencies within the graph.

codegraph_impact

Analyze the impact of code changes on dependencies and architecture.

query_knowledge

Query the knowledge base to retrieve structured code intelligence.

add_memory

Store project knowledge and insights into the memory store.

extract_from_conversation

Extract insights from conversations to enhance context packs.

watch_task

Monitor long-running tasks with real-time progress via SSE.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Codebase Rag MCP Server - royisme/codebase-rag | VeilStrat