Smart Git MCP Server & CLI
This server provides Git workflow automation tools for AI assistants and CLI use.
git_status: Get a structured overview of the repository, including staged, unstaged, untracked files and the active branch.
git_smart_commit: Analyze staged or working-directory diffs to generate Conventional Commit messages with scope, rationale, and breaking-change detection.
git_review_diff: Run automated code review on diffs, scanning for security leaks, dangerous calls, code smells, and missing tests; optionally compare against a target branch.
git_resolve_conflicts: Scan the repository for merge conflict markers and provide synthesized resolution options.
git_release_changelog: Generate markdown release notes/changelogs categorized by features, fixes, and breaking changes, with configurable git refs and commit limits.
Provides Git workflow automation, including generating semantic Conventional Commits from diffs, auditing diffs for secrets and hazards, resolving merge conflicts, generating release changelogs, and reporting repository status.
Click 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., "@Smart Git MCP Server & CLI Review my staged changes for security issues."
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.
โก Smart Git MCP Server & CLI
Next-generation Model Context Protocol (MCP) server & CLI for Git workflows.
Semantic Conventional Commits, Pre-PR Secret Audits, Conflict Resolution, and Automated Release Notes for Claude Desktop, Cursor, Command Code, and Cline.
๐ Why mcp-smart-git?
AI coding assistants are brilliant at writing code, but they have zero hesitation about:
Accidentally staging API keys,
.envtokens, or database credentials in unified diffs.Writing lazy, chaotic commit messages (
"update stuff","fix").Creating catastrophic merge conflicts during branch merges.
mcp-smart-git gives your AI assistant a senior DevOps partner that analyzes git diffs safely and semantically.
Related MCP server: Git Commit MCP Server
๐ Quick Setup (MCP Stdio)
1. Cursor (.cursor/mcp.json)
{
"mcpServers": {
"smart-git": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/mcp-smart-git/dist/index.js"]
}
}
}2. Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"smart-git": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/mcp-smart-git/dist/index.js"]
}
}
}๐ ๏ธ MCP Tools Exposed
Tool | Parameters | Description |
|
| Parses diffs to generate structured Conventional Commits ( |
|
| Runs static analysis on diff lines for secret leaks (AWS keys, OpenAI tokens, private keys), |
|
| Scans repository for |
|
| Categorizes recent commit history into clean markdown release notes grouped by features, fixes, and chores. |
| - | Returns clean, token-efficient repository branch and tracking metrics. |
๐ป Standalone Terminal CLI Usage
No MCP client required! You can also execute it directly from your terminal:
# Clone & install dependencies
git clone https://github.com/rafim-dev/mcp-smart-git.git
cd mcp-smart-git
npm install
npm run build
# Generate conventional commit from current diff
node dist/index.js commit
# Run pre-PR secret audit & security score
node dist/index.js review
# Synthesize conflict resolution
node dist/index.js conflicts
# Generate release changelog
node dist/index.js changelog(Tip: Run npm link inside the directory to make the mcp-smart-git command globally available anywhere in your shell).
๐งช Testing & Verification
Includes a complete automated test suite (100% passing):
npm test๐ฆ Pro Distribution & Power Bundle
โก Download Compiled Zero-Config Bundle on Gumroad ($5.00+ Pay-What-You-Want)
๐ฎ Download on itch.io ($5.00+ Pay-What-You-Want)
๐ Get the 2-in-1 AI Developer Power Bundle (Includes
mcp-smart-git+schema-bridge-mcpat 20% off)
๐ License
MIT License. Authored by rafim_dev.
Available Tools
5 toolsgit_release_changelogA
Generate structured GitHub/GitLab release notes and changelog markdown categorized by features, fixes, and breaking changes.
Inputs: cwd, toRef, fromRef, maxCommits.
git_resolve_conflictsA
Scan the repository for merge conflict markers (<<<<<<< HEAD) and provide synthesized resolution options.
Inputs: cwd.
git_review_diffA
Perform an automated AI code review on git diff. Scans for security leaks, dangerous calls, code smells, and missing tests.
Inputs: cwd, stagedOnly, targetBranch.
git_smart_commitA
Analyze staged or current git diff to generate a standard Conventional Commit message with scope, rationale, and breaking change warnings.
Inputs: cwd, stagedOnly.
git_statusA
Get structured status of current repository including staged, unstaged, untracked files and active branch.
Inputs: cwd.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: status, commit generation, review, conflict resolution, and changelog generation. No overlapping functionality or ambiguity between tool names.
All tools share the git_ prefix, but naming patterns mix noun-style (git_status) and verb-style (git_smart_commit, git_review_diff). Consistent enough, with minor variation in the second component.
Five tools is a well-scoped set for a Git-focused MCP server, covering distinct high-value operations without redundancy or bloat.
The toolset covers core Git workflow needsโstatus, commit, review, conflict resolution, and changelog generation. It lacks explicit staging/diffing commands, but the focus on AI-assisted Git operations makes the coverage appropriate.
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Plain-English git for agents: 22 tools to branch, commit, push and tag. Free tier.
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Git-backed platform for skills, tools, and context for AI agents
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to interact with local Git repositories for operations like status, commits, branching, and diffs, plus GitHub API integration for managing pull requests when authenticated.-
- AlicenseAqualityDmaintenanceEnables AI assistants to create conventional Git commits, update changelogs, and optionally push changes to remote repositories.22MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to perform full Git operations including branching, committing, pushing, stashing, rebasing, and more, with safety features and support for advanced workflows like Git Flow and LFS.1MIT
- AlicenseNot gradedqualityDmaintenanceConnects AI tools to GitHub and local git repositories, enabling natural language management of issues, PRs, code analysis, and workflows.1MIT