False "Could not attach to MCP server" error notifications while server functions normally
False "Could not attach to MCP server" Error Notifications
Problem Summary
The GitLab MCP server displays intermittent "Could not attach to MCP server GitLab" error notifications even when the server is fully functional, authenticated, and processing tool calls successfully.
Environment
- MCP Server Version: 18.5.0-pre (revision: dc74196a)
- Client: claude-ai v0.1.0
- mcp-remote: 0.1.29
-
GitLab endpoint:
https://GitLab.com/api/v4/mcp
Issue Details
Problem: False positive error notifications
- Server shows "running" status in UI
- All tools work correctly (get_mcp_server_version, create_issue, etc.)
- Authentication is successful and stable
- BUT user receives "Could not attach to MCP server GitLab" error notifications
- Tools continue to work normally during and after these error messages
Steps to Reproduce
- Successfully authenticate with GitLab MCP server
- Verify server is working (call tools successfully)
- Continue normal usage
- Observe intermittent "Could not attach" error notifications
- Verify tools still work fine despite the error message
Expected Behavior
- Error notifications only when there are actual connection/functionality issues
- No false positive error messages during normal operation
Actual Behavior
- Misleading error notifications appear during normal operation
- Causes user confusion about connection status
- Server functionality is unaffected - tools continue working normally
Visual Evidence
User reports seeing "Could not attach to MCP server GitLab" error message while the server status shows "running" and tools continue to function.
Log Analysis
The logs show this contradictory pattern:
Successful Operations During "Error" Period:
-
2025-09-18T18:27:51.460Z- Successfulget_mcp_server_versioncall -
2025-09-18T18:33:17.571Z- Successfulcreate_issuecall -
2025-09-18T18:33:18.843Z- Another successfulcreate_issuecall
Concurrent with Normal Transport Events:
[33415] Connected to remote server using StreamableHTTPClientTransport
[33415] Local STDIO server running
[33415] Proxy established successfully between local STDIO and remote StreamableHTTPClientTransport
Working Session Evidence:
2025-09-18T18:27:18.555Z [GitLab] [info] Message from server: {"jsonrpc":"2.0","id":0,"result":{"protocolVersion":"2025-06-18","capabilities":{"tools":{"listChanged":false}},"serverInfo":{"name":"Official GitLab MCP Server","version":"18.5.0-pre"}}}
2025-09-18T18:27:51.724Z [GitLab] [info] Message from server: {"jsonrpc":"2.0","id":4,"result":{"content":[{"type":"text","text":"18.5.0-pre"}],"structuredContent":{"version":"18.5.0-pre","revision":"dc74196a478"},"isError":false}}
Additional Context
This appears to be a client-side notification/UI issue where temporary transport events (brief reconnections, connection state changes) trigger error notifications even when:
- The server recovers immediately
- Maintains full functionality
- Successfully processes tool calls
- Shows "running" status in UI
The logs confirm this is a false positive notification issue rather than an actual connectivity problem - successful tool calls occur during the same timeframes when error notifications appear.
Suggested Fix
The notification logic should be updated to:
- Only show connection errors when there are sustained connectivity issues
- Suppress transient reconnection events that don't affect functionality
- Check actual server responsiveness before displaying error notifications