Repository navigation
feat(mcp): add structured connection diagnostics - #2669
benjaminshafii merged 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@reachjalil is attempting to deploy a commit to the Different AI Team on Vercel. A member of the Team first needs to authorize it. |
Agent integration rehearsal update — 2026-07-11This source branch is published at 7b99407 and was exercised in the independent combined rehearsal, #2675. The rehearsal confirmed and regression-tested the Level 1 fixes for callback origin, lifecycle and late-write fencing, stale post-token validation, owned 401 versus 403 failures, and structured provider tool-result errors. Status remains deliberately separate:
This PR remains based on upstream dev because the controlled parent branch exists only on the Jalil fork. #2674 is the approval ledger; this PR is the source and evidence branch. |
|
Validation update from the isolated MCP diagnostics pass:
This was the only PR merged during this pass. No follow-up merge or branch mutation was made here after the no-auto-merge instruction. |
Important
Parent MCP diagnostics release: #2674
Parent integration status: Not integrated. Verified by Jalil: Not started.
This source PR remains the workspace for its focused fixes and evidence. After Jalil reviews and accepts this level, the verified change will be integrated into
feature/mcp-diagnostics-releaseand the parent ledger will be updated. Because the parent branch intentionally exists only on Jalil's fork, GitHub cannot use it as the literal base of an upstream-repository PR; this PR therefore remains based ondevwhile pointing to the parent release tracker.Before and after: structured errors
fetch failed.isError, throttling, and protocol outcomes are normalized separately.Not added here: the persistent live timeline belongs to #2672, and the enterprise test server belongs to #2670. The standard Connect alert remains concise; it does not render every diagnostic field inline.
Intent
Make MCP connection failures diagnosable end to end. Operators should see the failing phase, a stable safe error code, retry guidance, and an actionable owner without exposing credentials, provider bodies, or tenant data.
What changed
Security and correctness
Reviewer focus
ee/apps/den-api/src/lib/mcp-connection-diagnostics.tsee/apps/den-api/src/lib/mcp-external-client.tsValidation
git diff --check./bin/openwork-hub check mcp mcp-connection-diagnosticsThis is the first of three independent MCP diagnostic PRs. The mock enterprise server and live tracing changes are intentionally separate; overlapping MCP client surfaces will need normal merge sequencing.
What an administrator sees after clicking Connect
This PR replaces the former generic “Failed to connect” outcome for Den-managed Connect with a safe, source-specific message. A failure before the provider authorization page is shown appears in the Den page alert and beneath the connection row in this form:
For example, a refused or unreachable provider endpoint reads:
The safe explanation changes for DNS, TCP/network, TLS/certificate verification, endpoint routing, OAuth resource or issuer discovery, client registration, token exchange, provider consent, MCP version, catalog, and provider-operation failures. The API response also carries the structured
phase, stablecode,highestPassed,retryable,actionOwner, andoperatorActionfields.The ordinary Connect alert intentionally presents only the safe explanation and reference; it does not render the entire structured envelope. If failure occurs after the provider authorization tab opens, the callback page shows Connection failed, the same safe layer-specific explanation, and the diagnostic reference. The full phase timeline, highest proven health, first failure, owner, and remediation are presented by the separate Diagnose experience in #2672. Connect does not currently open Diagnose automatically.