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
๐ Installation
Prerequisites
Node.js 18+
npm or yarn
Git repository to analyze
Quick Setup
Development Mode
๐ Usage
As MCP Server
Add to your MCP client configuration:
Direct CLI Usage
๐ Example Analytics
Repository Overview
Author Analysis
Code Churn Analysis
๐ง 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
๐งช Testing
Test Repository Setup
๐ 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:
Integration Examples
๐ 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
๐ค 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
๐ 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.