[BUG] GitLab MCP plugin fails to reconnect - "Failed to reconnect to plugin:gitlab:gitlab"

Status Open
Reported on v2.1.2
Maintainer reply None cached
Activity 11 comments · opened Jan 9, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The built-in GitLab MCP plugin (gitlab@claude-plugins-official) consistently fails to connect with the error "Failed to reconnect to plugin:gitlab:gitlab". The GitLab API is accessible and the token is valid.

Environment:

  • Claude Code version: 2.1.2
  • OS: macOS Darwin 25.1.0
  • Node.js: v22.3.0
  • GitLab: gitlab.com (cloud)

Debugging Done:

  • Verified GITLAB_TOKEN is set and valid (direct API call returns HTTP 200):

curl -s -H "PRIVATE-TOKEN: $GITLAB_TOKEN" "https://gitlab.com/api/v4/user"

  • Reinstalled Claude Code
  • Toggled plugin on/off
  • Updated to latest version

Workaround Attempted:
Adding GitLab as standalone HTTP MCP server:
claude mcp add --transport http gitlab-standalone "https://gitlab.com/api/v4/mcp"

Related Issues:

  • Similar MCP reconnection failures reported: #16107, #1611, #11175

What Should Happen?

Plugin connects successfully to GitLab MCP server.

Actual Behavior:

  • Connection fails despite valid credentials.

Error Messages/Logs

Failed to reconnect to plugin:gitlab:gitlab

Steps to Reproduce

  1. Enable the GitLab plugin: claude config set enabledPlugins.gitlab@claude-plugins-official true
  2. Set GITLAB_TOKEN environment variable with a valid PAT
  3. Start Claude Code
  4. Run /mcp
  5. Observe: "Failed to reconnect to plugin:gitlab:gitlab"

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.2

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Possible Cause:

View original on GitHub ↗

11 Comments

github-actions[bot] · 6 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

nikolailehbrink · 6 months ago

@shell362, did you find a working solution? I run into the same problem and don't know whether its an access level issue.

<img width="749" height="176" alt="Image" src="https://github.com/user-attachments/assets/c06b1afe-b454-44d9-b545-ead7af704429" />

Either way, there is no error message, which makes it quite hard to debug.

shell362 · 6 months ago

Nope, I didn't.

idoberko2 · 6 months ago

I'm also facing the same issue

nferro · 6 months ago

Same issue here. I have a colleague on the same Gitlab team with no issues.

BlankerL · 6 months ago

Same issue here. The same GitLab instance works fine for Codex MCP but not for GitLab. It worked fine previously, but today it suddenly stopped. I downgraded Claude Code to earlier versions, but they didn’t work either.

Update: It recovered automatically about 6 hours after I posted this comment, and I changed nothing.

Update: The problem occurred again about 12 hours after the last edit. I changed nothing, and Codex MCP continues to work fine.

Update: I can confirm I only have this problem in Zed’s terminal. I cannot re-authenticate in Zed, but when I use another terminal, authentication works, and after authenticating elsewhere, Zed’s terminal works again.

phinnaeus · 6 months ago

i see these logs when running claude with --debug but no clue what URL it's trying to hit that 404s

2026-03-02T07:33:43.488Z [DEBUG] MCP server "plugin:gitlab:gitlab": HTTP Connection failed after 328ms: Streamable HTTP error: Error POSTing to endpoint: {"message":"404 Not Found"} (code: 404, errno: none)
2026-03-02T07:33:43.488Z [ERROR] MCP server "plugin:gitlab:gitlab" Error: Streamable HTTP error: Error POSTing to endpoint: {"message":"404 Not Found"}
2026-03-02T07:33:43.488Z [DEBUG] MCP server "plugin:gitlab:gitlab": Connection failed after 328ms: Streamable HTTP error: Error POSTing to endpoint: {"message":"404 Not Found"}
2026-03-02T07:33:43.488Z [ERROR] MCP server "plugin:gitlab:gitlab" Connection failed: Streamable HTTP error: Error POSTing to endpoint: {"message":"404 Not Found"}

also i just started a trial of gitlab ultimate and still getting the error, so thats no help

zoechi · 5 months ago

I cleared Authentication and tried to authenticate again and got (with --debug)

╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Gitlab MCP Server                                                                                                                                               │
│                                                                                                                                                                 │
│ Status: ✘ failed                                                                                                                                                │
│ Auth: ✘ not authenticated                                                                                                                                       │
│ URL: https://gitlab.com/api/v4/mcp                                                                                                                              │
│ Config location: /home/myuser/myproject/.mcp.json                                                                                      │
│                                                                                                                                                                 │
│ Error: HTTP 429: Invalid OAuth error response: SyntaxError: Unexpected token 'T', "This endpo"... is not valid JSON. Raw body: This endpoint has been requested │
│  too many times. Try again later.                                                                                                                               │
│                                                                                                                                                                 │
│ ❯ 1. Authenticate                                                                                                                                               │
│   2. Reconnect                                                                                                                                                  │
│   3. Disable                                                                                                                                                    │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

---
Edit: I wasn't aware this MCP is only supported by GitLab Premium or Ultimate

shapeshed · 2 months ago

Wow le suck that this is Feature Gated. Neggie Aura for Gitlab.

zoechi · 2 months ago

@shapeshed cloude-code is great at using the glab cli tool. Just give it a token.

shapeshed · 2 months ago

@zoechi yep doing that, just prefer OAuth over PATs