Git Analytics MCP Server
Provides comprehensive analytics for Git repositories, including tools for tracking commit history, contributor activity, branch health, file modification patterns, and code churn metrics.
Click on "Install 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., "@Git Analytics MCP Servergive me a summary of top contributors and code churn"
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.
Git Analytics MCP Server
π A comprehensive Model Context Protocol (MCP) server that provides detailed Git repository analytics and insights. Perfect for developers who want to understand their codebase better through data-driven insights.
π Features
Repository Analytics
Comprehensive Stats: Total commits, authors, branches, and code changes
Author Analysis: Contributor rankings, commit patterns, and activity periods
Branch Intelligence: Branch health, ahead/behind status, and activity metrics
File Insights: Most modified files, author contributions per file
Temporal Analysis: Commit frequency, code churn over time
Visual Reports: Beautifully formatted terminal output with colors and emojis
Available Tools
get_repository_overview- Executive summary with key metrics and top contributorsget_repository_stats- Detailed repository statisticsget_author_stats- Complete contributor analysisget_branch_stats- Branch health and comparison metricsget_file_stats- File modification patterns and hotspotsget_commit_history- Detailed commit timeline with filtersget_commit_frequency- Daily commit patterns over timeget_code_churn- Lines added/removed analysis
Related MCP server: MCP Git Analysis Server
π Installation
Prerequisites
Node.js 18+
npm or yarn
Git repository to analyze
Quick Setup
# Clone or create the project
cd ~/git-analytics-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
# Test the server (optional)
npm testDevelopment Mode
# Run in development with auto-reload
npm run devπ Usage
As MCP Server
Add to your MCP client configuration:
{
"mcpServers": {
"git-analytics": {
"command": "node",
"args": ["/path/to/git-analytics-mcp-server/dist/index.js"]
}
}
}Direct CLI Usage
# Install globally
npm install -g .
# Use anywhere
git-analytics-mcpπ Example Analytics
Repository Overview
π REPOSITORY SUMMARY REPORT
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Repository Statistics:
β’ Total Commits: 1,247
β’ Total Authors: 12
β’ Active Branches: 8
β’ Code Changes: +45,678 -12,345
β’ Repository Age: 2023-01-15 to 2024-06-15
Top Contributors:
π₯ John Doe - 456 commits
π₯ Jane Smith - 234 commits
π₯ Bob Wilson - 189 commits
π
Alice Brown - 145 commits
π
Mike Johnson - 123 commits
Recent Activity:
β’ a1b2c3d4 Add new authentication module (John Doe)
β’ e5f6g7h8 Fix critical security vulnerability (Jane Smith)
β’ i9j0k1l2 Update documentation and examples (Bob Wilson)Author Analysis
[
{
"name": "John Doe",
"email": "john@example.com",
"commits": 456,
"insertions": 12340,
"deletions": 3456,
"firstCommit": "2023-01-15T10:30:00Z",
"lastCommit": "2024-06-15T14:22:00Z"
}
]Code Churn Analysis
[
{
"date": "2024-06-01",
"insertions": 234,
"deletions": 45,
"net": 189
},
{
"date": "2024-06-02",
"insertions": 156,
"deletions": 89,
"net": 67
}
]π§ Configuration
Tool Parameters
Most tools accept these common parameters:
path(string): Repository path (default: current directory)days(number): Time range for analysis (default: 30)limit(number): Maximum results to return (default: 50)
Environment Variables
# Set default repository path
export GIT_ANALYTICS_DEFAULT_PATH="/path/to/repo"
# Enable debug logging
export GIT_ANALYTICS_DEBUG=trueπ§ͺ Testing
# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Test specific functionality
npm run test -- --grep "author stats"Test Repository Setup
# Create test repository
mkdir test-repo && cd test-repo
git init
echo "# Test" > README.md
git add . && git commit -m "Initial commit"
# Test the server
node dist/index.jsπ Use Cases
Development Team Analytics
Code Review Insights: Identify files that need more attention
Team Productivity: Track commit patterns and contribution metrics
Technical Debt: Find files with high churn rates
Onboarding: Understand codebase structure and key contributors
Project Management
Release Planning: Analyze recent development velocity
Resource Allocation: Identify knowledge silos and areas needing support
Quality Metrics: Track code stability through churn analysis
Timeline Analysis: Understand development patterns and cycles
Repository Health
Branch Management: Identify stale or problematic branches
File Hotspots: Find files that may need refactoring
Contributor Onboarding: Welcome new team members with context
Historical Analysis: Learn from past development patterns
π Advanced Features
Custom Analytics
Extend the server with custom analytics:
// Add to git-analytics.ts
async getCustomMetric(): Promise<CustomMetric> {
// Your custom analysis logic
}Integration Examples
# Use with GitHub CLI
gh repo list | xargs -I {} git-analytics-mcp --path {}
# Batch analysis
find ~/projects -name ".git" -type d | \
xargs -I {} dirname {} | \
xargs -I {} git-analytics-mcp --path {}π Troubleshooting
Common Issues
"Invalid Git repository"
Ensure you're in a Git repository or provide correct path
Check Git installation:
git --version
"Permission denied"
Verify read access to repository
Check file permissions on .git directory
"No commits found"
Repository may be empty or newly initialized
Try with a repository that has commits
Debug Mode
# Enable verbose logging
DEBUG=git-analytics:* npm start
# Check server connectivity
echo '{}' | node dist/index.jsπ€ Contributing
Fork the repository
Create feature branch:
git checkout -b feature/amazing-featureCommit changes:
git commit -m 'Add amazing feature'Push to branch:
git push origin feature/amazing-featureOpen Pull Request
Development Setup
# Install dev dependencies
npm install
# Run in watch mode
npm run dev
# Lint code
npm run lint
# Format code
npm run formatπ License
MIT License - see LICENSE file for details.
π Acknowledgments
Model Context Protocol for the excellent framework
simple-git for Git operations
chalk for beautiful terminal output
date-fns for date manipulation
Happy Analyzing! πβ¨
For questions, issues, or feature requests, please open an issue on GitHub.
MCP-Server
MCP-Server
Available Tools
3 toolsget_author_statsC
Get detailed statistics for all contributors including commits, code changes, and activity periods
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to the Git repository (defaults to current directory) | . |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It describes a read operation ('get') but doesn't mention performance characteristics, rate limits, authentication needs, or what 'detailed statistics' entails in terms of output format or data scope. This leaves significant gaps for an agent to understand how the tool behaves beyond its basic function.
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 single, efficient sentence that front-loads the core purpose. It avoids redundancy and wastes no words, though it could be slightly more structured by separating purpose from scope details.
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?
Given the tool's complexity (statistical analysis with no output schema) and lack of annotations, the description is incomplete. It doesn't explain what 'detailed statistics' includes, how data is aggregated, or the return format. For a tool with behavioral unknowns and no structured output documentation, this leaves the agent under-informed.
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 input schema has 100% description coverage, with the single parameter 'path' well-documented in the schema. The description adds no parameter-specific information beyond what the schema provides, so it meets the baseline of 3 for high schema coverage without compensating value.
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 clearly states the tool's purpose with specific verbs ('get detailed statistics') and resources ('contributors'), including what statistics are retrieved ('commits, code changes, and activity periods'). It distinguishes itself from siblings by focusing on author-level data rather than repository-level overviews or general statistics, though it doesn't explicitly name the sibling tools.
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 provides no guidance on when to use this tool versus the sibling tools (get_repository_overview, get_repository_stats). It mentions 'contributors' which implies author-focused analysis, but doesn't specify use cases, prerequisites, or exclusions. The agent must infer usage from the purpose alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_repository_overviewB
Get a comprehensive overview of the Git repository including stats, top contributors, and recent activity
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to the Git repository (defaults to current directory) | . |
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 mentions the tool 'Get[s] a comprehensive overview' but does not specify if this is a read-only operation, potential side effects, authentication needs, rate limits, or output format. For a tool with no annotations, this leaves significant behavioral gaps, though it implies a safe read operation without being explicit.
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 single, efficient sentence that front-loads the key action and details without any wasted words. It is appropriately sized for the tool's complexity, making it easy for an agent to parse and understand quickly.
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?
Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate. It states the purpose but lacks details on behavioral traits, usage context, and output, which are needed for full completeness. However, it covers the basic intent, making it functional but with clear gaps in guidance and transparency.
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 input schema has 100% description coverage, with the 'path' parameter well-documented in the schema itself. The description adds no additional parameter semantics beyond what the schema provides, such as examples or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the description does not compensate but also does not detract.
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 clearly states the tool's purpose with specific verbs ('Get') and resources ('Git repository'), and it details what information is included ('stats, top contributors, and recent activity'). However, it does not explicitly differentiate from sibling tools like 'get_author_stats' or 'get_repository_stats', which might offer overlapping or complementary functionality, preventing a perfect score.
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 provides no guidance on when to use this tool versus its siblings ('get_author_stats' and 'get_repository_stats'). It lacks explicit instructions on alternatives, prerequisites, or exclusions, leaving the agent to infer usage based on tool names alone, which is insufficient for clear decision-making.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_repository_statsB
Get detailed repository statistics including commits, authors, branches, and code changes
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to the Git repository (defaults to current directory) | . |
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 retrieves statistics but doesn't describe behavioral traits such as whether it's read-only (implied by 'Get'), performance characteristics, error handling, or output format. For a tool with zero annotation coverage, this is a significant gap in transparency.
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 single, efficient sentence that front-loads the core purpose and lists key statistics without unnecessary words. Every part of the sentence adds value, making it appropriately sized and well-structured.
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?
Given the tool's moderate complexity (retrieving multiple statistics), no annotations, and no output schema, the description is minimally adequate. It specifies what statistics are included but lacks details on behavioral traits, usage context, or output format. This leaves gaps that could hinder an agent's ability to use the tool effectively.
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 input schema has 100% description coverage, with the single parameter 'path' well-documented in the schema itself. The description adds no additional parameter semantics beyond what the schema provides, such as examples or constraints. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.
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 clearly states the tool's purpose with a specific verb ('Get') and resource ('detailed repository statistics'), and lists the types of statistics included (commits, authors, branches, code changes). However, it doesn't explicitly differentiate from sibling tools like 'get_author_stats' or 'get_repository_overview', which might offer overlapping or related functionality.
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 provides no guidance on when to use this tool versus its siblings ('get_author_stats' and 'get_repository_overview'). It doesn't mention any prerequisites, exclusions, or alternative scenarios, leaving the agent to infer usage based on tool names alone.
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. Dates show when Glama detected each change.
3 tool updates
v1.0.0- First observed
get_author_stats - First observed
get_repository_overview - First observed
get_repository_stats
TDQS
The tools have significant overlap in purpose, making them hard to distinguish. Both get_repository_overview and get_repository_stats appear to provide repository-level statistics, with get_repository_stats explicitly mentioning 'commits, authors, branches, and code changes' while get_repository_overview mentions 'stats, top contributors, and recent activity'βthese descriptions suggest substantial redundancy. The only clearly distinct tool is get_author_stats, which focuses on contributor-level data.
All tool names follow a consistent verb_noun pattern using snake_case (get_author_stats, get_repository_overview, get_repository_stats). The naming is predictable and readable, with 'get' as the verb and descriptive nouns, showing no deviations in style or convention.
With only 3 tools, the server feels thin for a 'Git Analytics' domain, which typically involves more granular operations like trend analysis, commit filtering, or branch comparisons. While 3 tools can be appropriate for a minimal scope, the overlapping descriptions suggest this might be under-scoped, lacking depth in analytical capabilities.
The tool set is severely incomplete for a Git analytics server. It only provides 'get' operations for statistics, with no tools for filtering, comparing, trending, or analyzing specific aspects like code churn, hot spots, or temporal patterns. This limits agents to basic retrieval without supporting deeper analytical workflows, creating significant gaps in functionality.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.β¦
Repo intel for AI coding agents: overview, PRs, contributors, hot files, CI, deps. Remote MCP.
Generate answers & visualizations from your engineering data to track software development health.
Related MCP Servers
- AlicenseBqualityCmaintenanceAnalyzes git repository metrics to understand team health, development patterns, code quality, and collaboration through natural language queries. Provides insights on commit statistics, bus factor, velocity trends, technical debt, and burnout detection.12221MIT
- FlicenseNot gradedqualityDmaintenanceAnalyzes local Git repositories to provide detailed insights into commit statistics, contributor activity, and frequently changed files. It allows users to query repository history and access structured activity data through the Model Context Protocol.-
- AlicenseNot gradedqualityAmaintenanceProvides LLMs with code intelligence tools like relationship explanation, PR impact analysis, and health reports via the Model Context Protocol.3MIT
- FlicenseBqualityDmaintenanceProvides AI coding agents with structured Git repository context including project state, code structure, activity, and risk analysis without modifying or uploading code.53-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/singhashish4000/MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server