Smart Git MCP Server & CLI
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 "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., "@Smart Git MCP Server & CLIReview 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.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Target repository directory path | |
| toRef | No | Ending git tag or commit hash (default: HEAD) | |
| fromRef | No | Starting git tag or commit hash | |
| maxCommits | No | Maximum number of recent commits to analyze (default: 25) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the full burden. It states it 'generates' notes, implying a read-only operation, but does not explicitly clarify side effects (e.g., no modifications to the repo). This is adequate but not fully transparent.
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, succinct sentence with no redundant words. It directly conveys the core purpose and output format without unnecessary elaboration.
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 lack of an output schema and annotations, the description provides sufficient context about what the tool produces (structured markdown categorized by type). It could mention dependencies on commit message conventions, but overall it is complete enough for basic usage.
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?
All parameters have descriptions in the schema, including defaults for toRef and maxCommits. The descriptions are clear enough for usage, though they do not add extra context beyond what the names and default values imply.
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 uses a specific verb 'generate' and clearly identifies the resource (release notes/changelog). It distinguishes the tool from siblings like git_status and git_review_diff, which serve different purposes.
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 does not explicitly state when to use this tool versus alternatives or mention any preconditions (e.g., requiring a git repository). It only describes the action without guidance on selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
git_resolve_conflictsA
Scan the repository for merge conflict markers (<<<<<<< HEAD) and provide synthesized resolution options.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Target repository directory path |
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. It says 'scan' and 'provide ... options', which suggests a non-mutating read operation, but it does not explicitly state that no files are modified, whether staging is affected, or what happens if no conflicts are found.
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 sentence that immediately communicates the purpose and outcome. There is no filler or repetitive content; every phrase earns its place.
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?
The tool is simple and the one parameter is well-covered by the schema, but with no output schema and no annotations, the description does not explain the form of the resolution options, behavior when no conflicts are found, or whether the tool changes the repository. It gives a general sense but not full completeness.
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?
Schema description coverage is 100% for the single 'cwd' parameter, which is already described as 'Target repository directory path'. The description itself adds no extra meaning, but with full schema coverage, a baseline of 3 is appropriate.
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 a specific action ('Scan the repository'), a specific target ('merge conflict markers') and what it produces ('synthesized resolution options'). It is readily distinguishable from sibling tools like git_status, git_smart_commit, git_review_diff, and git_release_changelog.
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 implies usage when merge conflict markers exist, but it does not explicitly state when to use it versus alternatives, nor does it mention any prerequisites or when not to use it. The context is adequate but purely implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
git_review_diffA
Perform an automated AI code review on git diff. Scans for security leaks, dangerous calls, code smells, and missing tests.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Target repository directory path | |
| stagedOnly | No | Analyze only staged changes. | |
| targetBranch | No | Base branch to compare against (e.g. 'main' or 'origin/main'). If omitted, reviews local uncommitted changes. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description must carry the full burden of behavioral transparency. It describes the core action (review and scan) but does not disclose potential side effects such as whether it modifies files, requires network access, or creates any artifacts. The read-only nature is assumed but not stated.
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 concise, consisting of two sentences that efficiently convey the tool's purpose and scope. It avoids redundancy or unnecessary detail, making it easy to parse 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?
For a simple tool with three parameters and no output schema, the description provides sufficient context for an agent to understand what it does and when to use it. It could mention the format of the review output (e.g., a report or comments), but this is not essential given the lack of an output schema.
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 schema already provides thorough descriptions for all three parameters (cwd, stagedOnly, targetBranch), covering their meanings and default behaviors. The tool description adds no additional parameter semantics beyond that, so it earns the baseline score for full schema coverage.
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 function: 'Perform an automated AI code review on git diff.' It identifies the specific resource (git diff) and the types of issues it scans for (security leaks, dangerous calls, code smells, missing tests). This distinguishes it from sibling tools like git_status or git_smart_commit.
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 implies the tool is for reviewing changes, but it does not explicitly state when to use it versus alternatives. Since sibling tools have clearly different purposes (status, commit, resolve, changelog), the usage context is somewhat implied, but no direct guidance or exclusion is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
git_smart_commitA
Analyze staged or current git diff to generate a standard Conventional Commit message with scope, rationale, and breaking change warnings.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Target repository directory path | |
| stagedOnly | No | If true, only analyze staged changes; otherwise analyzes all working directory diffs. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description alone carries the behavioral burden. It discloses the core analysis-to-generation flow and the staged/current distinction via 'staged or current git diff.' However, given the tool is named 'commit,' it never explicitly states it does NOT create or mutate a commit โ an agent could wrongly expect repo writes. The verb 'generate' implies non-mutation but leaves the safety profile ambiguous.
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?
A single sentence with zero filler, front-loaded with the action verb and resource, and the output details packed efficiently at the end. Every clause earns its place.
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?
With no output schema, the description must convey what is returned โ it does say a 'message' is generated, which covers that. But it leaves gaps: no clarity on whether the tool mutates the repo, no detail on the message's format/surface, and no statement of prerequisites (e.g., an existing commit history for generating scope). Adequate for a 2-param tool, but the mutation ambiguity is a real omission.
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?
Schema description coverage is 100%: cwd is 'Target repository directory path' and stagedOnly is fully explained with conditional behavior. The description adds only marginal value by echoing 'staged or current,' which maps to stagedOnly. With the schema doing the heavy lifting, baseline 3 applies.
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?
States a specific verb (Analyze), resource (git diff), and concrete output (Conventional Commit message with scope, rationale, breaking change warnings). This clearly differentiates it from siblings: git_status reports state, git_review_diff reviews diffs, git_resolve_conflicts resolves conflicts, git_release_changelog produces changelogs. An agent can distinguish it without opening any schema.
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 intended use (generate a commit message from a diff) is implied strongly by the purpose statement, but there is no explicit guidance on when NOT to use it or which sibling to prefer. For instance, it never says 'use git_review_diff when you want analysis rather than a message.' The usage window is inferable, not stated โ acceptable but not excellent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
git_statusA
Get structured status of current repository including staged, unstaged, untracked files and active branch.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Target repository directory path (defaults to current working directory) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations (e.g., readOnlyHint or destructiveHint) to disclose behavior. The description is neutral and does not explicitly state that the operation is non-mutating or that it does not have side effects. While 'status' implies a read-only operation, the description alone does not fully disclose behavioral traits beyond what is obvious from the tool name.
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, concise sentence that directly states what the tool does without any redundant phrasing or unrelated details. It is well-structured and easy to parse.
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 simplicity (one optional parameter, no output schema), the description is sufficiently complete. It names the input (cwd) and the output characteristics (structured status including staged, unstaged, untracked files, and active branch). There is no missing context that would prevent an agent from using the tool correctly.
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 only parameter, cwd, is clearly described as 'Target repository directory path' with a default behavior ('defaults to current working directory'). This fully explains its purpose and expected value, providing complete semantic meaning without ambiguity.
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 action (Get) and the resource (status of current repository), and specifies the included details (staged, unstaged, untracked files and active branch). This makes the tool's purpose unambiguous and distinct from the sibling tools (e.g., git_smart_commit, git_review_diff), which have different actions.
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 does not provide any guidance on when to use this tool versus alternatives. For example, it does not mention that this tool should be used for read-only status checks or that other tools are for commits or diffs. This lack of explicit usage context leaves the agent to infer the appropriate conditions.
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.
5 tool updates
v0.1.0- First observed
git_release_changelog - First observed
git_resolve_conflicts - First observed
git_review_diff - First observed
git_smart_commit - First observed
git_status
TDQS
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.
Git-backed platform for skills, tools, and context for AI agents
AI-native git hosting โ repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
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 gradedqualityAmaintenanceEnables 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.115MIT
- AlicenseNot gradedqualityBmaintenanceConnects AI tools to GitHub and local git repositories, enabling natural language management of issues, PRs, code analysis, and workflows.1MIT
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/rafim-dev/mcp-smart-git'
If you have feedback or need assistance with the MCP directory API, please join our Discord server