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-repodna Analyze 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: patchwork
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.
Inputs: repo_url (required), dimension (required), history_depth. Returns: result
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.
Inputs: repo_url (required), output_dir, history_depth. Returns: result
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.
Inputs: repo_url (required), output_dir (required), history_depth. Returns: result
list_dimensionsB
List the DNA dimensions available for analysis.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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
- AlicenseAqualityDmaintenanceProvides AI agents with a structured library of engineering skills, best practices, and playbooks for software development.2ISC
- 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
- FlicenseNot gradedqualityCmaintenanceAnalyzes repositories, explains architecture, calculates change impact, and enforces guardrails for AI Agents like Claude Code, Cursor, and Codex via MCP tools.-
- AlicenseNot gradedqualityBmaintenanceAnalyzes a codebase to extract its coding conventions and exposes tools via MCP for AI agents to retrieve live style rules, ensuring generated code matches the project's unwritten style.1MIT