ray0907 avatar

Git Mcp Server

ray0907/git-mcp-server

This is a unified Git interface that works with both GitHub and GitLab through a single MCP server. It exposes the full workflow: reading files and directory trees, pushing commits, managing branches, handling issues and pull requests, checking CI/CD pipeline status and job logs, and posting comments. You configure it with an environment variable to point at GitHub, GitHub Enterprise, GitLab SaaS, or self-hosted GitLab, then use the same tool names regardless of platform. Includes a read-only mode if you want to prevent writes. Reach for this when you want Claude to interact with your Git repositories without switching between provider-specific servers or APIs.

tools
23
auth
Secret needed
transport
STDIO
env vars
4
last updated
Dec 8, 2025

Tools

23 tools

Public tool metadata for what this MCP can expose to an agent.

get_file_contentsRead file content from repository

Read file content from repository

No parameter schema in public metadata yet.

get_repository_treeList directory structure

List directory structure

No parameter schema in public metadata yet.

push_filesPush file changes in a single commit

Push file changes in a single commit

No parameter schema in public metadata yet.

create_branchCreate a new branch

Create a new branch

No parameter schema in public metadata yet.

list_branchesList repository branches

List repository branches

No parameter schema in public metadata yet.

list_commitsList commit history

List commit history

No parameter schema in public metadata yet.

search_codeSearch for code in repository

Search for code in repository

No parameter schema in public metadata yet.

get_issueGet a single issue

Get a single issue

No parameter schema in public metadata yet.

list_issuesList issues

List issues

No parameter schema in public metadata yet.

create_issueCreate a new issue

Create a new issue

No parameter schema in public metadata yet.

update_issueUpdate an issue

Update an issue

No parameter schema in public metadata yet.

get_pull_requestGet a merge request

Get a merge request

No parameter schema in public metadata yet.

list_pull_requestsList merge requests

List merge requests

No parameter schema in public metadata yet.

create_pull_requestCreate a merge request

Create a merge request

No parameter schema in public metadata yet.

get_pull_request_diffsGet merge request changes

Get merge request changes

No parameter schema in public metadata yet.

merge_pull_requestMerge a merge request

Merge a merge request

No parameter schema in public metadata yet.

get_pipelineGet pipeline/workflow run status

Get pipeline/workflow run status

No parameter schema in public metadata yet.

list_pipelinesList pipelines/workflow runs

List pipelines/workflow runs

No parameter schema in public metadata yet.

list_pipeline_jobsList pipeline jobs/workflow jobs

List pipeline jobs/workflow jobs

No parameter schema in public metadata yet.

get_job_logGet job log output

Get job log output

No parameter schema in public metadata yet.

create_commentAdd comment to issue/MR

Add comment to issue/MR

No parameter schema in public metadata yet.

list_commentsList comments

List comments

No parameter schema in public metadata yet.

get_meGet current authenticated user

Get current authenticated user

No parameter schema in public metadata yet.

Sponsors

Configuration

GIT_PROVIDER

Provider type: gitlab or github

GIT_TOKEN*secret

Personal Access Token for GitHub or GitLab

GIT_API_URL

API URL for self-hosted instances

GIT_READ_ONLY

Disable write operations (true/false)

Readme

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
{
  "mcpServers": {
    "git": {
      "command": "npx",
      "args": ["-y", "@raytien/git-mcp-server"],
      "env": {
        "GIT_PROVIDER": "github",
        "GIT_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}
GitHub Enterprise
{
  "mcpServers": {
    "git": {
      "command": "npx",
      "args": ["-y", "@raytien/git-mcp-server"],
      "env": {
        "GIT_PROVIDER": "github",
        "GIT_API_URL": "https://github.your-company.com/api/v3",
        "GIT_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}
GitLab.com (SaaS)
{
  "mcpServers": {
    "git": {
      "command": "npx",
      "args": ["-y", "@raytien/git-mcp-server"],
      "env": {
        "GIT_PROVIDER": "gitlab",
        "GIT_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}
Self-Hosted GitLab

View the full README on GitHub

Details

Repository
github.com/ray0907/git-mcp-server
Category
Developer Tools
Package
@raytien/git-mcp-server
Transport
STDIO
Auth
Required
Registry
MCP registry, active

Related Developer Tools MCP servers

View all
1b1ff avatarAtlassian Dc Mcp Bitbucketb1ff/atlassian-dc-mcpMCP server for Atlassian Bitbucket Data Center - interact with repositories and code108stars
2sirlordt avatarVscode Terminal Mcpsirlordt/vscode-terminal-mcpExecute commands in visible VSCode terminal tabs with output capture and session reuse.1stars
3cyanheads avatarGit Mcp Servercyanheads/git-mcp-serverComprehensive Git MCP server enabling native git tools including clone, commit, worktree, & more.245stars
4b1ff avatarAtlassian Dc Mcp Jirab1ff/atlassian-dc-mcpMCP server for Atlassian Jira Data Center - search, view, and create issues108stars
5atlassian avatarAtlassian Rovo MCP Serveratlassian/atlassian-mcp-serverConnect to Atlassian Jira, Confluence, Loom, and more to search, create, and manage your work.1.1Kstars
6sooperset avatarAtlassiansooperset/mcp-atlassianProvides MCP access to Jira and Confluence data and actions via tokens and environment-based configuration.5.2Kstars