View Categories

Connect MariaDB to Claude with MCP

MCP · MariaDB to Claude

Ask Claude about your MariaDB database, in plain English

Connect claude.ai, Claude Desktop, ChatGPT, Cursor or any MCP client to Query Streams once. Your AI client asks; the Agent that already sits with your MariaDB database, its partner inside your network, does the heavy lifting: it runs the SQL read-only, and on paid plans it also sizes, profiles and holds results so follow-ups need no second query. No database password ever reaches the AI. About ten minutes, and the Free plan covers it.

About 10 minutes Claude, ChatGPT, Cursor + 11 more clients Data stays on your network Read-only, always
Stuck at any point? Just ask us. Open Support in Query Streams (top-right menu → Support) and send us a message. Real people read it, and “I don’t know what this screen is asking for” is a perfectly good question.

What you’ll end up with

MariaDB logoA Claude that can answer questions about your MariaDB database with live, read-only queries, explain what the columns mean, and follow up when you ask for more — without ever seeing a database login, and without a firewall change: the Agent already inside your network runs the SQL and sends back only the rows. Once the Agent is in place, connecting Claude takes about 90 seconds if you are comfortable with a settings screen. Like this:

Nova, the Query Streams assistant

Rather not wire up an AI client at all? On the Business plan, Nova is the assistant built into Query Streams itself. It uses the same Agent toolset your AI client gets here, plus what an outside client does not: it drafts and validates the SQL against your Semantic Intelligence model, turns the answer into a chart, and saves the result as a query your team can run from Excel, Google Sheets or the REST API — no key, no connector, nothing to install. Use MCP when your people already live in Claude, Cursor or ChatGPT; use Nova when you want the answers inside the Portal.

MariaDB holds your data on a server you or your team run. Claude, on the other hand, lives in a browser or a terminal and knows nothing about it. The usual bridge is pasting a schema into the chat and hoping, or handing an open-source MCP server your MariaDB password. Query Streams does it differently: the Agent that already sits with your MariaDB database runs the SQL Claude writes, read-only, and the MCP server in between checks who is asking, what they may do and how often. Claude gets answers. It never gets credentials.

WHERE THE DATABASE LIVESyour office network or server roomYour MariaDBdatabasestays on your networkQuery Streams Agentruns the SQL Claude writesSELECT only, enforced hereQuery StreamsMCP serverchecks key, scopes, rate limit · logs every callWHERE YOU ASKclaude.ai, Claude Desktop, Claude Code, Cursor, ChatGPTYour AI clientholds a key or a connection, never a password
Claude never touches your MariaDB database. It asks the Query Streams MCP server, which relays the request over the outbound connection your Agent already holds open. The Agent runs the query and sends back only the rows.

What you’ll need

A Query Streams account

MCP is on every plan, including Free. Free allows one key or one connected app, which is all this guide needs. Sign up at my.querystreams.com.

MariaDB connected through the Agent

The Agent installed where your MariaDB database is, with the connection added in Data Agents. Not done yet? Connect MariaDB first; it takes about ten minutes.

MCP switched on for you

Creators, owners and admins have it from the start. Everyone else needs an admin to flip the MCP switch beside their name under Account → Access Control. Until then the MCP page says “MCP is disabled for your account”.

An AI client

Chat apps such as claude.ai, Claude Desktop and ChatGPT connect with no key. Claude Code, Cursor, VS Code and about ten other tools use a key; the Portal’s Connect an AI client guide sets up each one.

Where does the work happen? On the computer that runs the Agent. It receives the SQL your AI client wrote, checks it is a SELECT, runs it and returns the rows. So that computer needs to be on when you ask; your own laptop only needs the AI client.

