• v0.1.0-dev.26 aaef8b46f8

    v0.1.0-dev.26
    All checks were successful
    Corn CI / release-check-1 (push) Successful in 2s
    Corn CI / release-check (push) Successful in 0s
    Corn Release / release-1 (push) Successful in 7s
    Corn Release / release (push) Successful in 0s
    Corn CI / test (push) Successful in 2m42s
    Pre-release

    john released this 2026-11-20 13:58:56 +00:00 | 149 commits to main since this release

    v0.1.0-dev.26 — Per-user OAuth for upstream MCP servers (pre-release)

    Corn can now proxy any OAuth-protected MCP server, with every call made as the
    signed-in user's own upstream account. Coder is the first server wired in; any
    other OAuth MCP server is configuration only.

    • Linked accounts (src/corn/upstream_mcp.py, Connections page): users click
      Connect to run an OAuth 2.1 authorization-code + PKCE (S256) flow against the
      upstream server. The callback is bound to the initiating browser (HttpOnly cookie)
      and Corn user, single use and expires after 10 minutes. Disconnect revokes
      upstream (RFC 7009, best effort) and deletes the grant.
    • Encrypted grants: new mcp_oauth credential bundle in the existing
      AES-256-GCM connections table (provider mcp_oauth, one namespace per server).
      Tokens are never rendered, logged or returned by the API. Access tokens refresh
      automatically 60s before expiry with rotation; a rejected refresh removes the
      grant and asks the user to reconnect.
    • Per-user proxying: each configured server is mounted with FastMCP's
      ProxyProvider, one per user, attaching only that user's token. Corn's own
      bearer token is never forwarded upstream. Users without a link see none of the
      server's tools; a cached tool can never run under another user's grant. An
      unreachable or revoked upstream hides its tools instead of failing Corn's
      listing.
    • Configuration: CORN_UPSTREAM_MCP_SERVERS (JSON, validated at startup:
      HTTPS endpoints, known keys only, issuer or explicit endpoints). See
      deploy/README.md → Linked MCP servers.

    No database migration (reuses connections and web_oauth_transactions). No
    change to existing tools, REST routes or authentication.

    Upgrade

    1. On the upstream server, register an OAuth client with redirect URI
      https://<corn-host>/auth/upstream/<name>/callback (for Coder:
      https://<corn-host>/auth/upstream/coder/callback).
    2. Add CORN_UPSTREAM_MCP_SERVERS to compose.local.yaml, then:
    docker compose -f compose.local.yaml up -d --pull always --no-build --no-deps corn
    
    1. In Corn, open Connections → Linked accounts → Connect. In Open WebUI,
      refresh the Corn MCP connection to load the new tools.

    Source commit aaef8b46f85950affe844e68df967cbfa2688b99.

    Downloads