cerngitlab-mcp

by mohamedelashri

Not rated
GitHub

About

CERN GitLab MCP Server Browse Cerngitlab MCP Server for Claude, Cursor, VS Code, and other AI agents.

Details

Author
mohamedelashri
Categories
Other, Developer Tools

Setup

Install cerngitlab-mcp in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/mohamedelashri/cerngitlab-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

- 15 MCP toolsfor searching, browsing, and analyzing CERN GitLab repositories
- Dual-mode operation— stdio (single-user) and HTTP (multi-user) modes
- CLI tool(cerngitlab-cli) for direct command-line usage
- Public access— works without authentication for public repositories
- Multi-user HTTP mode— CERN SSO + GitLab OAuth authentication for centralized deployments; GitLab enforces all access permissions natively
- HEP-focused— dependency parsing for Python and C++ ecosystems, binary detection for.rootfiles, issue search
- Robust— rate limiting, retries with exponential backoff, graceful error handling

No installation needed — just useuvxto run directly:

git clone https://github.com/MohamedElashri/cerngitlab-mcp cd cerngitlab-mcp uv sync

All settings are configured via environment variables prefixed withCERNGITLAB_:

- Without token— Access to all public repositories. Sufficient for most HEP code discovery.
- With token— Additional access to internal/private projects, code search, and wiki pages.
- Go to
https://gitlab.cern.ch/-/user_settings/personal_access_tokens
- Create a token withread_apiscope
- SetCERNGITLAB_TOKEN=glpat-xxxxxxxxxxxx

Note:The code search (search_code), issue search (search_issues), and wiki (get_wiki_pages) tools require authentication on CERN GitLab.

Add to yourclaude_desktop_config.json:

{ "mcpServers": { "cerngitlab": { "command": "uvx", "args": ["cerngitlab-mcp"], "env": { "CERNGITLAB_TOKEN": "glpat-xxxxxxxxxxxx" } } } }

Note for macOS users:If you see an error aboutuvxnot being found, you may need to provide the absolute path. Claude Desktop does not support~or$HOMEexpansion.
- Runwhich uvxin your terminal to find the path (e.g.,/Users/yourusername/.local/bin/uvx).
- Use that absolute path in thecommandfield:

"command": "/Users/yourusername/.local/bin/uvx"

Project-specific (default)— installs in the current directory's configuration:

claude mcp add cerngitlab-mcp -- uvx cerngitlab-mcp

Global— installs for your user account (works in all projects):

claude mcp add --scope user cerngitlab-mcp -- uvx cerngitlab-mcp

To include authentication, add-e CERNGITLAB_TOKEN=glpat-xxxxxxxxxxxxbefore the--:

# Example: Global installation with token claude mcp add --scope user -e CERNGITLAB_TOKEN=glpat-xxxxxxxxxxxx cerngitlab-mcp -- uvx cerngitlab-mcp

Manual Configuration— you can also manually edit your global config at~/.claude.json(on Linux/macOS) or%APPDATA%\Claude\claude.json(on Windows):

{ "mcpServers": { "cerngitlab": { "command": "uvx", "args": ["cerngitlab-mcp"], "env": { "CERNGITLAB_TOKEN": "glpat-xxxxxxxxxxxx" } } } }
{ "mcp": { "servers": { "cerngitlab": { "command": "uvx", "args": ["cerngitlab-mcp"], "env": { "CERNGITLAB_TOKEN": "glpat-xxxxxxxxxxxx" } } } } }

Or add a.vscode/mcp.jsonto your project:

{ "servers": { "cerngitlab": { "command": "uvx", "args": ["cerngitlab-mcp"], "env": { "CERNGITLAB_TOKEN": "glpat-xxxxxxxxxxxx" } } } }
{ "mcpServers": { "cerngitlab": { "command": "uvx", "args": ["cerngitlab-mcp"], "env": { "CERNGITLAB_TOKEN": "glpat-xxxxxxxxxxxx" } } } }
# Run with uvx (no install needed) uvx cerngitlab-mcp # Or if installed from PyPI cerngitlab-mcp # Explicit stdio mode cerngitlab-mcp --mode stdio # Or from source uv run cerngitlab-mcp # With authentication CERNGITLAB_TOKEN=glpat-xxx uvx cerngitlab-mcp
# HTTP mode for multi-user deployment cerngitlab-mcp --mode http --host 0.0.0.0 --port 8080 # Or use environment variables CERNGITLAB_HTTP_MODE=true CERNGITLAB_HOST=0.0.0.0 CERNGITLAB_PORT=8080 cerngitlab-mcp # Dedicated HTTP entry point cerngitlab-mcp-http

- --mode stdio- Single-user mode using stdin/stdout (default)
- --mode http- Multi-user mode using HTTP API
- --mode auto- Auto-detect based on environment variables

The server automatically detects HTTP mode ifCERNGITLAB_HTTP_MODE,CERNGITLAB_HOST, orCERNGITLAB_PORTenvironment variables are set.

For detailed parameter documentation, seedocs/dev.md.

"Search CERN GitLab for Python repositories related to ROOT analysis and show me the most starred ones"

"Get the README and file structure of the lhcb/DaVinci project on CERN GitLab"

"Find branches containing 'release' in lhcb/DaVinci, then search the selected branch for Scheduler configuration"

"Search for repositories on CERN GitLab that use RooFit and show me example fitting code"

"Search the LHCb sim11 stack for the initialization routines in the Boole project"

"Inspect the lhcb/allen project to understand its build system, dependencies, and CI pipeline configuration"

