MCP Server Tools Not Visible in Claude Code
Summary
The glab MCP server (glab mcp serve) successfully initializes and exposes 172 tools when tested directly via stdio, but Claude Code does not expose any of these tools in its available tool list, preventing AI-assisted GitLab workflows.
Environment
- glab version: 1.80.4 (f4b518e9)
- OS: macOS Darwin 25.2.0
- Claude Code: CLI version (appears to be 2.0.65 based on app support directory)
-
Configuration:
~/.claude/mcp-servers.jsonwith proper stdio configuration
Expected Behavior
Based on MR !2361 and the official documentation, Claude Code should expose glab MCP tools with naming like mcp__gitlab__* or glab_*, enabling natural language GitLab operations.
Actual Behavior
- Running
/mcpin Claude Code shows: "Reconnected to gitlab" - However, zero glab tools appear in the available tool list
- Other MCP servers (GitHub, Todoist, Google Workspace, PDF, etc.) work correctly and expose their tools
Reproduction Steps
1. Verify MCP Server Works Directly
# Test initialization and tool listing
(echo '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}},"id":1}'; \
echo '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":2}') | \
/opt/homebrew/bin/glab mcp serve 2>&1 | grep -o '"name":"glab_[^"]*"' | wc -l
Result: Server returns 172 tools including:
-
glab_issue_create,glab_issue_list,glab_issue_update, etc. -
glab_mr_create,glab_mr_list,glab_mr_merge, etc. -
glab_ci_*tools for pipelines - Many other commands
2. Check Claude Code Configuration
~/.claude/mcp-servers.json:
{
"gitlab": {
"type": "stdio",
"command": "/opt/homebrew/bin/glab",
"args": ["mcp", "serve"],
"env": {
"GITLAB_TOKEN": "glpat-..."
}
}
}
3. Verify Token
echo $GITLAB_TOKEN # Shows valid token
glab auth status # Shows authenticated
4. Check Claude Code
- Launch Claude Code with
/mcpcommand - Server shows "Reconnected to gitlab"
- Query available tools - no glab tools present
- Compare with other MCP servers (GitHub, Todoist) which work correctly
Investigation Findings
-
MCP Protocol Handshake:
✅ Server responds correctly to initialization -
Tool Enumeration:
✅ Server returns 172 tools viatools/list -
Authentication:
✅ GITLAB_TOKEN is valid and set -
Process Status:
❌ ps aux | grep "glab mcp"shows no running process (expected for stdio?) -
Logs: No
mcp-server-gitlab.logor similar file in~/Library/Logs/Claude/
Hypothesis
Possible causes:
-
Tool naming convention: Claude Code might filter tools that don't follow
mcp__<server>__*pattern (glab usesglab_*) - Tool count limit: 172 tools might exceed an internal limit or cause timeout during registration
- Connection failure: Server might be failing to start or maintain connection despite "Reconnected" message
- Namespace collision: Tool names might conflict with internal tooling
Comparison with Working MCP Servers
Other MCP servers in the same configuration that do work:
-
mcp__github__*(GitHub - ~40 tools) -
mcp__todoist__*(Todoist - ~30 tools) -
mcp__google-workspace__*(Google - ~20 tools) -
mcp__pdf__*(PDF - ~40 tools)
All use the mcp__<server>__* naming convention.
Workaround
Users can invoke glab commands directly via Claude Code's Bash tool:
glab issue list
glab mr create
However, this loses the benefits of structured tool integration (type safety, parameter validation, AI-friendly schemas).
Questions
- Is the
glab_*naming convention intentional, or should tools be exposed asmcp__gitlab__*? - Are there known limits on tool count per MCP server in Claude Code?
- Should there be more verbose logging when tool registration fails?
- Has this been tested with the latest Claude Code releases?