git-mcp
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-mcpCreate a pull request for my current branch"
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-mcp
An stdio-based MCP server that automates creating Pull Requests (GitHub) and Merge Requests (GitLab) using git CLI, repository templates, and LLM-assisted content generation.
Features
🔍 Auto-detects platform (GitHub / GitLab) from your git remote URL
📝 Template-aware — uses your repo's PR/MR templates if available
🤖 LLM-powered — when no template exists, the MCP client generates context-aware PR/MR content from your diff and commit log
🚀 One-step publish — creates PRs/MRs directly via GitHub & GitLab APIs
Related MCP server: Git Workflow Automation MCP Server
Tools
Tool | Description |
| Returns current branch, default branch, remote URL, and detected platform |
| Lists all PR/MR templates found in the repository |
| Gathers diff, commit log, changed files, and template data for the LLM to compose PR/MR content |
| Creates a PR (GitHub) or MR (GitLab) with the given title and body |
Setup
Prerequisites
Node.js v18+
Git CLI installed and accessible in
PATH
Install
git clone https://github.com/your-username/git-mcp.git
cd git-mcp
npm install
npm run buildEnvironment Variables
Variable | Required | Description |
| For GitHub repos | GitHub Personal Access Token with |
| For GitLab repos | GitLab Personal Access Token with |
Configure MCP Client
Add to your MCP client configuration (e.g. Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"git-mcp": {
"command": "node",
"args": ["C:/path/to/git-mcp/dist/index.js"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here",
"GITLAB_TOKEN": "glpat-your_token_here"
}
}
}
}Usage
Once configured, ask your MCP client (e.g. Claude) something like:
"Create a pull request for my current branch"
The workflow:
get_repo_info— The LLM checks your repo contextprepare_merge_request— Gathers diff, log, and templatesThe LLM composes a PR/MR title and body (using your template if available)
publish_merge_request— Publishes to GitHub or GitLab
Development
npm run dev # Watch mode — recompiles on changes
npm run build # One-time build
npm start # Run the serverTemplate Discovery
The server searches for templates in these locations:
GitHub:
.github/pull_request_template.md.github/PULL_REQUEST_TEMPLATE.md.github/PULL_REQUEST_TEMPLATE/default.mddocs/pull_request_template.mdPULL_REQUEST_TEMPLATE.md
GitLab:
.gitlab/merge_request_templates/Default.md.gitlab/merge_request_templates/default.md
License
MIT
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 Servers
- Flicense-qualityDmaintenanceA lightweight tool that uses Mistral AI running locally to generate structured GitHub pull request descriptions from git diffs.
- FlicenseCqualityDmaintenanceProvides automated Git workflow tools for committing, creating pull requests, and merging with proper GitHub authentication handling. Supports complete Git workflows from commit to merge with dry run capabilities and conventional commit formatting.41
- Alicense-qualityCmaintenanceEnables automated GitHub Pull Request reviews using local Ollama, Cursor CLI, or Gemini CLI as AI providers. Supports customizable review prompts, comprehensive PR analysis, and optional auto-posting of reviews to GitHub.215MIT
- AlicenseBqualityCmaintenanceConnects LLMs to GitHub and GitLab to analyze pull and merge requests for logic, security, and architectural alignment. It provides tools for fetching diffs, file contents, and project metadata, alongside guided prompts for professional code reviews.1019ISC
Related MCP Connectors
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
AI code review for GitHub PRs with an MCP autofix loop for Claude Code and Cursor
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/pratik73/git-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server