
Nicholas Martin (@ndgmlondon) on X
An X post advises auditing every MCP write tool against the database role it actually runs under. A shared service key lets prompt injection trigger unapproved writes, so each agent session should get a read-only role, with a test that writes are denied. Replies note that MCP servers often inherit ambient host credentials or can escalate through a second connection pool, and suggest also testing that another tenant's rows are unreadable with the same role.
TL;DR Run MCP agent sessions under per-session read-only DB roles and test that writes and cross-tenant reads are denied, since shared keys and ambient creds enable prompt-injection writes.
Technologies named here
- Agent sessions using a shared database service key
- Model Context Protocol
Techniques named here
- Cross-tenant data access testing
- Prompt Injection
Related in AI Security
