Python Code Explorer

•
7
•

Extracts and analyzes Python code structures, focusing on import/export relationships, for language model integration.

This MCP server provides tools for extracting and analyzing Python code structures, focusing on import/export relationships between files. It offers features like smart code extraction, directory context inclusion, documentation inclusion, and LLM-friendly formatting, all while adhering to the Model Context Protocol standard. The server exposes a powerful code extraction tool that analyzes a target Python file, discovers imported modules, classes, and functions, and returns the complete code along with referenced objects and additional contextual files, all within specified token limits.

Key Features

01Extracts relevant code sections within token limits.
02Supports Model Context Protocol JSON-RPC standard.
03Analyzes import relationships between Python files.
04Formats code with metadata for language models.
05Includes contextual files from the same directory.
062 GitHub stars
07Incorporates project documentation (README files).

Use Cases

01Analyzing code dependencies for large Python projects.
02Providing context to language models for code generation and understanding.
03Integrating code exploration tools into MCP-compatible clients.