Get the FREE Ultimate OpenClaw Setup Guide →

gitlab

Community GitLab MCP Server — works with any GitLab tier (Free/Premium/Ultimate), no Duo required. GraphQL schema discovery, repo browsing, multi-client support (Claude Code, LibreChat).

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ttpears-gitlab-mcp npx -y @ttpears/gitlab-mcp-server \
  --env GITLAB_URL="https://gitlab.com" \
  --env GITLAB_SHARED_ACCESS_TOKEN="glpat-your-token-here"

How to use

This MCP server provides a flexible GitLab integration that works with GitLab Free, Premium, or Ultimate instances. It exposes a range of search, read, and write operations that let MCP clients discover projects, issues, merge requests, users, and more, and it supports both single-user and multi-user deployments depending on your environment. The server relies on a GitLab Personal Access Token (PAT) or a shared token for authentication and can be driven by clients like Claude Code or LibreChat. Tools include global searches, project and group lookups, repository browsing, file reads, and a variety of write operations for creating or updating issues, MRs, and notes, all exposed through the MCP protocol.

To use it with Claude Code, configure your mcpServers section to point at the server via npx, and provide the required environment variables for GitLab access. For multi-user deployments via LibreChat, run the Docker-based setup and configure the streamable HTTP transport so clients can connect and authenticate per-user as needed. The available tools cover discovery (search_gitlab, search_projects, search_issues, search_merge_requests, search_users, search_groups, etc.), read operations (get_project, get_issues, get_merge_requests, get_notes, list_milestones, etc.), and write operations (create_issue, create_merge_request, create_note, update_issue, update_merge_request, manage_pipeline).

How to install

Prerequisites:\n- Node.js and npm (for npx usage) or a compatible runtime if you prefer an alternate setup.\n- GitLab Personal Access Token (PAT) or shared access token with appropriate scopes (read_api or api).\n\nInstallation steps:\n1) Ensure Node.js and npm are installed.\n2) Install or run the MCP server via npx using the quick start command:\n\nbash\nnpx -y @ttpears/gitlab-mcp-server\n\n3) Set required environment variables for GitLab access when running the server, e.g.:\nbash\nexport GITLAB_URL=https://gitlab.com\nexport GITLAB_SHARED_ACCESS_TOKEN=glpat-your-token-here\n\n4) Start the server (if the CLI doesn’t auto-run) and point your MCP client to the server as configured. For Claude Code, embed the npx command in your mcp.json; for LibreChat, follow the Docker/ENV setup in the README.\n\nIf you prefer a containerized approach for LibreChat multi-user deployments, follow the Docker/LibreChat guide in the README to run the sidecar container and configure the streamable-http transport.

Additional notes

Environment variables you may need to configure include: GITLAB_URL (GitLab instance URL), GITLAB_AUTH_MODE (hybrid, shared, or per-user), GITLAB_SHARED_ACCESS_TOKEN (shared token for reads), GITLAB_MAX_PAGE_SIZE, GITLAB_TIMEOUT, and GITLAB_MCP_PORT for LibreChat deployments. The MCP server supports hybrid multi-user authentication by default, with per-user credentials for writes, and offers GraphQL discovery for flexible queries. If you encounter authentication issues, verify token scopes and that the token is valid for the GitLab instance you’re targeting. When using LibreChat, ensure that the port mappings and transport are correctly configured (http streamable transport is used in the Docker setup).

Related MCP Servers

Sponsor this space

Reach thousands of developers