An MCP server that connects LLMs to CERN GitLab for discovering HEP code, documentation, and analysis examples.
An MCP server that connects LLMs to CERN GitLab for discovering HEP code, documentation, and analysis examples. Exposed over MCP by the cerngitlab mcp mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.
Everything the assistant can do here goes through one of these:
search_projects — Search for public CERN GitLab projects (repositories) by keyword, topic, or languageget_project_info — Get detailed project metadata (stars, description, languages, statistics)list_branches — List or search project branches and their commit metadatalist_project_files — List files and directories in a project's repositoryget_file_content — Fetch the content of a specific file (includes binary detection)get_project_readme — Get the README content for a projectsearch_code — Search for code within a specific project or globallysearch_lhcb_stack — Search for code within an LHCb software stack (e.g., 'sim11'), with automatic Git ref resolutionsearch_issues — Search for issues in a projectget_wiki_pages — List wiki pages for a projectinspect_project — Analyze project structure, build system, dependencies, and CI/CDlist_releases — List releases for a projectInstallation goes through your MCP client rather than a global install: point it at cerngitlab-mcp on PyPI and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
You will need 8 environment variables: CERNGITLAB_TOKEN, CERNGITLAB_CERN_CLIENT_ID, CERNGITLAB_GITLAB_OAUTH_CLIENT_ID, CERNGITLAB_GITLAB_OAUTH_CLIENT_SECRET, CERNGITLAB_SERVER_BASE_URL, CERNGITLAB_SESSION_STORAGE_PATH, CERNGITLAB_GITLAB_URL, CERNGITLAB_HOST. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
https://gitlab.cern.ch/-/profile/applications. - Set the redirect URI to https://gitlabmcp.cern.ch/oauth/callback (replace with actual URL) - Enable the read_api read_repository read_user scopes - Note the application IDAmong the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Cerngitlab MCP's toolset — search_projects, get_project_info, list_branches and 11 more — is a fair guide to whether it matches your workflow. It is maintained by mohamedelashri; worth a glance at recent repository activity before you build anything load-bearing on it.
This entry was verified against Cerngitlab MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| search_projects | Search for public CERN GitLab projects (repositories) by keyword, topic, or language |
| get_project_info | Get detailed project metadata (stars, description, languages, statistics) |
| list_branches | List or search project branches and their commit metadata |
| list_project_files | List files and directories in a project's repository |
| get_file_content | Fetch the content of a specific file (includes binary detection) |
| get_project_readme | Get the README content for a project |
| search_code | Search for code within a specific project or globally |
| search_lhcb_stack | Search for code within an LHCb software stack (e.g., 'sim11'), with automatic Git ref resolution |
| search_issues | Search for issues in a project |
| get_wiki_pages | List wiki pages for a project |
| inspect_project | Analyze project structure, build system, dependencies, and CI/CD |
| list_releases | List releases for a project |
| get_release | Get details of a specific release |
| list_tags | List tags for a project |
{
"mcpServers": {
"cerngitlab": {
"command": "uvx",
"args": ["cerngitlab-mcp"],
"env": {
"CERNGITLAB_TOKEN": "glpat-xxxxxxxxxxxx"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
https://gitlab.cern.ch/-/profile/applications. - Set the redirect URI to https://gitlabmcp.cern.ch/oauth/callback (replace with actual URL) - Enable the read_api read_repository read_user scopes - Note the application ID| Variable | Description | Required |
|---|---|---|
| CERNGITLAB_TOKEN | Credential the server authenticates with. | Yes |
| CERNGITLAB_CERN_CLIENT_ID | Configuration value read at startup. | Optional |
| CERNGITLAB_GITLAB_OAUTH_CLIENT_ID | Configuration value read at startup. | Optional |
| CERNGITLAB_GITLAB_OAUTH_CLIENT_SECRET | Credential the server authenticates with. | Yes |
| CERNGITLAB_SERVER_BASE_URL | Endpoint or connection string the server talks to. | Yes |
| CERNGITLAB_SESSION_STORAGE_PATH | Filesystem location the server is allowed to use. | Optional |
| CERNGITLAB_GITLAB_URL | Endpoint or connection string the server talks to. | Yes |
| CERNGITLAB_HOST | Endpoint or connection string the server talks to. | Optional |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.