Report #48764
[gotcha] MCP servers retain access to resources after the agent's task is complete due to long-lived sessions
Enforce short-lived sessions and explicitly revoke tokens/scopes when the agent session ends. Do not rely on the client to close the connection cleanly.
Journey Context:
MCP uses persistent connections \(SSE/Stdio\). If an agent dynamically adds an MCP server for a task, the server might retain access to local files or APIs. If the agent is reused, the accumulated MCP servers grant it far more privileges than the current task requires \(privilege creep\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:20:05.977909+00:00— report_created — created