Set it up in four steps

  1. Open MCP in the portal

    Sign in at my.querystreams.com and open Streams → Live → MCP. The page has four tabs: Connections, Context, Tools and, for admins, Activity. Check the Semantic Intelligence panel on Connections while you are here: it lists your MariaDB connector and whether Semantic Intelligence has run on it. Complete coverage is what lets Claude write correct MariaDB SQL on the first try.

    Seeing “MCP is disabled for your account”? Your organization has MCP but your user is switched off. An admin turns it on with the MCP switch beside your name under Account → Access Control. Creators, owners and admins are on from the start.

  2. Choose how you will connect

    There are two ways in, and they end at the same place:

    Chat apps · no key

    claude.ai, Claude Desktop, ChatGPT

    In claude.ai and Claude Desktop, open the Query Streams listing in Anthropic’s Connectors Directory, click Connect and approve. Adding it by URL, https://mcp.querystreams.com/mcp, is the fallback. In ChatGPT you add Query Streams from the app (developer mode for now) and sign in with Query Streams. Either way a Query Streams page opens: pick the organization and the permissions and click Approve connection. Nothing to copy. The connection appears on the Connections tab and can be revoked there.

    Developer tools · a key

    Claude Code, Cursor, VS Code and friends

    On the MCP page click Connect an AI client. The guide asks How will your AI client connect?: choose Use a key in a config file, pick your tool, then Generate a key for it: a Key name, Read and Run queries ticked, an Expiration (Never, 30 days, 90 days or 1 year). Set it up shows the snippet with the key filled in, and Check the connection waits for the first call.

    Both ways use the same three permissions, which you choose on the consent screen or on the key:

    Read
    List connectors, browse tables and columns, read your saved queries and alert rules. Never returns row data.
    Run queries
    Run read-only SQL and saved queries through your Agent and return the rows. Without it your AI client can describe your data but not answer from it.
    Analyze
    Profile tables, discover relationships and queue a Semantic Intelligence run. It spends Nova AI credits and data allowance, so the consent screen never pre-ticks it.

    Lost the key? It is listed on the Connections tab: Reveal full key shows it again and Copy full key copies it. Revoke it there if a laptop goes missing; every client using it fails on its next call, within about five minutes.

  3. Connect Claude

    Pick the recipe for the Claude you use. The server address is the same everywhere: https://mcp.querystreams.com/mcp.

    Claude on the web, Claude Desktop and mobile no key

    1. Open the Query Streams listing in Anthropic’s Connectors Directory and click Connect. In Desktop it then sits under + → Connectors.
    2. Fallback, if your organization hides directory connectors: Settings → Connectors → Add custom connector, name Query Streams, URL https://mcp.querystreams.com/mcp, OAuth fields empty, Add; then in a chat + → Query Streams → Connect.
    3. A Query Streams tab opens. Sign in if asked, pick the organization, review Read and Run queries, optionally Limit to specific connectors, and click Approve connection.
    4. Back in Claude you see “Connected to Query Streams”. The first time Claude uses a tool it asks; choose Always allow.

    If you do add it by hand in Claude Desktop, use Settings → Connectors → Add, not the in-chat Add marketplace option, which expects a git repository. Connectors sync to your Claude account, so the mobile apps and Desktop pick it up automatically. Menu names are Anthropic’s and can move.

    Claude Code key

    One command, with your key from the Connections tab:

    Terminal
    claude mcp add --transport http querystreams https://mcp.querystreams.com/mcp \
      --header "X-MCP-Key: qsmcp_PASTE_YOUR_KEY_HERE"

    That writes the current project’s .mcp.json. Add --scope user to have Query Streams in every project. Run /mcp inside Claude Code to see it connected.

    Cursor key

    Open Cursor Settings → MCP → Add New MCP Server, or edit .cursor/mcp.json at the root of your workspace:

    .cursor/mcp.json
    {
      "mcpServers": {
        "querystreams": {
          "url": "https://mcp.querystreams.com/mcp",
          "headers": {
            "X-MCP-Key": "qsmcp_PASTE_YOUR_KEY_HERE"
          }
        }
      }
    }

    Restart Cursor or run MCP: Restart Servers; a querystreams badge appears in the MCP status bar.

    Using something else? The Portal’s Connect an AI client guide has ready-to-paste recipes for ChatGPT, VS Code, Visual Studio, OpenAI Codex CLI, Gemini CLI, Windsurf, Zed, Cline, Continue.dev and JetBrains AI, plus a Paste & merge tool that drops the querystreams entry into a config file you already have. Any client that speaks MCP over HTTP works: server https://mcp.querystreams.com/mcp, header X-MCP-Key (an Authorization: Bearer header with the same key also works).

  4. Ask your first question

    Start with something you already know the answer to, so you can see Claude reach for the right tool. Three that work well with your MariaDB database:

    “What data do I have in my MariaDB database?”
    Claude lists the tables it can see, tells you which have Semantic Intelligence, and asks what you want to look at.
    “Show me ten rows from customers and explain each column.”
    Claude reads the table structure first (Read), then runs one SELECT through your Agent (Run queries) and describes what name and city mean.
    “How many rows does customers have per city? Which city has the most?”
    Claude writes the GROUP BY in MariaDB’s dialect, runs it, and answers in a sentence with a small table. Follow up in the same chat; it keeps the context.

    To confirm the wiring, ask “What Query Streams connectors do I have?”. Claude calls qs_list_connectors, the Portal guide’s Check the connection step says Connected, and the key or app on the Connections tab shows its Last used time within a few seconds.

