Skip to content
MCP server

Git MCP Server

MCP server giving AI clients read and write access to GitHub and GitLab repositories

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, API, self-hosted
Runs
Locally
Version
0.2.3
Listing updated
today

Similar MCP servers

About Git MCP Server

Git MCP Server is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

The README describes this as a modular MCP server that works with both GitHub and GitLab, so one configuration pattern covers either host. It exposes tools for repository files and branches, issues, pull or merge requests, CI pipelines and job logs, comments, and the current user.

Setup is a JSON entry for an MCP client such as Claude Desktop, launched through npx from the @raytien/git-mcp-server npm package. A personal access token is required. Self-hosted GitHub Enterprise and self-hosted GitLab are supported through a custom API URL, and a read-only switch disables write operations.

It suits developers who want an assistant to browse code, triage issues, open merge requests or check pipeline failures without leaving the chat. The README also notes that GitHub Actions runs map onto GitLab pipelines, so the same tool names work on both platforms.

Install

Run in a terminal

claude mcp add git-mcp-server --env GIT_TOKEN='<GIT_TOKEN>' -- npx -y @raytien/git-mcp-server

Add to claude_desktop_config.json

{
  "mcpServers": {
    "git-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@raytien/git-mcp-server"
      ],
      "env": {
        "GIT_TOKEN": "<GIT_TOKEN>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "git-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@raytien/git-mcp-server"
      ],
      "env": {
        "GIT_TOKEN": "<GIT_TOKEN>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "git-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@raytien/git-mcp-server"
      ],
      "env": {
        "GIT_TOKEN": "<GIT_TOKEN>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "git-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@raytien/git-mcp-server"
      ],
      "env": {
        "GIT_TOKEN": "<GIT_TOKEN>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "git-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@raytien/git-mcp-server"
      ],
      "env": {
        "GIT_TOKEN": "<GIT_TOKEN>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • GIT_PROVIDERProvider type: gitlab or github
  • GIT_TOKENPersonal Access Token for GitHub or GitLabRequired
  • GIT_API_URLAPI URL for self-hosted instances
  • GIT_READ_ONLYDisable write operations (true/false)

Tools this server provides (23)

Taken from the project documentation; the running server may differ.

get_file_contents
Read file content from repository
get_repository_tree
List directory structure
push_files
Push file changes in a single commit
create_branch
Create a new branch
list_branches
List repository branches
list_commits
List commit history
search_code
Search for code in repository
get_issue
Get a single issue
list_issues
List issues
create_issue
Create a new issue
update_issue
Update an issue
get_pull_request
Get a merge request
list_pull_requests
List merge requests
create_pull_request
Create a merge request
get_pull_request_diffs
Get merge request changes
merge_pull_request
Merge a merge request
get_pipeline
Get pipeline/workflow run status
list_pipelines
List pipelines/workflow runs
list_pipeline_jobs
List pipeline jobs/workflow jobs
get_job_log
Get job log output
create_comment
Add comment to issue/MR
list_comments
List comments
get_me
Get current authenticated user

What it does

Dual provider support
Works with GitHub, GitLab.com and self-hosted instances of either through the GIT_PROVIDER and GIT_API_URL settings.
Repository and branch tools
Reads files, lists directory trees and commits, searches code, pushes multi-file commits and creates branches.
Issue and merge request tools
Lists, fetches, creates and updates issues, and creates, reviews diffs for and merges pull or merge requests.
CI pipeline inspection
Lists pipelines and workflow runs, their jobs, and fetches job log output.
Read-only mode
A GIT_READ_ONLY setting disables all write operations for safer exploration.
Comment management
Lists and adds comments on issues and merge requests.

Good for

  • Asking an AI assistant to summarise open issues and suggest priorities
  • Drafting and opening a merge request from a set of local file changes
  • Diagnosing a failed CI pipeline by reading its job logs
  • Searching a codebase for a function or pattern across a repository
  • Auditing repository activity in read-only mode

Pricing

Open source

MIT licensed and free to run.

More servers for the same service

Git MCP Server FAQ

Which platforms does it support?

The README says it supports GitHub and GitLab, including GitHub Enterprise and self-hosted GitLab through a custom API URL.

Do I need an access token?

Yes. GIT_TOKEN is required, and the README gives setup steps for creating a GitHub classic token or a GitLab access token with specific scopes.

Can it run without write access?

Yes. Setting GIT_READ_ONLY to true disables write operations.

How is it installed?

The README configures it in Claude Desktop with npx running the @raytien/git-mcp-server package.

Is Git MCP Server free?

Yes. Git MCP Server is open source, so you can use and self-host it for free.

How do I add Git MCP Server to Claude Code?

Run this command in your terminal: claude mcp add git-mcp-server --env GIT_TOKEN='<GIT_TOKEN>' -- npx -y @raytien/git-mcp-server

What are the best alternatives to Git MCP Server?

The closest alternatives to Git MCP Server are Git MCP, GitHub, GitEasy MCP, Advanced GitLab MCP server and GitLab MCP Server.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers