Git MCP Server logo

Git MCP Server

Connect AI agents to GitHub or GitLab for repository, issue, merge request, pipeline, and comment operations.

Install Git MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "git-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@raytien/git-mcp-server"
      ],
      "env": {
        "GIT_TOKEN": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Automated check passed— started and listed 23 tools correctly ().

Overview

The git-mcp-server MCP server connects AI agents to GitHub and GitLab through their APIs. It provides tools for reading repositories, searching code, managing branches and files, handling issues and pull or merge requests, and inspecting CI/CD runs. Use it when an agent needs authenticated repository workflows, with optional read-only mode for safer access.

Use cases

  • Read repository files and search code
  • Create branches and push committed file changes
  • Manage issues and pull or merge requests
  • Inspect pipeline jobs and logs
  • Switch between GitHub and GitLab deployments

Key features

  • GitHub and GitLab provider support
  • Repository browsing, code search, and file pushes
  • Issue and pull or merge request management
  • Pipeline, workflow, job, and log inspection
  • Comment creation and listing
  • Global read-only mode

Tools23

What Git MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~3.7k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

17/19 checks healthy over the last 111d

What it can do

From the 23 tools this server returned when we ran it.

Can delete or modify data · 1Makes network requests · 6Read-only tools · 22
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age340 days
Maintainers1

Observed 2026-11-13 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · @raytien/git-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads228Package downloads in the last 30 days.
Last commit11mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed23Callable tools this server registers over MCP.
Directory activity13 viewsConfig copies, upvotes, and views on AllMCPs.

How Git MCP Server works

What the git-mcp-server MCP server does

The git-mcp-server MCP server exposes a provider-neutral set of GitHub and GitLab operations through MCP. It can read file contents, list repository trees, search code, inspect branches and commits, create branches, and push multiple file changes in one commit.

Repository collaboration is covered through issue and pull or merge request tools. Agents can retrieve, list, create, and update issues; retrieve and list pull or merge requests; inspect request diffs; create requests; and merge them. Comment tools add and list comments on issues or merge requests.

The server also provides CI/CD access. Agents can retrieve or list pipeline and workflow runs, list jobs, and read job logs. GitHub Actions workflow runs are represented through the same pipeline-oriented tools used for GitLab pipelines. The get_me tool returns the currently authenticated user.

How it works

The server selects GitLab or GitHub from configuration and uses a provider abstraction so the MCP tools expose the same general operations for either platform. Provider-specific clients handle the corresponding API calls, while shared tool definitions and platform-agnostic types keep the interface consistent.

Authentication uses a personal access token. GitHub and GitLab require different token scopes, and the API endpoint can be changed for GitHub Enterprise or self-hosted GitLab. The GIT_AUTH_TYPE setting supports bearer or private-token authentication.

Setup and configuration

Run the package with npx -y @raytien/git-mcp-server from an MCP client configuration. The README provides a Claude Desktop configuration using the command and args fields. Set GIT_PROVIDER to github or gitlab; it defaults to gitlab. Set GIT_TOKEN to a suitable personal access token.

Use GIT_API_URL when connecting to GitHub Enterprise or a self-hosted GitLab instance. Set GIT_READ_ONLY to true to disable write operations. LOG_LEVEL accepts debug, info, warn, or error, and defaults to info.

For GitHub, the documented token scopes are repo, read:org, and workflow. For GitLab, the documented scopes are api, read_api, read_repository, and write_repository.

Tools and capabilities

The tool groups cover:

  • Repository files, trees, branches, commits, and code search
  • Issues and issue updates
  • Pull or merge request creation, review data, diffs, and merging
  • Pipelines, workflow runs, jobs, and job logs
  • Issue or merge request comments
  • Authenticated-user details

The git-mcp-server MCP server supports both read operations and changes, so use read-only mode when the agent should not modify repositories or collaboration records.

Limitations and notes

Provider behavior depends on the token permissions and the selected API endpoint. Write tools remain available in the interface unless GIT_READ_ONLY is enabled, and insufficient token permissions can prevent those operations from succeeding.

It also does not describe fine-grained permission handling beyond token scopes and the global read-only setting.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Git MCP Server

git-mcp-server is an MCP server that connects AI agents to GitHub and GitLab repositories through their APIs. Its main tools read files and trees, manage branches and commits, work with issues and pull or merge requests, inspect pipelines and jobs, add comments, search code, and identify the authenticated user.

Install it through an MCP client configuration that runs `npx -y @raytien/git-mcp-server`. The documented setup targets Claude Desktop; add the command, package argument, provider, and personal access token to the client's configuration.

Set `GIT_PROVIDER` to `github` or `gitlab` and provide `GIT_TOKEN`. Use `GIT_API_URL` for GitHub Enterprise or self-hosted GitLab; otherwise the provider's default API endpoint is used.

Set `GIT_READ_ONLY` to `true` in the server environment. This disables write operations while retaining the documented repository, issue, merge request, pipeline, comment, and user tools.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGit MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/git-mcp-server?style=directory)](https://allmcps.com/mcp/git-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/git-mcp-server"><img src="https://allmcps.com/api/badge/git-mcp-server?style=directory" alt="Git MCP Server on AllMCPs" /></a>