mirror of
https://github.com/mcp-use/mcp-use.git
synced 2026-09-14 18:06:01 +08:00
c48c1ec283
Providers can now pass an optional `setup(host)` to `oauthCustomProvider`. The server invokes it once while mounting, after the canonical resource is resolved and before the first request is served. The host exposes the resolved resource and base path, `use` for `mcp:` middleware, `registerTool` and `registerResource` for provider-owned registrations (throwing on name collisions), `route` for extra public GET routes such as alternate well-known paths, and `instructions` to rewrite the `initialize` text without mutating the caller's config. This is the seam a consent-gated authorization server (e.g. Lane) needs: a per-call policy check, a step-up tool, and a root-path protected-resource document, all installed by the provider rather than by every app. Claude-Session: https://claude.ai/code/session_01LbyvZbHpjatcnsgZSfLf2p