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
{
"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
{
"mcpServers": {
"git": {
"command": "npx",
"args": ["-y", "@raytien/git-mcp-server"],
"env": {
"GIT_PROVIDER": "gitlab",
"GIT_API_URL": "https://gitlab.your-company.com/api/v4",
"GIT_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx"
}
}
}
}Read-Only Mode
{
"mcpServers": {
"git": {
"command": "npx",
"args": ["-y", "@raytien/git-mcp-server"],
"env": {
"GIT_PROVIDER": "github",
"GIT_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx",
"GIT_READ_ONLY": "true"
}
}
}
}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
src/
├── index.ts # Entry point
├── server.ts # MCP server (provider-agnostic)
├── config.ts # Configuration (multi-provider)
├── providers/ # Platform abstraction
│ ├── interface.ts # GitProvider interface
│ ├── types.ts # Platform-agnostic types
│ ├── config.ts # Provider configuration
│ ├── factory.ts # Provider Factory (creates GitLab/GitHub)
│ ├── gitlab/ # GitLab implementation
│ └── github/ # GitHub implementation
├── tools/ # Tool definitions
│ ├── define.ts # defineTool helper
│ ├── registry.ts # Tool registry
│ ├── repository/ # Repository tools
│ ├── issues/ # Issue tools
│ ├── merge-requests/ # PR/MR tools
│ ├── pipelines/ # CI/CD tools
│ ├── notes/ # Comment tools
│ └── users/ # User tools
├── gitlab/ # GitLab API client
│ ├── client.ts # HTTP client
│ └── types.ts # GitLab API types
├── github/ # GitHub API client
│ ├── client.ts # HTTP client
│ └── types.ts # GitHub API types
├── auth/ # Authentication
└── lib/ # UtilitiesDevelopment
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Run locally
npm start
# Development mode (watch)
npm run devAdding a New Tool
Create file:
src/tools/{category}/{action}.ts
import { z } from 'zod';
import { defineTool, repoParam } from '../define.js';
const schema = z.object({
repo: repoParam,
// ... your params
});
export const myTool = defineTool({
name: 'my_tool',
description: 'What this tool does',
schema,
category: 'my-category',
read_only: true,
handler: async (input, ctx) => {
return ctx.provider.repository.someMethod(input.repo, ...);
},
});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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.