How to connect a data warehouse to your AI agent

Short answer: add your warehouse to swarmvia as a JDBC source with a read-only role, then connect Claude, ChatGPT, Cursor, or Codex to https://swarmvia.com/mcp. swarmvia loads the JDBC driver in an isolated runtime for your organization, holds the OAuth token, key pair, or password, limits concurrent queries, and logs every statement by name.

Giving sales, finance, or ops AI access to Snowflake, Databricks, NetSuite, BigQuery, SQL Server, or Oracle usually stalls on one problem: every vendor wants its own driver, its own OAuth or key-pair flow, and a long-lived credential nobody wants sitting in .cursor/mcp.json on fifty laptops.

With a swarmvia JDBC source, you connect the warehouse once and expose it through the same MCP server your team already uses for PostgreSQL, MySQL, remote MCP servers, and HTTPS APIs.

Why connect a warehouse through a JDBC source?

  • No drivers or credentials on laptops. Teammates add one MCP URL (https://swarmvia.com/mcp) and sign in with OAuth. They never install a JVM, configure a wallet, or copy a private key.
  • Native enterprise auth. Use passwords, OAuth 2.0 client credentials (refreshed and cached by swarmvia), Entra ID tokens, private keys, or service-account files without putting secrets in the JDBC URL.
  • Bounded concurrency. Warehouse credits and ERP query slots are easy for a burst of agents to exhaust. Each source enforces a concurrency limit, queues overflow, and cancels abandoned queries inside the driver.
  • Named audit trail. Every query and refusal is logged with the person, agent session, statement, row count, and timing.

Which warehouses and engines work?

Any database with a JDBC driver works. Built-in presets prefill the driver coordinates, URL template, and auth properties for:

  • Snowflake (key pair or OAuth) — setup guide
  • NetSuite SuiteAnalytics Connect (password or OAuth 2.0) — setup guide
  • Databricks SQL (service principal OAuth M2M) — setup guide
  • Azure SQL and SQL Server (Entra ID or SQL login) — setup guide
  • Oracle and Autonomous Database (token file, wallet, or password) — setup guide
  • Trino and Starburst (OAuth or password) — setup guide
  • BigQuery, ClickHouse, Vertica, HANA, and more, plus a generic JDBC preset for any vendor not on the list.

For PostgreSQL and MySQL (including Neon, Supabase, RDS, Redshift, Aurora, and PlanetScale), use the lighter native database sources instead: see How to connect a database to your AI agent.

Set it up

1. Create a read-only warehouse role

Create a dedicated role in your warehouse or ERP that can only SELECT from the schemas or views agents should see. On JDBC sources, swarmvia requests a read-only connection and rolls back each transaction, but drivers vary in how they treat that flag — the role's own grants are the real boundary.

2. Add a JDBC source

  1. Open Sources → New source → JDBC data source and choose a preset (or Other (generic JDBC)).
  2. For Maven Central drivers (Snowflake, Databricks, SQL Server, Oracle, Trino), keep the prefilled Maven coordinates and swarmvia fetches and verifies the jar automatically. For vendor-only downloads (NetSuite, BigQuery Simba), upload the Linux 64-bit JDBC jar once under Drivers.
  3. Fill in the public connection properties (account, warehouse, role, catalog) and save the secret properties, key files, or OAuth 2.0 client credentials in the source's Credential.
  4. Click Test connection to verify driver loading, TLS, authentication, driver-reported read-only status, and visible tables.

3. Choose which groups can reach it

Restrict the source to the groups that need it (for example, Finance for NetSuite or Analytics for Snowflake) under Sources → Access.

4. Connect your agent once

In Claude Code:

claude mcp add --transport http swarmvia https://swarmvia.com/mcp

Cursor, VS Code, Codex, Claude.ai, and ChatGPT all use the same URL. See Agents. Once approved, the agent inspects tables with source_schema, sizes tables with source_count_rows, and runs bound ? parameter queries with source_query.

Scripts and scheduled jobs

A JDBC source answers the same HTTPS endpoint as every other database source, so CI jobs and analysts' scripts share the same concurrency limit and logs:

curl https://snowflake-prod.swarmvia.cloud \
  -H "X-Swarmvia-Key: $ACCESS_KEY" \
  -H "content-type: application/json" \
  -d '{"queries": [{"sql": "select count(*) from analytics.orders where created_at >= ?", "params": ["2026-11-01"]}]}'

What to know before you start

  • JDBC only, not ODBC. Drivers must be Java JDBC jars targeting Java 8–21.
  • Built for analytical and agent queries. Each query opens a connection and sleeps when idle; it is not a replacement for your application's native warehouse driver.
  • Included on paid plans. JDBC sources run an isolated Java runtime per organization and are available on Starter (1), Team (3), and Business (10).

See JDBC sources for the full driver, OAuth, and limit reference.

Try it on your own data

Free to start, no credit card. Connect an agent in a few minutes.

Frequently asked questions

Which data warehouses and enterprise databases work?
Any database that ships a JDBC driver, including Snowflake, Databricks SQL, NetSuite SuiteAnalytics Connect, BigQuery, Azure SQL and SQL Server, Oracle, Trino, Starburst, ClickHouse, and more. Presets prefill common drivers and auth shapes, and a generic JDBC preset connects anything else.
Where does the JDBC driver come from?
For drivers published on Maven Central (such as Snowflake, Databricks, SQL Server, Oracle, and Trino), pick the preset and swarmvia fetches and verifies the jar automatically. For vendor-only downloads like NetSuite or BigQuery Simba, upload the Linux JDBC jar once under Drivers.
Does it support OAuth 2.0, Entra ID, or key-pair authentication?
Yes. JDBC credentials support passwords, tokens, key or wallet files (referenced safely without exposing them in the URL), and OAuth 2.0 client credentials that swarmvia mints and caches before each connection.
How is read-only enforced on a JDBC source?
swarmvia requests a read-only connection and rolls back each transaction, but drivers vary in how strictly they enforce that flag. Create a warehouse role with only SELECT grants on the schemas agents should read; Test connection reports what the driver declares.

In the docs

More solutions

Last updated