This repository packages the GitLab-hosted Model Context Protocol (MCP) server as a Gemini CLI extension. It exposes custom /gitlab:* commands that map directly to GitLab's documented MCP tools for issues, merge requests, pipelines, and search.
- Connects Gemini CLI to
https://gitlab.com/api/v4/mcpvianpx --yes mcp-remote(no local Ruby runtime required). - Includes reusable TOML commands aligned with the prompts in the GitLab MCP server docs.
- Ships a
GEMINI.mdcontext file with setup guidance, prerequisites, and troubleshooting tips.
gemini extensions install benvenker/gitlab-gemini-extension
# or for local development
gemini extensions link /path/to/gitlab-gemini-extensionYou will be prompted to confirm installation. Restart Gemini CLI after linking or installing.
- GitLab SaaS account with access to the GitLab MCP server. Ensure the
mcp_serverandoauth_dynamic_client_generationfeature flags are enabled for your account or namespace. - Gemini CLI v0.8.0 or later.
- Node.js 20+ so
npxis available.
On first use, a browser window opens for device authorization. Approve the "MCP CLI Proxy" request to grant the mcp OAuth scope.
The extension provides the following slash commands:
/gitlab:server-version/gitlab:issue/gitlab:create-issue/gitlab:mr/gitlab:mr-commits/gitlab:mr-changes/gitlab:mr-pipelines/gitlab:pipeline-jobs/gitlab:search
Each command parses arguments in the format shown inside the TOML file and calls the corresponding MCP tool (gitlab.get_issue, gitlab.gitlab_search, etc.).
Install dependencies if you plan to edit TypeScript sources or run tests:
npm installLinting/formatting mirrors the parent Gemini CLI repo:
npx prettier --write .To reload the extension in a Gemini CLI checkout, use:
node /path/to/gemini-cli/bundle/gemini.js extensions link /path/to/gitlab-gemini-extension --overwrite- Unit tests are written with Vitest. Run them with
npm test. - Optional CLI integration tests: copy
.env.exampleto.env, setGEMINI_CLI_PATHto your localgemini-clicheckout (build it sobundle/gemini.jsexists), then runnpm test. If the variable is unset, the integration suite is skipped automatically.
This repo follows the Gemini CLI extension releasing guidelines. The gemini-extension.json manifest lives at the repository root so users can install directly with gemini extensions install benvenker/gitlab-gemini-extension or by referencing specific branches/tags using --ref.
Apache 2.0