CodebaseMCPServer

shervinemp
GitHub
PythonCode AnalysisMachine Learning

Loading subscription status...

💡 Description

A Python codebase analysis RAG system that uses Abstract Syntax Tree (AST) to analyze Python code, extracting information (functions, classes, calls, variables, etc.) to store in a Weaviate vector database. It provides tools to query and understand codebases though Model Context Protocol (MCP) server. The system leverages Google's Gemini models for generating embeddings and natural language descriptions/answers about code.

📝 JSON Entries

{
  "mcpServers": [
    {
      "CodebaseMCP": {
        "env": {
          "GEMINI_API_KEY": "YOUR_API_KEY_HERE",
          "LLM_CONCURRENCY": "5",
          "GENERATE_LLM_DESCRIPTIONS": "true"
        },
        "args": [
          "src/code_analysis_mcp/mcp_server.py"
        ],
        "command": "python"
      }
    }
  ]
}

🛠️ Tools

WeaviateDockerGemini models

Features

  • Code scanning of Python files.
  • Vector storage using Weaviate.
  • LLM enrichment for generating descriptions.
  • RAG Q&A capabilities for natural language queries.

💬 Example Queries

  • Extract functions and classes from the codebase.
  • Generate natural language descriptions about code elements.