VS Code Settings Sync and MCP servers: keep the Sume key out

VS Code can sync MCP config when the MCP Servers sync option is on. Keep the Sume API key out of the file with an input variable, or use OAuth instead.

5 min readSume
All posts

If you use the Sume API key in VS Code, do not paste it into an MCP config that Settings Sync can carry to other machines. The VS Code page says MCP configuration synchronizes when the "MCP Servers" option is enabled in Settings Sync, so a literal key in that file can travel with it. Use an input variable for the secret, or connect with OAuth so no key sits in the file at all.

This post covers only the sync side effect. For how Sume's two credentials differ, see the hosted MCP docs.

What the VS Code page says

The facts below come from the VS Code MCP page. Sume's own facts come from its docs.

Facts relevant to a synced Sume entry (VS Code page read 2026-10-09; Sume docs as of 2026-10-09)
TopicFactSource
Remote server entrytype http plus a urlVS Code docs
SecretsThe page recommends input variables for secretsVS Code docs
Settings SyncMCP configuration syncs when the MCP Servers option is enabledVS Code docs
Sume server URLhttps://mcp.sume.com/mcpSume docs
Sume API key headerAuthorization: Bearer or x-api-keySume docs
Sume OAuthRead-only by default; Write is an opt-in toggle on the consent pageSume docs

A config that carries no secret

Declare an input that VS Code prompts for, and reference it from the header. The key is then asked for on each machine rather than stored in the synced file. Check the field names against the VS Code page before you rely on this sketch.

{
  "inputs": [
    {"type": "promptString", "id": "sume-key", "description": "Sume API key", "password": true}
  ],
  "servers": {
    "sume": {
      "type": "http",
      "url": "https://mcp.sume.com/mcp",
      "headers": {"Authorization": "Bearer ${input:sume-key}"}
    }
  }
}

Other places a key can leak in VS Code

Settings Sync is one route. A workspace file at .vscode/mcp.json is another, because it normally sits inside a repository that teammates clone and that CI reads. The VS Code page also lists .mcp.json and a user-level ~/.copilot/mcp-config.json as locations, so check every one of them for a pasted key before you commit or enable sync.

VS Code also asks you to trust a server before it starts, and the page documents an MCP: Reset Trust command. Use it when you want the prompt to appear again for an entry you have changed.

Choosing between the key and OAuth

An API key gives the full tool set, including write and paid tools, to whoever holds it. Anything that syncs it widens that group. OAuth sessions are read-only unless the person ticks the Write toggle on the consent page, so a synced OAuth entry that has no secret in it carries less risk: each machine signs in on its own.

If a leaked key is the concern, rotate it from the dashboard and move to OAuth for editors that sync settings. Write and paid calls still need an idempotency_key whichever credential you use, and max_spend_usd is optional, enforced only when you send it.

  • Turn the MCP Servers sync option off if you cannot avoid a literal key.
  • Prefer one OAuth sign-in per machine over a shared key.
  • After syncing, run mcp_health on the new machine to confirm which credential the session uses.

Sources

Related posts

More in Integrations

All Integrations posts

Written by Sume