This MCP server implements the Model Control Protocol using the mcp-go library, allowing you to run a simple MCP server with built-in tools such as the Git Summary tool for analyzing commit messages.
To run the MCP server, use the following command:
go run cmd/server/main.go
By default, the server runs on port 8080. You can configure a different port by setting the DCR_MCP_PORT
environment variable:
export DCR_MCP_PORT=9000
go run cmd/server/main.go
The Git Summary tool is a built-in feature that analyzes git commit messages and generates concise, categorized summaries using OpenAI.
The Git Summary tool accepts the following JSON parameters:
{
"repo_url": "https://github.com/username/repo",
"branch": "main",
"start_date": "2023-01-01",
"end_date": "2023-12-31",
"author": "author-name",
"api_key": "your-openai-api-key"
}
The tool returns a formatted markdown summary of commits organized by categories, for example:
# Work Summary
**Feature Enhancements**
- Added support for filtering commits by author name. Users can now specify an optional author parameter to focus on contributions from specific team members.
**Bug Fixes**
- Fixed date parsing issues that were causing incorrect commit ranges. The system now correctly handles various date formats and timezone considerations.
**Documentation**
- Added comprehensive README with usage examples and parameter descriptions. New users will find it easier to understand how to use the tool effectively.
You can verify your installation is working correctly by running the tests:
go test ./...
Alternatively, for a more readable output format:
gotestum --format-hide-empty-pkg --format testdox --format-icons hivis
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "git-summary" '{"command":"go","args":["run","cmd/server/main.go"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"git-summary": {
"command": "go",
"args": [
"run",
"cmd/server/main.go"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"git-summary": {
"command": "go",
"args": [
"run",
"cmd/server/main.go"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect