opencode/packages
Sebin Thomas e9ca7d292b fix(mcp): include scope in clientMetadata and add callbackPort option
Two related OAuth issues with remote MCP servers:

1. `scope` config field was accepted but never propagated to
   `clientMetadata`. The MCP SDK uses `clientMetadata.scope` as its
   last-resort fallback when neither the WWW-Authenticate header nor
   the Protected Resource Metadata (scopes_supported) advertise scopes.
   For servers whose metadata returns no scopes (e.g. AWS Bedrock
   AgentCore), the authorization request was sent with no scope
   parameter, causing IdPs such as Okta to reject with
   "No scopes were requested."

2. The callback port was hardcoded to 19876 with no way to override it
   short of providing a full `redirectUri`. Added `callbackPort` as a
   shorthand in the OAuth config — when set it constructs the redirect
   URI as `http://127.0.0.1:<callbackPort>/mcp/oauth/callback`.
   `redirectUri` still takes precedence if both are provided.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 11:58:19 +02:00
..
app fix(app): debounce vcs refresh in session page (#28784) 2026-05-22 06:47:05 +00:00
console sync 2026-05-21 19:11:33 -04:00
containers chore: Upgrade Bun to the final non-rust version (#27648) 2026-05-18 09:24:26 +10:00
core chore: generate 2026-05-22 04:04:41 +00:00
desktop sync release versions for v1.15.7 2026-05-21 15:51:26 +00:00
docs fix(web): favicon rename again 2026-01-21 14:36:21 -06:00
effect-drizzle-sqlite sync release versions for v1.15.7 2026-05-21 15:51:26 +00:00
enterprise sync 2026-05-21 14:53:56 -04:00
extensions/zed sync release versions for v1.15.7 2026-05-21 15:51:26 +00:00
function sync 2026-05-21 14:53:56 -04:00
http-recorder sync release versions for v1.15.7 2026-05-21 15:51:26 +00:00
identity
llm chore: drop dead imports across opencode/core/llm (#28720) 2026-05-21 17:03:12 -04:00
opencode fix(mcp): include scope in clientMetadata and add callbackPort option 2026-05-22 11:58:19 +02:00
plugin sync release versions for v1.15.7 2026-05-21 15:51:26 +00:00
script refactor: replace bun semver with npm semver package 2026-03-09 15:29:55 -04:00
sdk chore: generate 2026-05-21 17:25:26 +00:00
slack sync release versions for v1.15.7 2026-05-21 15:51:26 +00:00
storybook Remove unused app ID schema (#27105) 2026-05-12 13:09:23 -04:00
ui app: wrap provider data in Map to avoid store (#28765) 2026-05-22 12:23:16 +08:00
web sync release versions for v1.15.7 2026-05-21 15:51:26 +00:00