home / mcp / git metrics mcp server
Provides access to git repository metrics, team health signals, and collaboration insights via MCP client queries.
Configuration
View docs{
"mcpServers": {
"jonmatum-git-metrics-mcp-server": {
"command": "git-metrics-mcp-server",
"args": [],
"env": {
"GIT_TIMEOUT": "30s"
}
}
}
}You can run the Git Metrics MCP Server to analyze git repository metrics and health signals for your team. It exposes a set of data extraction tools that let you answer questions about commits, authors, file churn, team velocity, and code ownership, all through natural language queries from an MCP client.
Use an MCP client to connect to the Git Metrics MCP Server and ask questions in natural language. You can start with high-level team insights and then drill into specifics like burnouts, file churn, or conventional commit adoption. Common workflows include checking overall team health over a time period, identifying potential bus factor risks, and exploring collaboration patterns across repositories.
Prerequisites: make sure you have Node.js and npm installed on your system. You should have a working shell environment where you can run commands.
# Option 1: install globally (recommended for quick start)
npm install -g @jonmatum/git-metrics-mcp-server
# Option 2: install from source
git clone https://github.com/jonmatum/git-metrics-mcp-server.git
cd git-metrics-mcp-server
npm install
npm run build
```}]} ,{You can run the MCP server in several ways depending on how you prefer to install it. The following configurations are provided for typical usage patterns. Each configuration assumes you will connect to the server via an MCP client.
Environment variable you may see in practice: GIT_TIMEOUT. This controls the timeout for git operations. Default is 30 seconds if not set.
{
"mcpServers": {
"git_metrics": {
"type": "stdio",
"command": "git-metrics-mcp-server",
"args": []
}
}
}{
"mcpServers": {
"git_metrics": {
"type": "stdio",
"command": "npx",
"args": ["@jonmatum/git-metrics-mcp-server"]
}
}
}{
"mcpServers": {
"git_metrics": {
"type": "stdio",
"command": "npx",
"args": ["tsx", "/path/to/git-metrics-mcp-server/src/git-metrics.ts"]
}
}
}Open the Kiro CLI and enter chat mode. Then ask questions like: “Get commit stats for /path/to/repo since 2025-11-01” or “Show me team velocity trends for the last 2 weeks.” The MCP server will fetch and summarize metrics from the target repository and present actionable insights.
The server includes input sanitization and structured logging to help protect against injection attacks and to make monitoring easier. Errors are handled gracefully with detailed logs so you can diagnose issues without dropping data.
Run the development and test commands to validate your setup during integration.
npm run dev
npm run build
npm startGet overall commit statistics for a given time period including total commits, additions, deletions, files changed, and net change.
Detailed metrics per contributor such as commits, additions, deletions, and files touched.
Identify files with the most changes over a period to highlight complexity or risk.
Comprehensive summary of team activity and contribution across a period.
Analyze commit timing patterns to detect burnout signals and work distribution.
Assess knowledge distribution and identify bus factor risks based on file ownership.
Track velocity over time to observe productivity and pacing.
Measure team interaction patterns and collaboration signals.
Provide indicators of code quality such as churn, commit size, reverts, and fixes.
Identify stale files and hotspots of complexity that may indicate technical debt.
Analyze usage of conventional commits, scopes, and release patterns.