MAP: Remapping Runtime Intent in Database-Backed Model Context Protocol (MCP) Servers
Agentic systems increasingly delegate database access to Model Context Protocol (MCP) servers that execute model-directed Structured Query Language (SQL) using long-lived credentials. Although the database can authenticate the credential, it cannot determine whether an operation matches the issuing process's role. We study 254 public database MCP servers, covering 93.4% of the SQL-backed subset in two ecosystem corpora. We find that 81.5% request authority beyond the operation classes evident in their implementations, while 18.1% expose hardcoded credentials. An executable attack demonstrates how adversarial context can convert this excess authority into a destructive yet authenticated database operation. We present MAP (MCP-Aware Privilege Enforcement), which makes operational intent an independently enforced runtime invariant. MAP binds deployment-defined privilege ceilings to MCP server processes, attributes outgoing database operations to their issuers, and blocks out-of-role execution before it reaches the database, without modifying MCP servers or database engines. Across 123 operational servers, MAP preserves legitimate database behavior while enforcing process-scoped privilege boundaries. It adds 28$μ$s mean query latency and reduces median throughput by 13.6%. Process-bound runtime enforcement can thus provide a practical security boundary for database access in agentic systems.