That’s it. Claude now answers from your MariaDB database whenever you ask, in whatever Claude you opened. Nothing left your network except the rows a question needed, and nobody typed a password into an AI.

What Claude can do once connected

Your AI client sees the Query Streams tools; it picks the right one for your question. The Portal’s Tools tab lists all 38 tools and modes with what your plan includes. On every plan, Free included:

Map your data

Connectors, databases and Agents; the tables and columns of your MariaDB database with descriptions, sample values and joins once Semantic Intelligence has run.

Profile and explore

Profile a column before filtering on it; discover joins nobody declared. (Analyze)

Run read-only SQL

A SELECT in the right dialect for MariaDB, 60 seconds by default and five minutes at most. Your plan sets the most rows one query returns. (Run queries)

Saved queries, federated and alerts

Run the saved queries your team trusts with new values; federated ones come back already joined. Read alert rules and draft one as a dry run.

The Analytic toolset. On paid plans the Agent does the groundwork where your MariaDB database lives, so your AI client spends its attention on the thinking. Free works as it always has.

Context management

Personal Core and up

Size a result before reading it (shape), walk a large database area by area (levels), and keep answers inside a token budget with only the columns and cell lengths it needs.

Result analysis

Personal Core and up

A profile of the whole result instead of rows. Held results with labels answer follow-ups and group-by totals with no second query. Data freshness and changed-since read only what is new.

Deeper analysis

Business Core and up

A data quality report, anomalies, segments, a statistical compare and a diff between two held results.

The defaults live on the Context tab: text cell limit, schema view, result size, analysis defaults and held results.

The tool names, if you want to recognise them in your AI client’s replies
PermissionTools
Readqs_list_organizations qs_list_agents qs_list_connectors qs_get_si_status qs_get_connector_schema qs_get_table_schema qs_get_relationships qs_list_saved_queries qs_get_task_status qs_list_alert_rules qs_get_alert_state qs_list_recent_alerts qs_result_windows
Analyzeqs_profile_table qs_discover_relationships qs_request_si_analysis qs_setup_si
Run queriesqs_run_query qs_run_saved_query qs_data_freshness qs_result_query qs_result_page qs_result_sample qs_result_release qs_result_anomalies qs_result_segments qs_result_compare qs_result_diff qs_create_alert_rule (proposes only)

Why Semantic Intelligence matters here

Every answer Claude receives is tagged with where the structure came from, and Claude adjusts how much it trusts what it sees.

TierWhat Claude seesResult
Semantic IntelligenceDescriptions for every table and column, sample values, enum meanings, declared and discovered joins.Claude writes the right MariaDB SQL first time and explains the data in your business terms.
Captured schemaTable and column names, types, keys.Claude works, but infers meaning from names and may ask a follow-up.
Live schemaThe database is outside the connector’s capture selection, so structure is read live on each request (needs the Run queries permission; SQL Server, MySQL and PostgreSQL).Queries still run. Claude explores with small selects when it needs more.

If a database matters, run Semantic Intelligence on it once from Nova → Intelligence. The Connections tab shows a coverage panel per connector. How Semantic Intelligence works.

What the plans allow

MCP is on every plan, including Free, with no separate fee. What each plan sets is how many keys or connected apps you can hold and how many calls a minute your AI client may make:

