An access policy that lives only in application code can be enforced, but it cannot be queried, and it cannot stop a grant written by another path. Over the last month the decision of whether a user may call an AI tool moved from code alone to code and database together, with the same answer from both.
One verdict, two places
- The verdict as SQL A database function answers for a user, a tool, a database and a world, with the same closed list the server uses: no such tool, below the role floor, no grant, environment refused, above the AI ceiling, missing write verbs, not in the allowance, or allowed.
- Proved equal A test runs the server's policy and the SQL function over forty users with grants and every tool in the catalogue, and asserts the same verdict for each pair.
- The role floor on the row Each tool stores the role floor of its category, and the full set of prerequisite tools it needs, so the security pages can say who a tool is open to without reimplementing the rule.
The database refuses what the policy would close
- No grant without the door A grant to a user without MCP access, or below the tool's role floor, is refused at insert.
- Grants follow their reasons Clearing a user's MCP access deletes that user's tool grants; revoking a role removes the grants the role was holding open, and the revoke reports what it removed.
Grants an administrator can read
- A matrix, either way round Users against tools and tools against users, each grant drawn by state: used, dormant after 90 days without a call, closed by the role floor, or expired.
- Grants only The matrices read the grants and one heading per user and per tool, where they used to read every pair, and every empty cell offers the same Grant action.
- Whole prefixes, with a reason and an end A tool prefix can be granted or revoked for the selected users in one action; the reason is required, an end date is optional, and tools the database would refuse are left out and named.
Live sessions are told
- tools/list_changed A change to a user's database access or tool grants is pushed to that user's open MCP sessions on their event stream, and
initializeadvertisestools.listChanged. - Not a substitute for the gate A client that never opens the stream sees the change on its next listing; a revoked tool is refused on every call regardless.
The practical effect is that an auditor can ask the database who may call a given tool today, and get the answer the server will act on.