One MCP endpoint
Point Claude Code, Cursor or Claude Desktop at one URL. Agents get tools to run queries, list schemas, describe tables, read the engine plan, and check or cancel what they started.
Put QueryFlux in front of the engines you already run. Your tools and AI agents connect once, over Trino, PostgreSQL, MySQL, Snowflake, Arrow Flight or MCP. QueryFlux sends each query to the right engine, translates the dialect, enforces your guardrails and access policies, and records who ran what.
clusterGroups:starrocks-bi: { maxRunningQueries: 50, members: [sr-1] }trino-etl: { maxRunningQueries: 20, members: [trino-1] }duckdb-adhoc: { maxRunningQueries: 4, members: [duck-1] }routers:# BI tools connect over MySQL wire- type: protocolBasedmysqlWire: starrocks-bi# batch jobs tag themselves- type: tagsrules:- tags: { workload: etl }targetGroup: trino-etlroutingFallback: duckdb-adhoc
From an agent question to a Studio trail: guardrails, dialect translate, routing, cache, then the engine that should run it. Connect an agent →
How many US events landed in the last 7 days?
Incoming · Trino SQLSELECT date_trunc('day', ts) AS d,
count(*) AS n
FROM events
WHERE country = 'US'
AND ts >= date_add('day', -7, now())
GROUP BY 1
The agent asks over MCP
The AI agent calls queryflux.run_query — one endpoint, no warehouse credentials on the client.
Point Claude Code, Cursor or Claude Desktop at one URL. Agents get tools to run queries, list schemas, describe tables, read the engine plan, and check or cancel what they started.
Each query records the agent, conversation, step and tool call behind it. Replay a conversation step by step in Studio and see exactly what the agent ran, and what was blocked.
Block writes, cap result sizes, require a WHERE clause on the tables you choose, or call your own Python or webhook check. Guardrails run in QueryFlux itself, so they hold whether an agent connects over MCP or a SQL driver.
Row filters and column masks from OPA or Cerbos apply to agents like any other user. Route agents to their own group with its own concurrency limit, so a busy agent queues instead of starving your dashboards.
Most data platforms already run more than one engine. Without a routing tier, each one adds drivers, conventions, and dashboards that someone has to keep in sync.
Topology becomes config, not code. Add an engine, change a rule, or swap a backend without touching a single client.
Every query passes through the same pipeline, whichever protocol it arrived on. Read the system overview →
One control point between your clients, your agents and your engines: it decides where each query runs, what it may do, and keeps the record.
Send each query to the engine that should run it, by protocol, user, tags, SQL pattern or a Python rule. Translate the dialect on the way, and move traffic between engines by weight with no client changes.
Cap running queries per engine across every replica and worker, and queue the rest. Block writes, cap rows, require a WHERE clause on chosen tables, and apply row filters and column masks from OPA or Cerbos.
See every query with its user or agent, the route it took, its timings and its guardrail decisions. Prometheus metrics, Grafana dashboards, and Studio for history, routing and replay.
Any engine, any protocol, in your environment. Apache-2.0, written in Rust, about 0.35 ms of p50 overhead. Your clients keep their drivers; your engines stay replaceable.
Routing, capacity limits, and load balancing — one proxy, every client, no separate stack per engine.
BI tools connect over MySQL wire and land on StarRocks, scheduled jobs stay on Trino, and ad-hoc SELECT * exploration is matched by regex and sent to Athena — no new connection strings for your teams.
A Python router inspects every query and steers CPU-heavy joins and windows to compute-priced Trino while scan-heavy Iceberg reads go to scan-priced Athena. Encode the cost model once; every client inherits it.
Cap the StarRocks group with maxRunningQueries so dashboards always have headroom. When it is full, ad-hoc queries wait in line at the proxy instead of reaching StarRocks — and Grafana shows queue depth live.
Run Trino and StarRocks in one group and ramp StarRocks from 10% to 100% with zero client changes. Studio query history lines up per-engine latency until you are ready to flip the weights.
Identity, migrations, fleet-wide limits and deployment: the parts that decide whether a proxy survives contact with real traffic.
No shared warehouse password for every agent. QueryFlux can pass the caller’s own credential through, run the query as that user on Trino or ClickHouse, or exchange their token for one the engine accepts. The engine’s own permissions and audit log still apply.
Snowflake clients connect to QueryFlux as if it were Snowflake, and their queries can run on Trino, StarRocks or DuckDB instead. The connection string stays the same; the engine behind it is your choice.
A cluster’s concurrency limit holds across every replica and worker. Queries that have to wait are served first come, first served: in our capacity benchmark, waits dropped from 3–14 s to about 0.1 s at p99.
Run one proxy, a set of replicas, or a QueryFlux worker beside each application, as a sidecar or one per node. Workers take config, limits and history from a control plane and never touch its database.
No. QueryFlux sits in front of the engines you already run and forwards queries to them. Your data stays where it is.
Clients connect over Trino HTTP, PostgreSQL, MySQL, Snowflake, Arrow Flight SQL or MCP. Queries run on Trino, DuckDB, StarRocks, ClickHouse, Athena and MySQL, and through ADBC on Snowflake, BigQuery, Databricks, Redshift, PostgreSQL and more.
Routing rules you write, checked in order: by protocol, user, tags, a SQL pattern, or a Python function. The first match picks a cluster group, and the group spreads queries across its members. See routing.
Turn on guardrails (read-only, row limits, a required WHERE clause on chosen tables, or your own Python or webhook checks) and access policies with row filters and column masks. They run in the query path for every protocol. Route agents to their own group with its own concurrency limit, so they can't crowd out other work. See guardrails.
Yes. Every query records the agent, conversation, step and tool call, and Studio replays a conversation step by step. See agentic AI.
In your environment. QueryFlux is Apache-2.0 open source: run it with Docker or Helm, as one proxy, a set of replicas, or workers next to your applications.
About 0.35 ms at p50 on the proxy path, measured with the benchmark in the repo. See benchmarks.
Pick a path through the docs, or come say hi — QueryFlux is built in the open.
Docker Compose stacks with Trino, Studio, and Postgres — up in one command.
02Why QueryFlux exists, agents with guardrails, row filters and column masks, Iceberg routing, and Snowflake offload.
03Frontends, router, translation, admission, and observability end to end.