- Ast Metrics
Ast Metrics
Static code analyzer with MCP server. Gives AI agents access to complexity metrics, coupling analysis, community detection, risk scoring, and test quality, without reading every file.
Overview
AST Metrics is a multi-language static code analyzer (Go, PHP, Python, Rust, TypeScript...) that exposes architectural insights via MCP. AI coding agents can query complexity hotspots, dependency graphs, coupling metrics, architectural communities, and test quality on demand.
No server required. No account. One binary. Works offline.
Tools exposed
analyze_project-- High-level project overview: languages, average complexity, maintainability, top risksget_file_metrics-- Detailed metrics for a specific file (complexity, LOC, coupling, maintainability)find_risky_code-- Ranked list of riskiest files/classes (composite score: complexity + coupling + change frequency)find_complex_code-- Functions/classes above a cyclomatic complexity thresholdget_dependencies-- Dependency subgraph around a componentget_coupling-- Afferent and efferent coupling for a componentget_communities-- Architectural community detection with modularity metricsget_test_quality-- Test isolation, traceability, god tests, orphan classes
Installation
curl -s https://raw.githubusercontent.com/Halleck45/ast-metrics/main/scripts/download.sh|bash
Configuration
Add to .mcp.json:
{
"mcpServers": {
"ast-metrics": {
"command": "ast-metrics",
"args": ["mcp", "."]
}
}
}
Server Config
{
"mcpServers": {
"ast-metrics": {
"command": "ast-metrics",
"args": [
"mcp",
"."
]
}
}
}Project Info
Created At
2 months agoUpdated At
2 months agoAuthor Name
Halleck45Star
-Language
-License
-Recommend Servers
View AllMcp Server Chatsum
@chatmcp
summarize chat message
typescript
a year ago
Gpt Scrambler
2 days ago
Test
@modelcontextprotocol
test
6 months ago