Provides core repository management capabilities including reading file contents, exploring directory structures, creating branches, and pushing commits.
Enables comprehensive interaction with GitHub repositories, allowing for the management of issues, pull requests, and repository comments across both GitHub.com and Enterprise environments.
Allows for monitoring GitHub Actions workflow runs, including checking statuses and retrieving job log output.
Enables interaction with GitLab projects, supporting management of issues, merge requests, pipelines, and project comments for both SaaS and self-hosted instances.
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 MCP Serverlist the open pull requests in the frontend repository"
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 Server
A clean, modular Git MCP server supporting both GitHub and GitLab.
Quick Start
Claude Desktop Configuration
Add to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
GitHub
GitHub Enterprise
GitLab.com (SaaS)
Self-Hosted GitLab
Read-Only Mode
Get Your Token
GitHub
Go to GitHub > Settings > Developer settings > Personal access tokens > Tokens (classic)
Generate new token with scopes:
repo,read:org,workflowCopy the token (starts with
ghp_)
GitLab
Go to GitLab > Settings > Access Tokens
Create a new token with scopes:
api,read_api,read_repository,write_repositoryCopy the token (starts with
glpat-)
Available Tools
Repository
Tool | Description |
| Read file content from repository |
| List directory structure |
| Push file changes in a single commit |
| Create a new branch |
| List repository branches |
| List commit history |
| Search for code in repository |
Issues
Tool | Description |
| Get a single issue |
| List issues |
| Create a new issue |
| Update an issue |
Pull/Merge Requests
Tool | Description |
| Get a merge request |
| List merge requests |
| Create a merge request |
| Get merge request changes |
| Merge a merge request |
CI/CD (Pipelines / Workflow Runs)
Tool | Description |
| Get pipeline/workflow run status |
| List pipelines/workflow runs |
| List pipeline jobs/workflow jobs |
| Get job log output |
Note: GitHub Actions workflow runs map to GitLab pipelines. The same tools work for both platforms.
Comments
Tool | Description |
| Add comment to issue/MR |
| List comments |
Users
Tool | Description |
| Get current authenticated user |
Configuration
Environment Variable | Required | Default | Description |
| No |
| Provider type: |
| Yes | - | Personal Access Token |
| No | Provider default | API URL (auto-detected from provider) |
| No |
| Auth type: |
| No |
| Disable write operations |
| No |
| Log level: |
Architecture
Development
Adding a New Tool
Create file:
src/tools/{category}/{action}.ts
Export from category index:
src/tools/{category}/index.tsAdd to allTools:
src/tools/index.ts
Inspired By
gitlab-mcp - GitLab MCP server
github-mcp-server - Official GitHub MCP server
License
MIT