PlanKeys per userKeys per organizationCalls per minute
Free1130
Personal Core1160
Personal Plus1190
Business Core23120
Business Plus35150
Business Max510240
Enterprise Core525300
Enterprise Plus850450
Enterprise Max10100600

A connected app counts as a key. On top of the per-minute figure, any one key may run at most 10 queries a minute. A query runs for up to 60 seconds unless your AI client asks for more, up to five minutes. Your plan also sets how many rows one query returns and, with the Analytic toolset, how long and how large a held result may be; the full MCP guide lists every plan. The rows your AI client receives count against your Data Realm allowance, the same pool your Excel and Sheets queries use, and MCP is measured the same way as your spreadsheet queries. Semantic Intelligence runs started from Claude spend Nova AI credits, exactly as they do from the Portal. See the pricing page for the allowances.

Keeping it safe

Read-only, checked by the Agent

Only SELECT statements run. The check happens on the computer that runs the Agent, before your MariaDB database sees the SQL, so nothing your AI client writes can change data.

No credentials in the AI

The MariaDB login stays on the Agent. Claude holds a Query Streams key or connection, which you can revoke from the MCP page; the change takes effect within about five minutes.

Everything is logged

Every tool call appears on the MCP Activity tab and every query in Query History as client type MCP, attributed to the person whose key or connection made it. The SQL text and the key itself are never written to the activity log.

What the AI provider receives

Table and column names, the Semantic Intelligence descriptions including sample values, and the rows of the queries you ask for. With the Analytic toolset it often gets a size estimate, a profile or a held-result answer instead, and the full result stays with the Agent. What it gets goes to the AI provider you connected, under its terms. Query Streams never sees your chat.

Good next moves

  • Save the queries you consider canonical in Query Builder. Claude reaches for saved queries first, so “active customers” means what your team says it means.
  • Use a Claude Project with Query Streams attached and put your house rules in its instructions: which MariaDB database to use by default, which saved queries are the official definitions.
  • Grant Analyze when you want deeper answers. Profiling a column before filtering on it is the difference between guessing a status code and using the right one. It spends Nova AI credits, so it is off until you say so.
  • Ask for a chart. claude.ai draws charts from the rows Claude gets back.

When something doesn’t work

What you seeWhat it meansFix
Your AI client shows no Query Streams toolsThe connector was added but never connected, or the key was pasted into the wrong place.In Claude: + → Query Streams → Connect. In a developer tool: restart it, then use Check the connection in the Portal guide.
MCP_KEY_REQUIRED or 401No key reached the server, usually a stray newline from copy and paste or the key in the wrong header.Copy the key again from the Connections tab and send it in the X-MCP-Key header.
MCP_USER_DISABLEDAn admin switched MCP off for your user.Ask them to turn the MCP switch back on under Account → Access Control.
MCP_SCOPE_REQUIRED or MCP_SCOPE_DENIEDThe key or connection lacks the permission for that action, usually Run queries.Edit the key on the Connections tab and tick Run queries, or reconnect the app and approve it.
MCP_KEY_ORG_LIMIT_EXCEEDEDYour plan’s key limit is used up. On Free that is one key or one connected app.Revoke one you no longer use, or move up a plan.
MCP_AGENT_NOT_CONNECTED or MCP_AGENT_NOT_REGISTEREDThe Agent that owns your MariaDB database is not connected right now.Open Data → Data Agents and start the Agent on its computer.
MCP_DATABASE_NOT_CAPTUREDThe database is outside the connector’s capture selection, so there is no stored schema or Semantic Intelligence for it. Queries still work.Add it to the capture selection on the connector, then run Semantic Intelligence if you want richer answers.
MCP_RATE_LIMITEDToo many calls a minute for your plan, or more than 10 query runs a minute on one key.Wait a moment. Semantic Intelligence lets Claude answer in fewer calls.
MCP_QUERY_TIMEOUT or MCP_OUTPUT_TOO_LARGEThe query ran past its timeout or returned more than your AI client can take in one reply.Ask for fewer rows or columns, or a date filter. On plans with Context management, ask it to size the result first.
MCP_DATA_REALM_EXHAUSTEDYour organization’s data allowance for the period is used up.Wait for the allowance to reset or top it up from the Portal.
MCP_FEATURE_NOT_INCLUDEDYour plan does not include Context management, Result analysis or Deeper analysis, or that tool is switched off for this key or organization.Ask your AI client to carry on without it, move up a plan, or ask an admin to switch the tool on.
MCP_RESULT_EXPIREDThe held result is no longer held: it expired, was released (sometimes early, to make room for a newer one) or the Agent restarted.Ask your AI client to run the query again with hold.
MCP_WINDOW_BUDGETThe Agent cannot keep a result that size right now, or a follow-up needs more memory than it allows.Release a held result, or narrow the query with a filter or fewer columns.
MCP_AGENT_ANALYSIS_DISABLEDHeld results and analysis are switched off on that Agent or connector.Ask an admin to turn on Local analysis on the Data Agents page, or allow analysis on the connector.
MCP_WINDOW_SQL_REJECTEDA follow-up was not one read-only SELECT over the held result, or named a column the result does not have.Ask for one SELECT over that result, using its column names.
MCP_AGENT_VERSION_TOO_OLDThe Agent needs an update before it can shape, profile, hold or analyze results.Update the Agent from Data → Data Agents; plain queries keep working meanwhile.
Read-only violationThe SQL was not a SELECT.By design. Nothing writes through MCP.

