Skip to main content
Glama

mcp-repodna

An MCP server and CLI that analyzes a public repository to extract its holistic engineering culture and compiles it into artifacts for autonomous AI coding agents:

  • skills.sh: an executable bash script encoding the repository's conventions as runnable checks (commit style, branch naming, lint, format, typecheck, test)

  • rules.md: a markdown context document summarizing the repository's engineering DNA for LLM system prompts

The analyzer inspects six dimensions: git conventions, architecture, linting and formatting, tooling, test semantics, and governance.

Installation

Requires Python 3.12+ and git on PATH.

uv tool install mcp-repodna
# or, from this checkout
uv sync

Related MCP server: Skillroute MCP

CLI usage

# Analyze a repository and print a summary table
mcp-repodna analyze https://github.com/org/repo

# Analyze and emit the full DNA model as JSON
mcp-repodna analyze https://github.com/org/repo --json

# Analyze and write skills.sh plus rules.md into ./repodna
mcp-repodna compile https://github.com/org/repo --output ./repodna

# Adjust how much commit history is fetched (default 100)
mcp-repodna analyze https://github.com/org/repo --history-depth 500

# Print the JSON schema of the DNA model
mcp-repodna schema

# Start the MCP server over stdio
mcp-repodna serve

Local paths work too:

mcp-repodna analyze ../my-project --json

MCP server

The server exposes four tools and two resources over stdio.

Tools:

  • analyze_repository(repo_url, history_depth, output_dir): returns the DNA model as JSON, optionally writing skills.sh and rules.md

  • generate_skills(repo_url, output_dir, history_depth): writes both artifacts

  • analyze_dimension(repo_url, dimension, history_depth): returns one dimension as JSON

  • list_dimensions(): lists the six dimension names

Resources:

  • dna://schema: JSON schema of the RepoDNA model

  • dna://dimensions: JSON list of dimension names

Example client configuration:

{
  "mcpServers": {
    "repodna": {
      "command": "mcp-repodna",
      "args": ["serve"]
    }
  }
}

DNA dimensions

Dimension

Detects

git

conventional commit ratio, merge strategy, branch prefixes, default branch

architecture

src vs flat vs monorepo layout, test placement, typing strictness, dependency manager

linters

ruff, eslint, prettier, biome, flake8, editorconfig, line length, import sorting

tooling

Makefile targets, npm scripts, Taskfile, pre-commit hooks, CI systems

testing

pytest, jest, vitest, mock libraries, assertion grammar, snapshots, coverage

governance

PR template, CONTRIBUTING, ADRs, CODEOWNERS, SECURITY, issue templates

Every dimension carries a confidence level (low, medium, high) and notes when evidence is missing.

Generated artifacts

skills.sh provides guarded functions:

  • dna:commit <subject>: validates conventional commit subjects when detected

  • dna:branch <name>: validates branch prefixes when detected

  • dna:lint, dna:format, dna:typecheck, dna:test: run the detected tools

  • dna:install-hooks: installs pre-commit when configured

  • dna:preflight: runs all checks as a submission gate

rules.md renders the same DNA as a rule sheet for system context.

Development

uv sync           # install dependencies with Python 3.12
uv run pytest     # run the test suite
uv run ruff check .   # lint

The test suite builds a synthetic git repository in a temp directory and asserts every extractor, the pipeline, the compiler, and the MCP server against it. No network access is required.

License

Distributed under the Apache License 2.0. See the LICENSE file. This project itself follows the conventions it detects: conventional commits, ruff linting, pytest with pytest-mock, and pre-commit hooks.

Available Tools

4 tools
analyze_dimensionB

Analyze a single DNA dimension of a repository and return it as JSON.

Args:
    repo_url: Git URL or local path of the repository to analyze.
    dimension: One of the dimensions from the list_dimensions tool.
    history_depth: Number of commits to fetch for git history analysis.
ParametersJSON Schema
NameRequiredDescriptionDefault
repo_urlYes
dimensionYes
history_depthNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns JSON, which is useful, but it does not disclose side effects (e.g., whether it clones the repo, writes to disk, or makes network calls), performance implications, or error behavior. For a tool that fetches git history, this is a notable gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the core purpose, followed by a concise parameter list. Every sentence earns its place, though the parameter descriptions could be slightly more detailed without bloating the text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has an output schema, so return values are covered. The description covers the main inputs and the relationship to list_dimensions. However, it lacks context about side effects, prerequisites (e.g., whether the repo must be accessible), and how this tool relates to analyze_repository. For a tool with no annotations, this is a moderate gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does add meaning for all three parameters: repo_url is described as 'Git URL or local path', dimension is tied to list_dimensions, and history_depth is explained as 'Number of commits to fetch'. However, the descriptions are brief and do not add much beyond the parameter names and types, so a 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Analyze') and resource ('a single DNA dimension of a repository'), and the phrase 'single DNA dimension' distinguishes it from the sibling analyze_repository, which presumably analyzes the whole repository. However, it does not explicitly name the sibling or explain the difference, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning 'dimension: One of the dimensions from the list_dimensions tool', which tells the agent to first call list_dimensions. It does not explicitly state when to use this tool versus analyze_repository or generate_skills, nor does it provide exclusions or alternative conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

analyze_repositoryA

Analyze a repository and return its engineering DNA as JSON.

