Policy-enforced MCP database tools
Expose your database to Claude and other MCP clients as typed, policy-checked tools instead of a raw SQL endpoint over the Model Context Protocol.
The problem
Wiring a database into an MCP server as an execute_sql tool hands every connected model a loaded gun. There’s no redaction, no tenant scope, no budget — just SQL and hope.
With OrmAI
OrmAI mounts your ORM as a set of MCP tools that compile to parameterized, policy-checked operations. The same policy that governs your Python agent governs Claude over MCP: redaction, scoping, budgets, and audit all apply.
The primitives doing the work
Typed MCP tool surface
db.query/get/aggregate/create/update/delete are exposed as MCP tools, never raw SQL.
One policy, every client
The declarative policy applies identically to function-calling and MCP clients.
Audit across protocols
MCP calls are logged with the same principal, trace, and decision record.
The policy, in a few lines
# Mount OrmAI's toolset behind an MCP server
toolset = mount_sqlalchemy(engine=engine, session_factory=Session, policy=policy)
# Every MCP tool call is compiled, policy-checked, and audited. Keep reading
Other use cases