[ENG-3258] feat: add providerWorkspaceRef support for multi-workspace providers#85
Merged
Conversation
Add optional providerWorkspaceRef parameter to OAuth tools to support multi-workspace providers. This parameter is conditionally included in the OAuth connect request when provided. Changes: - Add providerWorkspaceRef to ClientSettings type in both mcp-server and sdk - Update createStartOAuthTool to accept optional providerWorkspaceRef parameter - Include providerWorkspaceRef in OAuth API request when provided - Maintain backward compatibility (parameter is optional) This enables OAuth flows for providers that support multiple workspaces (e.g., Slack, Microsoft Teams) where users need to specify which workspace to connect to. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Fix fallback order to prioritize settings.providerWorkspaceRef over param - Make providerWorkspaceRef optional in ClientSettings - Add conditional inclusion of providerWorkspaceRef in OAuth request This ensures consistency with SDK behavior where settings take precedence. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
abx42
approved these changes
Jan 27, 2026
Contributor
Author
|
split this branch from the logger one that was reverted. merging to test build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
providerWorkspaceRefsupport to OAuth flow for multi-workspace providersDetails
Multi-Workspace Provider Support
Some SaaS providers (e.g., Slack, Microsoft Teams) support multiple workspaces per user account. This PR adds support for specifying which workspace to connect to during OAuth:
providerWorkspaceRef(optional) added tostart-oauthtoolClientSettingstype for configurationFallback Order Consistency
Implements a consistent fallback order across both SDK and mcp-server:
This ensures that:
API Changes
MCP Server (
mcp-server/src/oauth.ts)providerWorkspaceRefparameter to start-oauth toolSDK (
sdk/lib/adapters/mcp.ts)providerWorkspaceRef?: stringtoClientSettingstypecreateStartOAuthToolto handle workspace referencesTest plan
🤖 Generated with Claude Code