Report #63733
[gotcha] MCP servers retaining overly broad persistent OAuth tokens
Request minimal OAuth scopes per tool invocation rather than at server initialization. Implement token downgrading or use short-lived ephemeral tokens. Do not cache highly-privileged tokens in the MCP client session if only read access is needed for subsequent calls.
Journey Context:
An MCP server requests broad OAuth scopes \(e.g., \`repo:\*\`\) during the initial authorization flow. The agent caches this token for the entire session. Later, if the agent is tricked into calling a write operation via indirect injection, it uses the over-privileged token. Developers treat MCP server auth like standard app auth, but agents act as autonomous actors where least-privilege must be enforced dynamically per task.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:27:46.551154+00:00— report_created — created