mcp-repodna
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-repodnaAnalyze https://github.com/facebook/react and generate skills.sh and rules.md"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 syncRelated 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 serveLocal paths work too:
mcp-repodna analyze ../my-project --jsonMCP 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.mdgenerate_skills(repo_url, output_dir, history_depth): writes both artifactsanalyze_dimension(repo_url, dimension, history_depth): returns one dimension as JSONlist_dimensions(): lists the six dimension names
Resources:
dna://schema: JSON schema of the RepoDNA modeldna://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 detecteddna:branch <name>: validates branch prefixes when detecteddna:lint,dna:format,dna:typecheck,dna:test: run the detected toolsdna:install-hooks: installs pre-commit when configureddna: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 . # lintThe 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 toolsanalyze_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.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_url | Yes | ||
| dimension | Yes | ||
| history_depth | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_url | Yes | ||
| output_dir | No | ||
| history_depth | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_url | Yes | ||
| output_dir | Yes | ||
| history_depth | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
4 tool updates
v0.1.0- First observed
analyze_dimension - First observed
analyze_repository - First observed
generate_skills - First observed
list_dimensions
TDQS
Scored across 4 tools
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.
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.
Four tools is well-scoped for a focused repository DNA analysis server. Each tool serves a distinct purpose and none feel redundant or extraneous.
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
Related MCP Connectors
Your team's shipping standards, org map and delivery metrics, inside your coding agent.
Codebase intelligence for agents: 152 structured artifacts across 21 programs, one call.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Repo intel for AI coding agents: overview, PRs, contributors, hot files, CI, deps. Remote MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceAnalyzes codebases from local directories, GitHub, and Azure DevOps, providing intelligent context to AI coding assistants through repository structure, critical files, and semantic maps.144MIT
- FlicenseAqualityDmaintenanceProvides AI agents with a structured library of engineering skills, best practices, and playbooks for software development.2-
- FlicenseNot gradedqualityDmaintenanceProvides AI agents with structured access to project conventions, technology stacks, and architectural patterns to ensure consistency across development teams.-
- AlicenseNot gradedqualityDmaintenanceScans your source code using AST analysis to detect coding conventions, error handling, API patterns, and more, then generates a CONVENTIONS.md file to help AI agents follow your project's style.MIT