#Gitlab MCP
1 messages · Page 1 of 1 (latest)
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:
- GitLab’s official MCP server does support OAuth 2.0 DCR, and that is the path GitLab documents for MCP clients. It’s also Beta and Premium/Ultimate only: https://docs.gitlab.com/user/gitlab_duo/model_context_protocol/mcp_server/
- For OpenClaw specifically, I couldn’t find a documented generic MCP OAuth login flow. OpenClaw’s MCP docs describe remote MCP as
url+ optionalheaders, or stdiocommand/args/env, not a browser-based OAuth handshake: https://docs.openclaw.ai/cli/mcp - I also don’t see an
mcpscope on GitLab project access tokens. So “project access token with MCP scope” looks like no from the GitLab docs. Project tokens are project-scoped and usually a bit awkward for MR-heavy workflows anyway: https://docs.gitlab.com/user/project/settings/project_access_tokens/
So my practical recommendation would be:
- If you want the official GitLab MCP server, use it with a client that already supports GitLab’s OAuth MCP flow well.
- 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:
- OpenClaw-managed MCP defs live under
mcp.servers: https://docs.openclaw.ai/cli/mcp - If you’re using ACP harnesses (Codex/Claude/etc) through OpenClaw, per-session
mcpServersare not supported. Configure MCP on the gateway/agent instead: https://docs.openclaw.ai/tools/acp-agents
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
Is this approach viable https://github.com/zereight/gitlab-mcp/blob/HEAD/docs/json-mcp-clients-setup.md ?
What about clawhub ?
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,envundermcp.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
mcpServersare 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
mcpscope - but they do support normal API scopes like
api/read_api
So:
- official GitLab MCP +
mcpscope 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:
- GitLab API skill, REST-oriented, repo/file/project operations
https://clawhub.ai/d1gl3/gitlab-api - glab skill, built around the official GitLab CLI, and this one looks especially good for MR workflows
https://clawhub.ai/bezkom/glab
For MR-heavy work, I’d probably rank the options like this:
- ClawHub
glabskill for practical day-to-day MR work