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: 17 read-only tools. Create and spend credits on the consent page adds mcp:write: the sign-in set of 41 tools. |
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. https://mcp.sume.com/mcp does not accept API keys. A key made on the Open pages answers 403 open_key_route_not_allowed on /mcp. |
There is no mcp:paid scope. Paid calls are checked against the
workspace balance, need an idempotency_key, and dry_run: true prices them
in dollars 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, as ChatGPT does; Sume accepts a document that offers thenonetoken method and swaps codes with PKCE, no client secret) and sends you tohttps://mcp.sume.com/oauth/authorize. The redirect must match a registered one. A loopback redirect (http://127.0.0.1,http://localhostorhttp://[::1]) matches on any port. - 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. It starts on when the app asks formcp:writeor names no scope, and off when the app asks formcp:readonly. You can turn it on or off. - 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 and gives the next one, and one unused for 30 days expires.
- To end a connection, send its refresh token to
/oauth/revoke. The access token from that sign-in fails on the next request. - Sending a refresh token that was already used ends the connection the same way, and the app must sign in again.
- When Sume's sign-in check is overloaded,
/mcpand/v1answer a valid token with503, not401. Retry the request; you do not need to sign in again.
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. An API key belongs to one workspace, so select_workspace answers it
with 409 workspace_fixed.
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 the 17 read-only tools. A create or edit tool returnsinsufficient_scope. A tool that this host does not offer returnstool_not_found. On the HTTP API, a read-only sign-in may only read. - An
mcp:writeconnection sees the sign-in set of create and edit tools: 41 tools in all. Crawl, Avatar and the other API-key tools are not in it. Refer to Tools and gates. - Paid and write calls must include
idempotency_key.dry_run: truereturns the price in dollars (usage.usd) without running anything;max_spend_usdcaps a call in dollars 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. A key made on the Open pages answers 403 open_key_route_not_allowed on /mcp. 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. |