This Python MCP server extracts and analyzes Python code structures, focusing on import/export relationships between files. It intelligently navigates codebases to identify related files, prioritizes the most relevant code sections to stay within token limits, and automatically includes README files for better context. The implementation features a CodeGrapher class that builds a comprehensive graph of code references, making it ideal for AI assistants that need to understand Python projects holistically without exceeding context windows.
No reviews yet. Be the first to review!
Sign in to join the conversation
Return the code of a target Python file and related files based on import/export proximity. Parameters: target_file (string): Path to the Python file to analyze; root_repo_path (string, optional): Root directory of the repository. If not provided, the directory of the target file will be used.