Skip to content

fix: account ID negotiation for multi-account OAuth users - #8

Closed
mattzcarey wants to merge 1 commit into
mainfrom
fix/account-id-negotiation
Closed

fix: account ID negotiation for multi-account OAuth users#8
mattzcarey wants to merge 1 commit into
mainfrom
fix/account-id-negotiation

Conversation

@mattzcarey

Copy link
Copy Markdown
Contributor

Summary

  • When a user token (OAuth) is used and no account_id is provided, the execute tool now returns an error listing all available accounts so the user can pick one
  • Account tokens continue to work as before with no account_id parameter needed
  • Passes AuthProps through from the OAuth layer to the MCP server so it has access to the user's account list

Test plan

  • Deployed to staging and tested with OAuth authentication
  • Verified: calling execute without account_id returns error with list of available accounts
  • Verified: calling execute with valid account_id works correctly
  • Verify account token mode still works without account_id parameter

Closes #3

For OAuth users with multiple Cloudflare accounts:
- Auto-select account when user has only one account (no manual selection needed)
- Show clear account picker when multiple accounts exist
- Pass AuthProps through API token path to access account information

Implementation details:
- Updated createServer signature to accept optional AuthProps parameter
- Modified execute tool schema to make account_id optional when single account
- Clarified parameter description (removed misleading "remember" language)
- Simplified account selection logic for better readability

Closes #3
@mattzcarey
mattzcarey force-pushed the fix/account-id-negotiation branch from 06bea43 to 72207ab Compare February 16, 2026 12:56
@mattzcarey

Copy link
Copy Markdown
Contributor Author

Changes incorporated into PR #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant