Price Per TokenPrice Per Token

GitLab MCP Server

by ttpears

GitHub 1 706 uses Remote
0

About

GitLab MCP Server is a GraphQL-powered integration that enables AI assistants to explore, search, and manage GitLab repositories, issues, and merge requests. Key features of GitLab MCP Server: - Global search across projects, issues, merge requests, users, and groups - Repository browsing including file structure navigation and content retrieval - Automatic GraphQL schema discovery for dynamic query capabilities - Support for both GitLab.com and self-hosted GitLab instances - Dual authentication modes with shared read-only access and per-user tokens for write operations - Issue and merge request management tools

README

GitLab MCP Server

A Model Context Protocol (MCP) server for GitLab that leverages GraphQL with automatic schema discovery and supports self-hosted GitLab instances. Perfect for LLM-powered GitLab exploration and analysis.

⚡ Quick Start (Claude Desktop & Claude Code)

The fastest way to get started with GitLab MCP:

1. Get Your GitLab Token

Create a GitLab Personal Access Token with read_api or api scope:
  • Go to GitLab → User SettingsAccess Tokens
  • Create token with appropriate scope
  • Copy the token (e.g., glpat-xxxxxxxxxxxx)
  • 2. Configure Claude Desktop or Claude Code

    For Claude Desktop - Add to claude_desktop_config.json:

    {
      "mcpServers": {
        "gitlab": {
          "command": "npx",
          "args": ["-y", "gitlab-mcp-server"],
          "env": {
            "GITLAB_URL": "https://gitlab.com",
            "GITLAB_SHARED_ACCESS_TOKEN": "glpat-your-token-here",
            "GITLAB_AUTH_MODE": "hybrid"
          }
        }
      }
    }
    

    For Claude Code CLI - Add to .clauderc:

    {
      "mcpServers": {
        "gitlab": {
          "command": "npx",
          "args": ["-y", "gitlab-mcp-server"],
          "env": {
            "GITLAB_URL": "https://gitlab.com",
            "GITLAB_SHARED_ACCESS_TOKEN": "glpat-your-token-here",
            "GITLAB_AUTH_MODE": "hybrid"
          }
        }
      }
    }
    

    3. Restart Claude

    Restart Claude Desktop or Claude Code to load the GitLab MCP server.

    4. Test It

    Try asking Claude:
  • "Search for issues in project X"
  • "Show me recent merge requests"
  • "Browse the repository structure of project Y"
  • 🔍 Test with MCP Inspector

    Test your configuration before using it with Claude:

    # Test with MCP Inspector (interactive UI)
    npx @modelcontextprotocol/inspector npx gitlab-mcp-server
    

    Set environment variables when prompted or create mcp-inspector.example.json:

    {
      "command": "npx",
      "args": ["-y", "gitlab-mcp-server"],
      "env": {
        "GITLAB_URL": "https://gitlab.com",
        "GITLAB_SHARED_ACCESS_TOKEN": "glpat-your-test-token"
      }
    }
    

    🚀 Recent Updates (2026-01-26)

    Major modernization for universal MCP support:

  • Claude Desktop & Claude Code support - Easy npx installation with stdio transport
  • Removed deprecated SSE transport - Clean Streamable HTTP only for LibreChat
  • Enhanced logging - Clear transport mode detection and configuration display
  • Quick start documentation - Copy-paste configs for all MCP clients
  • MCP Inspector support - Easy testing and debugging
  • Single codebase - Auto-detects stdio vs HTTP mode based on environment
  • These changes make GitLab MCP work seamlessly across all MCP clients while simplifying deployment.

    Key Features for LLMs

  • 🔍 Comprehensive Search: Global search across projects, issues, merge requests, users, and groups
  • 📂 Code Exploration: Browse repository structure and read file contents
  • 🤝 Dual Authentication: Shared read-only access + per-user authentication for write operations
  • 🧠 LLM-Optimized: Tools designed specifically for AI analysis and exploration
  • 🔄 GraphQL Discovery: Automatic schema introspection for dynamic capabilities
  • 🔒 Session Isolation: Per-session credential management prevents cross-user data leaks
  • Features

  • Search & Discovery: Global search, project search, issue/MR search, code browsing
  • GraphQL-first approach with automatic schema introspection
  • Self-hosted GitLab support with configurable base URLs
  • Comprehensive GitLab operations (projects, issues, merge requests)
  • Custom query execution for advanced use cases
  • Docker & LibreChat integration ready
  • Smithery install support for easy deployment
  • Installation

    📁 File Structure Note

  • Dockerfile - Standard Dockerfile (copy as Dockerfile.mcp-gitlab for LibreChat integration)
  • smithery.yaml - Smithery.ai configuration with both stdio and Docker integration options
  • Docker (Recommended for LibreChat)

    The Dockerfile automatically clones and builds the GitLab MCP server from this repository, so you don't need to copy any source files - just the Dockerfile itself.

    1. Copy Dockerfile to your LibreChat directory:

    # Copy the Dockerfile for LibreChat integration
    cp Dockerfile /path/to/librechat/Dockerfile.mcp-gitlab
    

    Note: The Dockerfile uses git clone to fetch the source code, so it won't accidentally copy LibreChat files. You can specify which version to build using the GITLAB_MCP_VERSION build arg (defaults to main).

    2. Add GitLab environment variables to your LibreChat .env file:

    # GitLab MCP Configuration
    GITLAB_URL=https://gitlab.com
    GITLAB_AUTH_MODE=hybrid
    GITLAB_SHARED_ACCESS_TOKEN=your-optional-shared-token
    GITLAB_MAX_PAGE_SIZE=50
    GITLAB_TIMEOUT=30000
    GITLAB_MCP_PORT=8008
    MCP_TRANSPORT=http
    

    3. Add service to your LibreChat docker-compose.override.yml: ```yaml services: gitlab-mcp: build: context: . dockerfile: Docke

    Related MCP Servers

    AI Research Assistant

    AI Research Assistant

    hamid-vakilzadeh

    AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar

    Web & Search
    12 8
    Linkup

    Linkup

    LinkupPlatform

    Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages

    Web & Search
    2 24
    Math-MCP

    Math-MCP

    EthanHenrickson

    Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support

    Developer Tools
    22 81