Skip to content

Fix MCP connection renewal discovery - #48

Merged
sarthakagrawal927 merged 3 commits into
mainfrom
agent/rolepatch-mcp-refresh-20261115
Nov 15, 2026
Merged

sarthakagrawal927 merged 3 commits into
mainfrom
agent/rolepatch-mcp-refresh-20261115

Conversation

@sarthakagrawal927

@sarthakagrawal927 sarthakagrawal927 commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

RolePatch connections could work initially and fail when the five-minute access token expired because deployed MCP clients requested only the advertised resume scope. Advertise offline_access in the two MCP protected-resource documents and MCP 401 challenges so clients request renewal through explicit consent.

Provider metadata fields, headers, status and bodyless HEAD responses pass through. /api/resume and 403 challenges retain their existing scopes. Token lifetime, PKCE, owner/session checks and refresh issuance remain provider-controlled. The existing OAuth runbook records the bounded compatibility exception for deployed clients.

Validation:

  • Reproduced missing renewal scope through actual app discovery and 401 challenge, driving real provider registration and signed consent before the fix.
  • Focused regression suite passes 22 tests, including expired access after 301 seconds, refresh to owner access, PKCE/replay/session revocation, provider errors/headers and HEAD.
  • Full pnpm quality passed, including 820 passing tests and one opt-in skipped test, coverage, TypeScript, lint, docs and code-health checks.
  • Full pnpm cf:build pipeline completed through Next, OpenNext, static cache population and the Astro overlay.
  • Independent CodeVetter review is pending.

Production ChatGPT reconnection and a post-expiry tool call will be verified separately after release.

@sarthakagrawal927
sarthakagrawal927 merged commit a234cad into main Nov 15, 2026
6 checks passed
@sarthakagrawal927
sarthakagrawal927 deleted the agent/rolepatch-mcp-refresh-20261115 branch November 15, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant