Git Code Review MCP
Provides tools to access git repository information, including listing staged files, viewing diffs of changes, and retrieving file contents to facilitate AI-driven code reviews.
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 Code Review MCPReview my staged changes and check for any potential 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.
Git Code Review MCP
An MCP (Model Context Protocol) server that allows AI to review your changes before pushing. This tool provides AI assistants with access to git repository information, staged files, and diffs to help with code review workflows.
Features
Get Staged Files: List all files currently staged for commit
View Diffs: Show the diff of staged changes with space-change filtering
File Content Access: Retrieve the content of any file from the repository
Repository Agnostic: Works with any git repository by specifying the path
Example MCP Client Configuration
If you're using this with an MCP client, add it to your configuration:
{
"mcpServers": {
"git-codereview": {
"command": "npx",
"args": ["git-codereview"]
}
}
}Related MCP server: GitHub Repo Explainer MCP
Installation
The easiest way to use this MCP server is with npx:
npx git-codereviewThis will run the MCP server directly without needing to install it globally.
Alternative Installation Methods
Global Installation
npm install -g git-codereview
git-codereviewLocal Development
git clone https://github.com/AyoubTRD/git-codereview-mcp.git
cd git-codereview-mcp
npm install
npm run build
node build/index.jsUsage
This MCP server runs over stdio and is designed to be used with MCP-compatible AI tools. The server provides three main tools:
Available Tools
get_staged_files
Lists all files currently staged for commit
Requires:
repoPath(full path to git repository)
get_diff
Shows the diff of staged files with added/modified filter
Ignores whitespace changes for cleaner output
Requires:
repoPath(full path to git repository)
get_file_content
Retrieves the content of any file from the repository
Useful when diff doesn't provide enough context
Requires:
repoPath(full path to git repository) andfilePath(relative path to file)
Requirements
Node.js (version 16 or higher)
Git repository (the target repository must be git-initialized)
MCP-compatible AI tool or client
License
ISC
Contributing
Issues and pull requests are welcome at GitHub.
Available Tools
3 toolsget_diffGet DiffC
Retrieve the diff of staged files in a git repository
| Name | Required | Description | Default |
|---|---|---|---|
| repoPath | Yes | Full path to the git repository. |
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 states the action 'retrieve' but lacks details on permissions needed, error handling (e.g., if no staged files exist), output format, or any side effects. This is a significant gap for a tool that interacts with a git repository.
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, clear sentence with no wasted words, making it highly concise and front-loaded. It efficiently conveys the core purpose 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 annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like what the diff output looks like, error conditions, or how it differs from sibling tools, leaving gaps for an AI agent to understand full 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?
The input schema has 100% coverage, with one parameter 'repoPath' fully described. The description adds no additional meaning beyond the schema, such as examples or constraints, but the schema's completeness justifies the baseline score of 3.
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 verb 'retrieve' and the resource 'diff of staged files in a git repository', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_staged_files', which might retrieve similar information without diff details.
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 alternatives like 'get_staged_files' or 'get_file_content'. There's no mention of prerequisites, such as needing a git repository with staged changes, or any exclusions for usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_file_contentGet File ContentA
Retrieve the content of a file in a git repository. Use it when the diff doesn't provide enough context.
| Name | Required | Description | Default |
|---|---|---|---|
| repoPath | Yes | Full path to the git repository. | |
| filePath | Yes | Relative path to the file within the repository |
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 mentions the tool retrieves file content, which implies a read-only operation, but doesn't disclose behavioral traits like error handling, performance, or authentication needs. The description adds basic context but lacks depth for a tool with no annotation coverage.
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 two sentences with zero waste: the first states the purpose, and the second provides usage guidance. It's front-loaded with essential information and appropriately sized for the tool's complexity.
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 no annotations and no output schema, the description is complete enough for a simple read operation with clear purpose and usage guidelines. However, it lacks details on return format or error cases, which would be helpful for full contextual understanding.
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%, so the schema already documents both parameters (repoPath and filePath) fully. The description doesn't add any parameter-specific details beyond what the schema provides, such as format examples or constraints, meeting the baseline for high 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 specific action ('Retrieve the content') and resource ('a file in a git repository'), distinguishing it from siblings like get_diff (which shows differences) and get_staged_files (which lists staged files). It precisely defines what the tool does.
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 explicitly states when to use this tool: 'Use it when the diff doesn't provide enough context.' This provides clear guidance on usage context and implies an alternative (get_diff), helping the agent choose between siblings effectively.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_staged_filesGet Staged FilesC
Retrieve the list of staged files in a git repository
| Name | Required | Description | Default |
|---|---|---|---|
| repoPath | Yes | Full path to the git repository. |
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 states the tool retrieves a list but doesn't describe the return format (e.g., array of file names, detailed metadata), pagination, error handling, or performance implications. 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 directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every part of the sentence earns its place by conveying essential information.
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 annotations and output schema, the description is incomplete for a tool that retrieves data. It doesn't explain what the returned list contains (e.g., file names, paths, status), how errors are handled, or any limitations (e.g., large repositories). For a read operation with no structured output documentation, this leaves the agent with insufficient context 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 'repoPath' clearly documented as 'Full path to the git repository.' The description doesn't add any parameter details beyond this, so it meets the baseline of 3 where the schema does the heavy lifting, but doesn't compensate with additional context like format examples or constraints.
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 ('Retrieve') and resource ('list of staged files in a git repository'), making the tool's purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_diff' or 'get_file_content', which might also retrieve git-related information but for different resources.
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 alternatives like 'get_diff' or 'get_file_content'. It lacks context about scenarios where staged files are needed, prerequisites (e.g., repository must exist), or exclusions (e.g., not for unstaged files).
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
v0.1.0- First observed
get_diff - First observed
get_file_content - First observed
get_staged_files
TDQS
The tools have distinct purposes: get_diff retrieves diff content, get_file_content provides full file content for context, and get_staged_files lists staged files. While get_diff and get_file_content could be confused for overlapping file content retrieval, the descriptions clarify that get_file_content is for supplemental context when diff is insufficient, maintaining reasonable separation.
All tool names follow a consistent verb_noun pattern with 'get_' prefix: get_diff, get_file_content, get_staged_files. This uniformity makes the tool set predictable and easy to understand, with no deviations in naming style.
With only 3 tools, the set feels thin for a code review domain, which typically involves more operations like commenting, approving, or managing reviews. While the tools cover basic retrieval needs, the count is borderline low for the apparent scope, limiting functionality.
The tool set is severely incomplete for code review workflows. It only provides retrieval operations (get_diff, get_file_content, get_staged_files) but lacks essential actions like creating comments, submitting reviews, or managing pull requests. This creates significant gaps that will cause agent failures in performing full code review tasks.
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
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Git-backed platform for skills, tools, and context for AI agents
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
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.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to access live GitHub repository data without cloning, supporting repo summarization, file explanation, recent changes, and dependency analysis.MIT
- FlicenseBqualityDmaintenanceEnables AI assistants to inspect local Git repositories and interact with the GitHub API for reading commits, diffs, files, issues, comments, pull requests, and project boards.10607-
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to inspect Git repositories for changes across committed, staged, unstaged, and untracked scopes, and run allowlisted validation commands with structured results.-
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/AyoubTRD/git-codereview-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server