Python Static Code Analyzer with Neo4j Integration

Python Neo4j AST Parsing MCP Server Cursor IDE
Created by Babak Bandpey  |  Built by Cocode  |  GitHub  |  فارسی
AST AST-based parsing
Graph Neo4j storage
MCP Cursor IDE ready

Features

🔍
Call Graph Analysis
Extract function calls, arguments, and build comprehensive call graphs stored in Neo4j.
🧪
Test Coverage Detection
Automatically identify tests and map test-to-code relationships.
📊
Code Metrics
Extract function lengths, class sizes, constant values, and more.
🔗
MCP Integration
Exposes graph queries via Model Context Protocol for Cursor IDE.
🎨
GraSS Visualization
Compatible with Neo4j Browser's GraSS styling for beautiful graphs.
Configurable
Environment-based config, custom ignore patterns, verbosity control.

MCP Tools

Structure
list_files file_contents list_functions list_classes
Call Graph
callees callers transitive_calls most_called_functions most_calling_functions
Test Analysis
untested_functions untested_classes test_coverage_ratio tests_for_function
Analysis
recursive_functions classes_with_most_methods repetitive_constants

Quick Start

# Start Neo4j docker-compose up -d # Scan your codebase python scanner.py # Start MCP server for Cursor IDE ./run_mcp_stdio_server.sh