datahub-okf-governed-query
Executes closed, typed queries against synthetic PostgreSQL data with policy enforcement and schema verification.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@datahub-okf-governed-queryrun the governed query for active users"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DataHub + OKF Governed Query
A security-focused MCP adapter that combines read-only DataHub metadata evidence with a reviewed OKF-derived policy IR before executing a closed, typed query against synthetic PostgreSQL data.
Status
The architecture and implementation slices are specified. Implementation starts with the reproducible TypeScript and Nix foundation.
Related MCP server: ContextGuard SQL Agent MCP Server
Core boundary
MCP caller
-> Context MCP
-> pinned DataHub MCP (read-only evidence)
-> private Unix socket
-> Query Executor
-> reviewed Policy IR
-> live PostgreSQL schema and role verification
-> fixed typed SQL
<- validated structured resultDataHub is evidence, not the authorization authority.
Runtime authorization is deterministic; an LLM does not decide
ALLOW.The executor never accepts arbitrary SQL.
The MVP does not write decisions or query results back to DataHub.
The demo uses one synthetic dataset and fails closed on ambiguity or drift.
Development checks
Enter the pinned Nix shell, install with pnpm, and use Deno as the least-privilege TCB runtime:
nix develop
pnpm install --frozen-lockfile
deno task checkpnpm-lock.yaml is the only npm dependency lock. Deno uses the existing
node_modules in manual mode and receives repository read access only for the
TCB check. Environment access is limited to 22 exact non-secret TypeScript
watcher, inspector, mode, and terminal keys; Deno receives no write, network,
subprocess, FFI, or system permission.
Start with the design specification and the implementation plan index.
This server cannot be deployed
Maintenance
Related MCP Connectors
Deterministic safety, correctness & cost gate that vets Postgres SQL before your AI agent runs it.
Paid remote MCP for governed database query review, SQL simulation, approvals, and audits.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides a read-only PostgreSQL SQL surface for LLM agents via MCP, with defense-in-depth security layers for safe database queries.3MIT
- AlicenseNot gradedqualityCmaintenanceA metadata-guided, read-only SQL analysis MCP server for DataHub that helps agents perform safe analytical queries using DataHub schema, lineage, ownership, and tags, with a deterministic planner and strict SQL safety layer against local synthetic SQLite, guaranteeing zero write or mutation operations.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceProvides read-only access to PostgreSQL databases via MCP, enforcing least-privilege roles, row-level security, masked views, and SQL AST guardrails to prevent data leakage and unauthorized operations, enabling AI agents to safely query sensitive production data.MIT

MCP DB Gatewayofficial
AlicenseNot gradedqualityBmaintenanceProvides governed, read-only PostgreSQL access for AI agents via MCP. Enforces schema/table allowlists, query limits, and audit events.MIT