Skip to content

[Enhancement]: User self-diagnosis for MCP failures without backend log access #12067

@peeeteeer

Description

@peeeteeer

What features would you like to see added?

As we started rolling out the mcp feature UI we do realize that a lot of the integrations fail and do need access to the log to find errors. With large deployments of multiple thousands of users that becomes in a support nightmare. Therefore we would love to see...

a) a more sophisticated error handling and display at the UI especially in the "create mcp server" dialog
b) somehow an access to log/telemetry data per mcp server

More details

some initial ideas...

  1. Status API enhancement
    Update GET /api/mcp/connection/status payload from only state to state + reason.

Proposed MCPServerStatus:

  • connectionState
  • requiresOAuth
  • lastError?: { code: string; message: string; retryable: boolean; traceId?: string; at: string }
  1. Normalize MCP error codes
    Right now error strings are inconsistent and often generic. Extend the existing error codes with stable codes and keep message user-safe such as

MCP_AUTH_REQUIRED
MCP_OAUTH_TIMEOUT
MCP_DNS_FAILURE
MCP_CONNECTION_REFUSED
MCP_PROXY_SSE_ISSUE
MCP_DOMAIN_NOT_ALLOWED
MCP_INSPECTION_FAILED
MCP_INTERNAL_ERROR

  1. UI toast/status mapping
    Replace generic com_ui_mcp_init_failed with code-aware messaging and call to actions such as

MCP_AUTH_REQUIRED -> “Authentication required for {server}” + open OAuth.
MCP_DNS_FAILURE -> “Server URL cannot be resolved” + open Edit dialog.
MCP_PROXY_SSE_ISSUE -> “Connection blocked by proxy/SSE config” + docs link.
MCP_INTERNAL_ERROR -> “Server error, try again” + show traceId.

  1. Trace ID for support
    For each MCP error response, include traceId (UUID).

Log traceId server-side with the full error.
Show small “Debug ID: …” in toast/modal so users can report it.

and after that ....

1.) Emit structured diagnostics events at MCP touchpoints (connect, OAuth, tool call, transport error).
Include McpServerName, userId, conversationId/runId, code, severity, messageSafe, traceId.

2.) Store in a queryable TTL store (Mongo capped/TTL collection or Redis stream).
Retention 7–14 days, indexed by (serverName, userId, timestamp).

3.) Add scoped endpoint:
GET /api/mcp/:serverName/diagnostics?cursor=&severity=&from=&to=
RBAC: only users with access to that mcp server (plus admin override).

4.) UI: add “Diagnostics” drawer on MCP server card/menu showing timeline and “Copy Debug ID”.

Which components are impacted by your request?

No response

Pictures

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions