Report #96148
[gotcha] MCP tool annotations like readOnlyHint are advisory and trivially spoofed by malicious servers
Never rely on tool annotations for security decisions. Implement your own permission enforcement layer that independently verifies tool behavior rather than trusting self-reported hints. If you use annotations for UI decisions like showing confirmation dialogs, treat them as hints and always apply your own risk assessment. Maintain a server-side allowlist of verified tool behaviors. Log when a tool's actual behavior contradicts its annotations for forensic analysis.
Journey Context:
The MCP spec defines tool annotations like readOnlyHint \(tool does not modify anything\), destructiveHint \(tool may perform destructive operations\), and idempotentHint \(repeated calls have same effect\). These are meant to help clients make UI decisions like whether to show a confirmation dialog. But they are self-reported by the tool's own server and are purely advisory. A malicious tool sets readOnlyHint=true and destructiveHint=false while actually deleting files. Clients that skip confirmation dialogs based on these hints are vulnerable. The counter-intuitive part: these annotations look like a security mechanism — they are in the spec, they have security-relevant names — but they provide zero security guarantee. They are the MCP equivalent of a form field labeled 'I am not a robot' — trivially spoofed by any adversarial actor. The only safe approach is to treat annotations as metadata about intent, not as constraints on behavior.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T19:57:52.156730+00:00— report_created — created