Args:
    repo_url: Git URL or local path of the repository to analyze.
    history_depth: Number of commits to fetch for git history analysis.
    output_dir: Optional directory to also write skills.sh and rules.md into.
ParametersJSON Schema
NameRequiredDescriptionDefault
repo_urlYes
output_dirNo
history_depthNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that it writes skills.sh and rules.md when output_dir is provided, and that history_depth affects git history analysis. However, without annotations, the description bears the full burden for behavioral disclosure; it does not state whether the tool is read-only (aside from optional writes), performance implications for large repositories, or any error behavior. This is partial but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a conventional docstring format with a one-sentence summary and an Args block. It is concise and front-loaded with the main purpose, with parameter details efficiently listed. No fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the basic invocation (repo_url, history_depth, output_dir) and the fact that output is JSON, but 'engineering DNA' remains vague—what metrics or insights are returned is not specified. There is no mention of alternatives or when not to use it. An output schema exists, which may partially compensate, but the description alone leaves gaps for an agent deciding whether this tool fits.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully explain parameters, and it does: repo_url, history_depth, and output_dir each receive a clear one-line explanation that goes beyond the bare schema titles. This fully compensates for the lack of schema-level descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Analyze') and resource ('a repository'), and indicates output ('engineering DNA as JSON'). Clear enough to distinguish from siblings like generate_skills or list_dimensions at a high level, though 'engineering DNA' is an opaque term that could leave an agent unsure what analysis is performed.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives like analyze_dimension or generate_skills. There is no mention of prerequisites, typical use cases, or conditions that rule this tool out. An agent would have to infer usage from context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_skillsA

Generate skills.sh and rules.md for a repository into a directory.

Args:
    repo_url: Git URL or local path of the repository to analyze.
    output_dir: Directory to write skills.sh and rules.md into.
    history_depth: Number of commits to fetch for git history analysis.
ParametersJSON Schema
NameRequiredDescriptionDefault
repo_urlYes
output_dirYes
history_depthNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does disclose the core write operation — that it writes skills.sh and rules.md into an output directory — and names the history_depth parameter's behavioral effect (fetching commits for analysis). However, it does not disclose whether existing files are overwritten, whether the repo must be cloned (network dependency), or any side effects or failure modes for a tool that mutates the filesystem.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is tight and well-organized: a single front-loaded purpose sentence followed by a compact Args list. Every line earns its place, with no filler or redundant restatement of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value documentation is not the description's job. The description adequately covers the tool's purpose and all three parameters. The remaining gaps are usage routing versus siblings and behavioral edge cases (overwrite, network), which prevents a perfect score but leaves the tool callable correctly in the common case.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate, and it does: each of the three parameters (repo_url, output_dir, history_depth) gets a meaningful one-line explanation in the Args block that goes beyond the bare schema titles, including the commit-count purpose of history_depth and the directory-write semantics of output_dir.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Generate') with concrete outputs ('skills.sh and rules.md') and a target resource (a repository), which clearly differentiates it from the analysis-oriented siblings (analyze_repository, analyze_dimension, list_dimensions). However, the semantic meaning of what 'skills' and 'rules' contain is never explained, leaving some ambiguity about what the tool actually produces.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The purpose implies usage context — you call this when you want to produce skills/rules files for a repository — and the sibling names suggest these are analysis tools while this is a generation tool. But the description gives no explicit when-to-use or when-not-to-use guidance, no prerequisites (e.g., network access for remote repos), and never names an alternative or exclusion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_dimensionsB

List the DNA dimensions available for analysis.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'List' implies a read-only, side-effect-free operation, but the description never states that explicitly, nor does it mention permissions, pagination, or any constraints on the returned dimensions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that states the verb and resource without wasted words. For a zero-parameter list tool, this is appropriately sized and every element of the sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With zero parameters and an output schema present, most of the integration burden is already carried by structured fields. The main gap is that the description omits the workflow hint its sibling set implies: call this first to see which dimensions can then be passed to analyze_dimension.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the empty input schema is trivially fully covered, so the baseline 4 applies. There is nothing for the description to explain beyond what the schema already shows.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action ('List') on a specific resource ('the DNA dimensions available for analysis'), and the phrase 'available for analysis' scopes the result against the analyze_dimension sibling. It is clear and distinguishable, though it does not explicitly name the sibling tools it differs from.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to call this tool versus analyze_dimension, analyze_repository, or generate_skills. The intended workflow (discover dimensions first, then invoke analyze_dimension) is only implied by the tool's name and the word 'available,' so an agent must infer the call context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedanalyze_dimension
    • First observedanalyze_repository
    • First observedgenerate_skills
    • First observedlist_dimensions

TDQS

A3.7/5.0

Scored across 4 tools

Disambiguation4/5

analyze_repository and analyze_dimension are somewhat close since both return DNA analysis as JSON, but the full-vs-single-dimension distinction is clear from the descriptions. generate_skills and list_dimensions are clearly separate in purpose.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: analyze_repository, generate_skills, analyze_dimension, list_dimensions. This makes the toolset predictable and easy to navigate.

Tool Count5/5

Four tools is well-scoped for a focused repository DNA analysis server. Each tool serves a distinct purpose and none feel redundant or extraneous.

Completeness5/5

The toolset covers discoverability via list_dimensions, targeted analysis via analyze_dimension, full analysis via analyze_repository, and artifact generation via generate_skills. There are no obvious dead ends or missing operations for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers