Skip to main content
Glama
Alosies

GitLab MCP Server

by Alosies
README.md
# GitLab MCP Server

A fully typed TypeScript [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for comprehensive GitLab integration.

<a href="https://glama.ai/mcp/servers/@Alosies/gitlab-mcp-server">
  <img width="200" height="105" src="https://glama.ai/mcp/servers/@Alosies/gitlab-mcp-server/badge" alt="GitLab MCP Server on Glama" />
</a>

## Quick Start

### 1. Get a GitLab Token

Create a [GitLab Personal Access Token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with `api`, `read_user`, and `read_repository` scopes.

### 2. Add to Claude Desktop

Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):

```json
{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": ["-y", "@alosies/gitlab-mcp-server"],
      "env": {
        "NPM_CONFIG_TOKEN": "your-gitlab-token-here"
      }
    }
  }
}
```

### 3. Start Using

Ask Claude things like:
- "List my GitLab projects"
- "Show me open issues in myproject"
- "Create a merge request from feature-branch to main"
- "Comment on MR #42 in myproject"
- "Show me MRs where I'm assigned as reviewer"
- "Mark MR #15 as ready for review"
- "Get the logs for job #123"

## Features

- **Projects**: List, get details
- **Issues**: List, get, create
- **Merge Requests**: List, get, create, update with full review workflow support
  - **Comments & Discussions**: Create notes, threaded discussions, inline code comments
  - **Review Management**: Resolve/unresolve discussions, mark as draft/ready
  - **Filtering**: Filter by reviewer, assignee, author
  - **Templates**: Use GitLab MR templates for descriptions
- **Pipelines**: List, get, create, retry, cancel, delete
- **Jobs**: List jobs, get logs with advanced trace options
- **Repository**: List branches, get commits
- **User**: Get current user info
- **TypeScript**: Fully typed with comprehensive type definitions

## Documentation

- **[Installation Guide](docs/installation.md)** - Detailed installation options and setup
- **[Available Tools](docs/tools.md)** - Complete list of tools and parameters  
- **[Configuration](docs/configuration.md)** - Optional configuration file setup
- **[Usage Examples](docs/examples.md)** - Real-world usage examples and workflows
- **[TypeScript Guide](docs/typescript.md)** - TypeScript usage and type definitions
- **[Development](docs/development.md)** - Contributing and development setup

## Self-Hosted GitLab

For self-hosted GitLab instances, add your base URL:

```json
{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": ["-y", "@alosies/gitlab-mcp-server"],
      "env": {
        "NPM_CONFIG_TOKEN": "your-token",
        "GITLAB_BASE_URL": "https://gitlab.mycompany.com"
      }
    }
  }
}
```

## Support

- **Issues**: [GitHub Issues](https://github.com/your-repo/issues)
- **GitLab API**: [GitLab API Documentation](https://docs.gitlab.com/ee/api/)
- **MCP Protocol**: [Model Context Protocol](https://modelcontextprotocol.io/)

## License

MIT License

TDQS

B3/5.0

Scored across 50 tools

Disambiguation4/5

Most tools are clearly separated by resource (projects, issues, MRs, pipelines, commits). However, there is some overlap between get_merge_request_diffs and list_merge_request_diffs, and between get_job_logs and get_job_trace, which could cause confusion.

Naming Consistency4/5

The naming mostly follows a consistent verb_noun pattern (list_, get_, create_, update_, delete_). Minor deviations include mark_mr_as_draft/mark_mr_as_ready and approve_mr/unapprove_mr, which are still readable but slightly inconsistent with the dominant pattern.

Tool Count3/5

50 tools is on the heavy side, but the server covers a broad GitLab domain (projects, issues, MRs, branches, commits, pipelines, users). The count is justified by the scope, though it borders on overwhelming and could benefit from consolidation.

Completeness4/5

The tool surface is quite comprehensive for GitLab workflows: project listing/creation, issue CRUD, MR lifecycle with discussions/approvals, pipelines, commits, and branches. Minor gaps include no project deletion/update, no issue update/delete, and no branch creation/deletion, but core workflows are well covered.

Maintenance

ActivityInactive
ResponsivenessUnresponsive