What you’ll learn:
- Setting up OAuth for your users
- Managing OAuth sessions
- Advanced patterns (BYO OAuth, export/import)
Basic OAuth Setup
Each user authorizes once, you store their OAuth session ID in your database, then reuse it for future requests. The flow:- User clicks “Connect Slack” (or GitHub, Google, etc.) in your app
- They authorize access via the OAuth screen
- You receive an
oauthSessionIdand store it for that user - Pass that session ID whenever creating MCP sessions for that user
Using OAuth Sessions
After a user authorizes, retrieve their stored OAuth session ID from your database and pass it when creating MCP sessions. This connects the session to their authorized account, giving your AI access to their data.Advanced Features
Enterprise BYO (Bring Your Own) OAuth
Need to use your own OAuth apps instead of Metorial’s? Create server deployments via the API with your own credentials.Why use BYO OAuth:
- OAuth consent screens show your company name
- Use existing OAuth apps from your organization
- Meet enterprise security and compliance requirements
- Full control over OAuth scopes and permissions