"Search for issues related to 'segmentation fault' in the atlas/athena project to see if others have encountered this"

"List the recent releases of lhcb/DaVinci and show me the release notes for the latest version"

"Search for Gaudi framework configuration files on CERN GitLab and show me examples"

Seedocs/dev.mdfor development setup, project structure, testing, and release instructions.

HTTP mode provides a centralized server for multiple users. It usesCERN SSO + GitLab OAuthfor authentication, users authenticate with their existing CERN identity, and GitLab's own permission system enforces all access controls.
- CERN SSO client— Register a client at the
CERN Authorization Service. Note the client ID.
- GitLab OAuth application— Create one athttps://gitlab.cern.ch/-/profile/applications.

- Set the redirect URI tohttps://gitlabmcp.cern.ch/oauth/callback(replace with actual URL)
- Enable theread_api read_repository read_userscopes
- Note the application ID and secret.

export CERNGITLAB_CERN_CLIENT_ID=your-cern-sso-client-id export CERNGITLAB_GITLAB_OAUTH_CLIENT_ID=your-gitlab-oauth-app-id export CERNGITLAB_GITLAB_OAUTH_CLIENT_SECRET=your-gitlab-oauth-secret export CERNGITLAB_SERVER_BASE_URL=https://gitlabmcp.cern.ch export CERNGITLAB_SESSION_STORAGE_PATH=/var/lib/cerngitlab/sessions # optional # Start the server cerngitlab-mcp --mode http --host 0.0.0.0 --port 8000

Seeexamples/oauth_server.pyin the repository for a self-contained reference script.
- Client sends a request withAuthorization: Bearer <cern-sso-token>header.
- Server validates the CERN SSO token via CERN's JWKS endpoint.
- If the user has no active GitLab OAuth session, the server returns HTTP 202 with aauthorization_urlfield.
- The user visits that URL, authorizes the GitLab OAuth application, and is redirected back to/oauth/callback.
- Subsequent requests are served using the stored GitLab OAuth token. Sessions expire after 2 hours.

Assuming the server is running athttps://gitlabmcp.cern.chand theCERN_SSO_TOKENenvironment variable is set to a valid CERN SSO token:

# Step 1 – check authorization status curl -H "Authorization: Bearer $CERN_SSO_TOKEN" \ https://gitlabmcp.cern.ch/oauth/authorize # If 202, visit the returned authorization_url in a browser and authorize. # Step 2 – list available tools (once authorized) curl -H "Authorization: Bearer $CERN_SSO_TOKEN" \ https://gitlabmcp.cern.ch/tools # Step 3 – execute a tool curl -X POST -H "Authorization: Bearer $CERN_SSO_TOKEN" \ -H "Content-Type: application/json" \ -d '{"arguments": {"query": "ROOT"}}' \ https://gitlabmcp.cern.ch/tools/search_projects # Revoke session curl -X DELETE -H "Authorization: Bearer $CERN_SSO_TOKEN" \ https://gitlabmcp.cern.ch/session

A command-line interface is also available for direct usage without the MCP server:

# Install or use with uvx uvx cerngitlab-cli # Test connectivity cerngitlab-cli test-connection # Search for projects cerngitlab-cli search-projects --query "ROOT analysis" --language python # Get project info cerngitlab-cli get-project-info --project lhcb/DaVinci # Search code cerngitlab-cli search-code --search-term "RooFit" --per-page 10 # Inspect project structure cerngitlab-cli inspect-project --project lhcb/allen

All commands output JSON to stdout for easy piping and composition. Seecerngitlab-cli --helpfor the full list of commands.

A detailed skill file (SKILL.md) is available with:

- Complete documentation of all 15 tools
- Input/output specifications
- Usage examples
- Authentication requirements

This can be used by LLMs or agents to understand the available tools and how to use them.

This software is provided under the AGPL-3.0 license.

Chia Health MCP Server — Patient workflow integration for a licensed US telehealth platform. Browse GLP-1 medications (semaglutide, tirzepatide), peptide therapies (sermorelin, NAD+, glutathione), and longevity treatments. Check eligibility, complete intake, sign consents, and manage treatment plans. 30 tools, HIPAA-compliant. All prescriptions evaluated by licensed US healthcare providers and delivered from FDA-regulated pharmacies across 50 states + DC.

Broker + MCP server for last-bidder-wins games on Solana — agents register, auto-fund a Privy wallet, and bid via streamable HTTP

AI-powered no-code app builder with 17 MCP tools — create projects, generate pages from natural language, AI text/image generation (GPT, Claude, Gemini, 14+ models), page CRUD, workflow execution, publish & version control. SSE transport, API key auth.

An mcp server for your food ordering needs.

Agent-to-Agent handoff certification for multi-agent systems — validates context preservation, verifies agent capabilities before handoff, logs transfer chains, and ensures no data loss in agent orchestration.

Unified MCP & skill management gateway with progressive disclosure. Manages multiple MCP servers as Agent Apps, loading tool schemas on demand for 99% context token savings. Shared across Claude Code, Codex, OpenCode and more.

A collection of Model Context Protocol (MCP) servers for various tasks and integrations, supporting both Python and Node.js environments.

Open-souSecurely feeds real security refreshed rules into Cursor, Claude Code, and Windsurf — zero config, no API key.

Health intelligence MCP — access biomarkers, biological age, and personalized longevity action plans from your Aniva profile.

Real-time stock heatmaps and investment tools delivered as interactive React components.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.