MCP
Sign-in (OAuth) and API keys
How the hosted MCP and the sume CLI sign in with one Sume OAuth, and where API keys still work.
People sign in to Sume once, with OAuth, from an MCP client or from the
sume CLI. Scripts use Sume API keys. The two never stand in for each other.
Auth matrix
| Who | How it connects | What it can do |
|---|---|---|
| An MCP client (Claude, ChatGPT, Cursor, Codex) | OAuth on https://mcp.sume.com/mcp: the client opens the browser and you sign in and select Allow | mcp:read always. Create and spend credits on the consent page adds mcp:write. |
The sume CLI | sume login: the same sign-in in the browser, or sume login --device with a code | The same scopes. The CLI's token works on the HTTP API (https://api.sume.com/v1). |
| A script or server | A Sume API key on the HTTP API or on https://api.sume.com/mcp | The full tool set. mcp.sume.com does not accept API keys. |
There is no mcp:paid scope. Paid calls are checked against the
workspace balance, need an idempotency_key, and dry_run prices them first.
MCP sign-in
- The MCP client connects to
https://mcp.sume.com/mcp. - Sume answers with an OAuth challenge and protected-resource metadata. Its
authorization_serversishttps://mcp.sume.com. - The client registers (Dynamic Client Registration, or an
https://client ID metadata document) and sends you tohttps://mcp.sume.com/oauth/authorize. - You sign in. The consent page names the app and the host it returns to.
- Read is locked on. Create and spend credits is
mcp:write. - Workspace picks where the connection starts: your personal workspace or a team you belong to.
- Allow returns a code to the app; Deny returns
error=access_denied. Both carryiss=https://mcp.sume.com.
- Read is locked on. Create and spend credits is
- The app exchanges the code (PKCE) for a one-hour access token and a refresh token.
- The app calls
https://mcp.sume.com/mcpwith the access token.
The app refreshes on its own: each refresh token works once, a reused one ends
the connection, and one unused for 30 days expires. To end a connection, send
its refresh token to /oauth/revoke; the next request with its access token
fails.
To work in another workspace, ask the agent: list_workspaces shows your
workspaces and select_workspace switches this connection. You do not need to
reconnect.
Public metadata:
https://mcp.sume.com/.well-known/oauth-protected-resource/mcp
https://mcp.sume.com/.well-known/oauth-authorization-serverToken audience for MCP clients:
https://mcp.sume.com/mcpDevelopment uses the same shape on https://mcp.dev.sume.com.
CLI sign-in
sume login # opens the browser; the redirect comes back to 127.0.0.1
sume login --device # prints a code to approve at mcp.sume.com/oauth/device
sume auth status # how this machine signs in
sume auth token # a current access token for a script
sume logout # revokes the sign-in and removes itsume login uses the same consent page as the MCP. It asks for
resource=https://api.sume.com, so its token works on the HTTP API and not on
mcp.sume.com/mcp. The CLI keeps the session in ~/.sume-com/config.json
(readable only by you) and refreshes it itself.
Scopes
mcp:read(required) andmcp:write(opt-in). A grant of write always includes read.- An
mcp:readconnection sees only read-only tools. A tool that changes data returnsinsufficient_scope. On the HTTP API, a read-only sign-in may only read. - An
mcp:writeconnection sees the tools that change data and the paid tools. - Paid and write calls must include
idempotency_key.dry_runpreviews the price without running anything;max_spend_usdcaps a call when you send it.
API keys for scripts
Send one of these to https://api.sume.com/v1/… or to
https://api.sume.com/mcp:
# Bearer
Authorization: Bearer $SUME_API_KEY
# or header
x-api-key: $SUME_API_KEYhttps://mcp.sume.com/mcp is for people and answers an API key with 401 api_key_not_accepted. Create keys in the dashboard:
API keys. sume login --api-key saves a key for the CLI
instead of signing in.
Credential safety
- A sign-in token is not an API key. Do not paste either into prompts or send them to third-party providers.
sume auth tokenprints a token for your own scripts; it lasts one hour.- If a key or token shows up in logs or chat history, revoke it: rotate the
key, or run
sume logout.
Hosted MCP vs CLI vs Studio Agent
| Question | Answer |
|---|---|
| Best interactive connector for Cursor/Claude? | Hosted MCP at https://mcp.sume.com/mcp, signed in with OAuth. |
| Best for local shell agents? | The CLI after sume login. |
Need Image 1.0 / Video 1.0 (images_create / videos_create)? | Not on hosted MCP. Use the Developer API. Router stills/clips are generate_image / generate_video. |
| Is Studio Agent the same as hosted MCP? | No. Studio Agent is a separate product surface. |