Questions people ask

Can Claude change my MariaDB data?

No. The Agent accepts only SELECT statements and checks that before the SQL runs. Claude can queue a Semantic Intelligence run or draft an alert rule as a dry run; both write to Query Streams metadata, never to your MariaDB database.

Do I need to open a port or run a VPN?

No. The Agent makes one outbound connection on port 443 and both requests and rows travel over it. If outbound HTTPS works, MCP works.

Does the Free plan really cover this?

Yes. Free is a plan you keep, not a trial that expires. MCP is included on every plan; Free allows one key or one connected app and 30 calls a minute. See exactly what Free includes on the pricing page.

Which plans include the Analytic toolset?

Context management and Result analysis come with Personal Core and up; Deeper analysis with Business Core and up. The Free plan works as it always has, with standard results. Held results grow with the plan, up to eight hours and 4,096 MB on Enterprise.

Which AI tools work besides Claude?

Anything that speaks MCP over HTTP: ChatGPT, Cursor, VS Code with Copilot, Visual Studio, OpenAI Codex CLI, Gemini CLI, Windsurf, Zed, Cline, Continue.dev and JetBrains AI all have a ready-made recipe in the Portal’s Connect an AI client guide.

Does Claude see the whole organization?

A key reaches every connector your organization has. A connected app can be limited to specific connectors when you approve it. Each key or connection belongs to one organization; connect once per organization you need.

What is the difference between this and Nova?

Nova is the assistant inside the Query Streams Portal and shares the same Semantic Intelligence model. Use Nova when you want answers inside Query Streams; use MCP when you want your data inside Claude next to everything else you do there.

Does Claude know MariaDB’s SQL dialect?

Yes. Every schema answer tells Claude which connector type it is looking at, and Claude writes SQL for that engine. With Semantic Intelligence it also sees column descriptions and sample values, so it stops guessing what a status code or an abbreviation means.

Does my MariaDB database have to be on the same computer as Claude?

No. Only the Agent has to be where your MariaDB database is. Claude can be on your laptop, your phone or a server somewhere else; it only ever talks to Query Streams.

Still stuck? Open Support in Query Streams and tell us which step you are on and what you see. We will get you connected.

Every guide for MariaDB

Not quite your setup?

  • Running MySQL? Pick the MySQL card instead; the steps are the same → MySQL

Setup trouble?

  • Want the Agent to sign in with a login that can only read? Create a read-only database user, with copy-paste SQL for each database → Create a read-only database user
  • Test connection cannot reach the database server? Open the database's port in Windows Defender Firewall on the computer it runs on → Open a firewall port on Windows
  • Agent shows Offline, or Test connection and Browse are greyed out? Check that the Agent is online → Is the Agent online?
Updated on October 18, 2026

Powered by BetterDocs