MCP.so
Sign In
A

Ast Metrics

@Halleck45

About 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.

Basic information

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "ast-metrics": {
      "command": "ast-metrics",
      "args": [
        "mcp",
        "."
      ]
    }
  }
}

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is Ast Metrics?

Ast Metrics is a multi-language static code analyzer for Go, PHP, Python, Rust, TypeScript and more. It exposes architectural insights via MCP, allowing AI coding agents to query complexity hotspots, dependency graphs, coupling metrics, architectural communities, and test quality on demand without a server or account.

How to use Ast Metrics?

Install the tool with the provided curl command, then add the configuration shown to your .mcp.json file using the command ast-metrics with arguments ["mcp", "."].

Key features of Ast Metrics

  • Analyze project overview, complexity, and maintainability.
  • Retrieve file-level metrics (complexity, coupling, etc.).
  • Identify riskiest code with composite score.
  • Find functions/classes above complexity threshold.
  • Get dependency subgraphs and coupling metrics.
  • Detect architectural communities and test quality.

Use cases of Ast Metrics

  • AI coding agents analyze code during development.
  • Identify risky files prioritized for refactoring.
  • Understand dependency relationships between components.
  • Evaluate test quality and detect problematic tests.
  • Discover architectural communities for modularization.

FAQ from Ast Metrics

What languages does Ast Metrics support?

It supports Go, PHP, Python, Rust, TypeScript, and more.

Does Ast Metrics require a server or account?

No server or account is needed. It works offline as a single binary.

How does Ast Metrics calculate risk?

It uses a composite score that combines complexity, coupling, and change frequency.

Can I get a high-level overview of my project?

Yes, the analyze_project tool provides a high-level overview of languages, average complexity, maintainability, and top risks.

How do I install Ast Metrics?

Run the provided curl command curl -s https://raw.githubusercontent.com/Halleck45/ast-metrics/main/scripts/download.sh|bash or download the binary directly.

Comments

More Developer Tools MCP servers