Support per-server MCP OAuth callback ports (#38448)

## What changed

- Add `oauth.callback_port` to MCP server configuration and preserve it when
  serializing configuration edits.
- Accept `oauth.callbackPort` from plugin MCP declarations and skill dependency
  metadata.
- Prefer the server-specific callback port over `mcp_oauth_callback_port` for
  CLI login, app-server, plugin installation, executor, and skill dependency
  OAuth flows.

## Testing

- Cover configuration parsing, serialization, and fallback behavior.
- Verify plugin, executor, and skill OAuth registrations use their configured
  callback ports instead of the global port.

GitOrigin-RevId: 7f65e5e7869358307e49779f1b75e8672b607736
This commit is contained in:
willwang-openai authored and copyberry committed 2026-08-13 22:42:12 +00:00
1 parent ca83f7908c
commit 1da59ad257
22 files changed
+205 -37

No files matched your search

@@ -969,6 +969,7 @@ async fn load_plugins_loads_default_skills_and_mcp_servers() {
scopes: None,
oauth: Some(McpServerOAuthConfig {
client_id: Some("client-id".to_string()),
callback_port: Some(3118),
}),
oauth_resource: None,
tools: HashMap::new(),