Codebase Analyzer icon

Codebase Analyzer

Analyzes Python code using AST, stores information in Weaviate, and provides querying via an MCP server.

About

Codebase Analyzer is a comprehensive tool designed for in-depth analysis of Python codebases. It leverages Abstract Syntax Trees (AST) to parse code, extract key elements like functions, classes, and variables, and store this information in a Weaviate vector database. By utilizing Google's Gemini models for optional LLM enrichment, it generates semantic descriptions and embeddings, enabling Retrieval-Augmented Generation (RAG) for answering natural language questions about the code. The tool exposes analysis and querying capabilities through a Model Context Protocol (MCP) server, offering features such as file watching, codebase dependency management, cross-codebase querying, and MermaidJS call graph visualization, providing a powerful solution for understanding and navigating complex Python projects.

Key Features

  • Answers natural language questions about the codebase using RAG.
  • Stores code elements and vector embeddings in Weaviate.
  • Optionally generates semantic descriptions and embeddings using Gemini.
  • Parses Python code using AST to extract code elements and relationships.
  • 3 GitHub stars
  • Exposes analysis and querying capabilities through an MCP server.

Use Cases

  • Understanding complex Python codebases.
  • Visualizing call graphs to identify dependencies.
  • Answering questions about code structure and functionality.
Craft Better Prompts with AnyPrompt
Sponsored