Can I put my Sume API key in the MCP server URL? No, use a header
Do not put a Sume key in the MCP URL. The MCP auth spec bans tokens in the query string. Send a Bearer or x-api-key header, or use OAuth, in each client.

No. Do not put a Sume API key in the MCP server URL. The MCP authorization spec says access tokens must not be in the URI query string and that authorization must be sent on every request, so the right place for the key is a request header. Sume accepts Authorization: Bearer $SUME_API_KEY or x-api-key on the hosted server at https://mcp.sume.com/mcp, and OAuth is available for clients that support it.
Why the URL stays clean
A URL with a secret in it ends up in shell history, process lists, proxy logs, screenshots and shared config files. The MCP spec closes this off for token-based auth: the 2025-06-18 authorization page requires the Authorization header on every request and forbids tokens in the query string. Your Sume URL stays public: https://mcp.sume.com/mcp.
Where each client takes the key
Every major client has a header field for this. The table lists where each one takes it, from each vendor's own page.
| Client | Where the key goes | Notes |
|---|---|---|
| Claude Code | --header "Authorization: Bearer ..." on claude mcp add | Or use OAuth with claude mcp login |
| Cursor | headers in mcp.json, with ${env:VAR} interpolation | Keeps the key out of the file |
| Codex | bearer_token_env_var or http_headers in config | Reads the token from an environment variable |
OAuth or a key
For a coding agent on your laptop, OAuth is the cleaner path. claude mcp add --transport http sume https://mcp.sume.com/mcp and claude mcp login sume give a read-only session by default, and mcp:write is an opt-in at the consent screen, which unlocks the tools that change state or cost money. For CI, where nobody can click a consent page, a key in an environment variable is the usual choice.
Add it with a header
The two commands below add the server to Claude Code with the key in a header from an environment variable, so the URL carries nothing secret. Run them in a shell where SUME_API_KEY is set, and use claude mcp list to see the entry.
claude mcp add --transport http sume https://mcp.sume.com/mcp \
--header "Authorization: Bearer $SUME_API_KEY"
claude mcp listA note on shell expansion
Keep one thing in mind with the shell form. The shell expands $SUME_API_KEY when you run the command, so the key is stored in Claude Code's config for that scope. If that is not acceptable, use OAuth, or a client that reads an environment variable at connect time, like Codex with bearer_token_env_var.
One more place to check
The same rule applies to webhooks and callbacks. If a URL you give to any service has a secret in the query string, rotate it, because it has already been logged somewhere.
Sources
Related posts
More in Developers
- Cancel a video chain midway: 409 job_generation_already_started
Cancel works only before generation starts. In a render, trim and captions chain, cancel queued jobs, let started jobs finish, and stop submitting steps.
- Cancel a Wan 3.0 job before it starts, and what a 1080p clip reserves
A Wan 3.0 job can be canceled only before generation starts; after that you get 409 job_generation_already_started. The reserve is $7.50 for 30 s at 1080p.
- Cancel a queued avatar creation job before generation starts
Cancel a Sume avatar creation job with POST /v1/jobs/{id}/cancel. It works only before generation starts; later you get 409. Only the creator can cancel.
- Cancel video jobs still queued after 10 minutes: handle the 409
A Python sweeper that cancels Sume video jobs queued too long. POST /v1/jobs/{id}/cancel works only before generation starts; the 409 means keep waiting.
Written by Sume