#Gitlab MCP

1 messages · Page 1 of 1 (latest)

fierce stream
#

Hello again @wide sun, I would like to integrate Gitlab (if possible using MCP with my claw. Is the oauth2 route viable, and if not, could I use a project access token with MCP scope ?

More broadly, what are my options for interacting with gitlab (especially MRs) skill-wise ?

median owlBOT
flat shadowBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

median owlBOT
wide sunBOT
#

I'll check the docs and source so I can give you a real answer instead of guessing.

#

I found the relevant OpenClaw MCP docs. I’m checking GitLab’s side now, especially whether project tokens actually support the MCP flow or whether you need user OAuth/PAT.

#

Short version:

So my practical recommendation would be:

  1. If you want the official GitLab MCP server, use it with a client that already supports GitLab’s OAuth MCP flow well.
  2. If you want this inside OpenClaw today, I’d lean toward:
    • a token-based third-party GitLab MCP server, or
    • a custom skill/plugin that talks to GitLab REST/GraphQL or glab.

For MR workflows, the official GitLab MCP toolset is actually pretty nice. GitLab documents tools for:

  • create/get MR
  • MR diffs
  • MR commits
#
  • MR pipelines/jobs
  • notes/comments on work items
  • search / semantic code search

Tools list: https://docs.gitlab.com/user/gitlab_duo/model_context_protocol/mcp_server_tools/

A few OpenClaw-specific notes:

So, broad options today are:

  • Official GitLab MCP if your MCP client can do GitLab OAuth well
  • Third-party GitLab MCP if you want PAT-style auth
  • Custom GitLab skill/plugin if you want tight control over MR workflows in OpenClaw
#

If you want, I can sketch the cleanest setup for either of these:

  • official GitLab MCP + OpenClaw ACP agent
  • custom/token-based GitLab MR skill for OpenClaw
fierce stream
wide sunBOT
#

Let me check that repo doc and whether there’s already a ClawHub-shaped path here.

#

Yes, that zereight approach looks viable for OpenClaw.

Why I’m comfortable saying that:

  • OpenClaw’s MCP config supports exactly the shape that guide is using for a stdio server: command, args, env under mcp.servers: https://docs.openclaw.ai/cli/mcp
  • So the reusable block from that guide maps pretty naturally to OpenClaw, for example:
{
  "mcp": {
    "servers": {
      "gitlab": {
        "command": "npx",
        "args": ["-y", "@zereight/mcp-gitlab"],
        "env": {
          "GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-...",
#
          "GITLAB_API_URL": "https://gitlab.com/api/v4"
        }
      }
    }
  }
}

A couple caveats:

  • that repo doc is best-effort, not OpenClaw-official
  • if you are using an ACP harness through OpenClaw, configure MCP on the gateway/agent, not per session. OpenClaw explicitly says per-session mcpServers are unsupported in bridge mode: https://docs.openclaw.ai/cli/acp

PAT vs OAuth here

For OpenClaw today, I’d actually lean PAT first with that third-party server.

#

Reason:

  • OpenClaw docs clearly cover token/env-based MCP config
  • I still don’t see an OpenClaw-documented generic MCP OAuth browser handshake flow
  • GitLab’s official MCP server is built around OAuth 2.0 DCR, but that’s a different path from this third-party stdio server

Also, on the GitLab side:

  • project access tokens do not appear to have an mcp scope
  • but they do support normal API scopes like api / read_api

So:

  • official GitLab MCP + mcp scope on a project token: probably no
  • third-party GitLab MCP or REST/CLI workflow using project token + API scopes: yes, potentially

The main tradeoff is scope:

  • project token: good if you only want one project
  • user PAT: better if you want “my MRs”, cross-project review queues, broader search, etc.
#

What about ClawHub?

That’s a different but probably better route if your real goal is “make my claw good at GitLab/MRs”.

ClawHub is the registry for OpenClaw skills/plugins: https://docs.openclaw.ai/tools/clawhub
Skills install via: https://docs.openclaw.ai/cli/skills

I found a couple promising GitLab-related entries:

For MR-heavy work, I’d probably rank the options like this:

  1. ClawHub glab skill for practical day-to-day MR work