-
v0.1.0-dev.26
Pre-releaseAll checks were successfulreleased this
2026-11-20 13:58:56 +00:00 | 149 commits to main since this releasev0.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_oauthcredential bundle in the existing
AES-256-GCM connections table (providermcp_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
connectionsandweb_oauth_transactions). No
change to existing tools, REST routes or authentication.Upgrade
- 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). - Add
CORN_UPSTREAM_MCP_SERVERStocompose.local.yaml, then:
docker compose -f compose.local.yaml up -d --pull always --no-build --no-deps corn- In Corn, open Connections → Linked accounts → Connect. In Open WebUI,
refresh the Corn MCP connection to load the new tools.
Source commit
aaef8b46f85950affe844e68df967cbfa2688b99.Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- Linked accounts (