Skip to content

Authentication

The Upstream MCP server uses OAuth sign-in. You add https://api.upstream.do/mcp to your AI app, and the app sends you to Upstream to sign in and approve access. You never copy a token or a secret.

  1. Your AI app connects to https://api.upstream.do/mcp and finds out that it needs to sign in.
  2. It opens Upstream in your browser. Sign in with the account you use for email in Upstream.
  3. Choose the account to connect and select Allow.
  4. Your app receives access and refreshes it in the background, so you stay connected.

Your Upstream account must be set up first, with at least one email account connected. If it isn’t, Upstream asks you to finish setup before you can allow access.

The consent screen lists what the app will be able to do:

Permission What it allows
Read Read your inbox, threads, comments, channels, and contacts.
Write Draft, send, and reply to emails, attach files, and post comments for your teammates. Organize your inbox: mark threads done, snooze, star, label, trash, delete, or mark them as spam, and manage labels, channels, rules, tabs, and settings.
Stay connected Stay connected without signing in again, until you disconnect.

See the tool reference for which tools are read-only and which make changes.

Every app you connect appears in Settings > AI apps and MCP > Connected apps in Upstream, with the permissions you gave it. Select Disconnect to revoke an app’s access. To use it again, connect it again from the app.

A connected app sees the same data you see in the Upstream app, and nothing more. It can’t access other users’ private data. Specifically:

  • Your inbox, threads, and messages
  • Internal comments on threads
  • Your labels, channels, and Inbox Tabs
  • Your rules and settings
  • Your contacts and organization members
  • Attachments you add to drafts
  • Sending replies and composing emails on your behalf

The MCP server works directly against your Upstream account. It doesn’t keep a separate copy of your email.

Use a personal access token only for scripts, the Upstream API, or MCP clients that can’t sign in with OAuth. Every client covered in Client Setup supports OAuth and doesn’t need one.

  1. In Upstream, go to Settings > API tokens.
  2. Select Create token and give it a name that says where you’ll use it.
  3. Copy the token. It’s shown only once.

Send the token in the Authorization header:

Authorization: Bearer <your-token>

For example, in a client that takes a JSON config with headers:

{
"mcpServers": {
"upstream": {
"url": "https://api.upstream.do/mcp",
"headers": {
"Authorization": "Bearer <your-token>"
}
}
}
}
  • A token acts as you. Don’t share it, and don’t commit it to version control. Prefer a global config file over a project file that might be committed.
  • Use one token per client or script so you can revoke each one on its own.
  • Delete a token you no longer use, or one that might be exposed, from Settings > API tokens.