View Categories

How to Connect MySQL to Claude / Cursor via MCP (MySQL MCP Server Setup)

28 min read

MCP SERVER MYSQL

Query MySQL with Claude or Cursor via MCP.

Connect MySQL — on-premise, AWS RDS, Azure Database for MySQL, or Google Cloud SQL — to Claude or Cursor with one MCP key. Schema Intelligence handles dialect quirks (case-insensitive collation, backtick-quoted reserved words, NOW() - INTERVAL n DAY, LIMIT n) so the AI writes valid MySQL on its first try.

No firewall holes One key, every connector Live data, no cache lag Bring your own AI tool

Query Streams is a secure, real-time data integration platform that brings every database and SaaS API in your account into Claude, Cursor, ChatGPT, and Grok — through a single MCP key with no firewall changes. This guide walks through wiring up the MySQL MCP connector specifically, so your AI tool can answer plain-English questions about orders, customers, product catalogs, and any other MySQL data — joins, aggregations, schema exploration, ad-hoc reporting — without you copy-pasting CSV exports out of MySQL Workbench, phpMyAdmin, DBeaver, or HeidiSQL. Learn more at QueryStreams.com and sign up for free to start asking your AI tool real MySQL questions.

What Query Streams MCP gives you for MySQL

Other “MySQL MCP” servers on the open-source landscape connect the AI tool directly to a MySQL connection string. That works, but it pushes a database password into your AI client’s config, scopes the AI tool to only that one MySQL endpoint, and gives you no audit trail of what the AI actually asked. The Query Streams MCP server for MySQL solves a wider problem: one key, every connector, full audit trail, and the AI tool never holds your MySQL credentials.

Zero inbound firewall holes

The Network Agent opens a single outbound encrypted cloud link to Query Streams. Your AI client connects to the cloud, never to your MySQL host. No port to open, no IP to allowlist, no VPN, no MySQL listener exposed to the public internet.

One key, every connector

The same MCP key reaches every database and SaaS API your account has connected. Add a Stripe or PostgreSQL connector tomorrow and the AI tool sees it next to your MySQL tables without re-keying.

Schema Intelligence baked in

The AI sees AI-curated descriptions, semantic types, enum value lists, and discovered foreign keys for every MySQL column — not just bare information_schema output. It writes accurate SQL on the first try, even on legacy MySQL schemas with cryptic column names.

Read-only enforced at the agent

Even a hallucinating LLM can’t issue DELETE, UPDATE, or TRUNCATE through Query Streams MCP. The Network Agent rejects anything that isn’t SELECT, WITH, or EXPLAIN before MySQL ever sees the SQL.

Per-key rate limits

Default 60 requests per minute and 10 execute calls per minute, configurable per key. A runaway AI tool-call loop hits a token bucket, not your MySQL connection pool or your hosting bill.

How it works without opening firewall ports

The Query Streams Network Agent installs once on a machine that can reach your MySQL server and dials one outbound TLS link to the cloud over the standard MySQL wire protocol — nothing inbound is ever exposed, and the AI tool never sees your MySQL connection string. how the outbound-only connection works →

AI Client

Cursor, Claude,
ChatGPT, Grok

QS MCP Server

Streamable HTTP
X-MCP-Key auth

Network Agent

On your network
Cloud link out

MySQL database

Connection string
held by the agent

No inbound port required — the agent dials out, never the other way around

The MCP key you give Cursor or Claude is scoped (read / analyze / execute), revocable at any time, and rate-limited per-key. The AI tool calls these MCP tools to do its work:

querystreams-mcp · tool catalog
qs_list_organizationsread
Returns the org bound to the calling key.
qs_list_agentsread
Lists Network Agents and online state.
qs_list_connectorsread
Lists data connectors (one entry per database server or API).
qs_get_connector_schemaread
Returns the MySQL databases, tables, and columns the AI can query, with Schema Intelligence enrichment when available.
qs_profile_tableanalyze
Sample values, distributions, enum detection, semantic types — on demand.
qs_list_saved_queriesread
Pre-built parameterized SQL templates the team trusts. The AI runs them without ever seeing the SQL.
qs_run_saved_queryexecute
Executes a saved query by pattern_key with optional parameter overrides.
qs_run_queryexecute
Executes a SELECT against a connector. Read-only validator runs at the agent, before MySQL sees the SQL.

Why Schema Intelligence makes Query Streams MCP different

Most “MCP for MySQL” servers in the open-source landscape hand your AI tool the same information_schema MySQL hands a stranger. Column names. Data types. Maybe a primary key. The LLM is left to guess what status_id = 3 means, what usr_eml stores, or whether order_items.order_id actually joins to orders.id (no foreign key was ever declared either way — common on legacy MyISAM-era schemas that pre-date InnoDB FK enforcement, and on MySQL 5.6 schemas where developers skipped FK declarations for “performance”). That’s why the first SQL most LLMs write against a bare schema is wrong — not because the LLM is bad, but because it doesn’t have the data it needs to be right.

Query Streams MCP returns that same schema enriched with Schema Intelligence (SI) — AI-curated metadata profiled from your actual MySQL data, so every schema tool returns the bare schema plus six layers of curated knowledge and the LLM stops guessing. why Schema Intelligence sets Query Streams MCP apart →

To make this concrete, here is what the AI client gets back from a single qs_get_table_schema call against a typical MySQL e-commerce database (customers, orders, order_items, products, payments, categories) — first without Schema Intelligence, then with it.

Without Schema Intelligence data_source: captured_schema
// what the LLM sees == TABLE: customers == – id int(11) [PK, NOT NULL] – email varchar(255) NOT NULL – name varchar(200) – created_at timestamp NOT NULL == TABLE: orders == – id int(11) [PK] – customer_id int(11) NOT NULL – total_amount decimal(10,2) NOT NULL – status varchar(20) NOT NULL – order_date timestamp NOT NULL == TABLE: order_items == – id int(11) [PK] – order_id int(11) NOT NULL – product_id int(11) NOT NULL – quantity int(11) NOT NULL – unit_price decimal(10,2) NOT NULL == TABLE: products == – id int(11) [PK] – name varchar(200) – category varchar(80) – sku varchar(64) == TABLE: payments == – id int(11) [PK] – order_id int(11) NOT NULL – method varchar(20) NOT NULL – amount decimal(10,2) NOT NULL == TABLE: categories == – id int(11) [PK] – name varchar(80) Foreign Keys: (none declared) si_recommendation: state: “not_run” what_youre_missing_for_this_call: – AI-discovered foreign keys – Per-column sample values + enum detection – Table and column descriptions – Semantic type classifications – Business domain tagging note: “types only, no semantic context”
With Schema Intelligence data_source: schema_intelligence
// what the LLM sees == TABLE: customers [DIM, domain:customers] == “One row per registered customer. email is unique per active customer.” – id int(11) [PK] identifier – email varchar(255) email Sample: [email protected], [email protected] – name varchar(200) person_name – created_at timestamp date_iso Sample: 2026-04-28 14:02:11 == TABLE: orders [FACT, domain:sales] == “Customer order header rows; one per checkout. total_amount is the grand total in USD.” – id int(11) [PK] identifier – customer_id int(11) identifier FK -> customers.id (100% overlap, conf 0.99) – total_amount decimal(10,2) currency_usd Range: 0.00 – 4,820.00 · mean 142.30 – status varchar(20) status_code (enum) paid (54%) | shipped (24%) | delivered (12%) | pending (5%) cancelled (3%) | refunded (2%) – order_date timestamp date_iso == TABLE: order_items [FACT, domain:sales] == “One row per product per order. Revenue = SUM(quantity * unit_price).” – order_id int(11) identifier FK -> orders.id (98% overlap, conf 0.95) – product_id int(11) identifier FK -> products.id (100% overlap, conf 0.99) – quantity int(11) counter – unit_price decimal(10,2) currency_usd == TABLE: products [DIM, domain:products] == – name varchar(200) text_content – category varchar(80) category_code (enum) FK -> categories.name (100% overlap, conf 0.99) – sku varchar(64) identifier Sample: [‘QS-001-MINT’,’QS-014-DARK’,’QS-027-AMBER’] == TABLE: payments [FACT, domain:finance] == – order_id int(11) identifier FK -> orders.id (100% overlap, conf 0.99) – method varchar(20) payment_method (enum) card (78%) | paypal (14%) | bank_transfer (6%) | cash (2%) – amount decimal(10,2) currency_usd

The six layers Schema Intelligence adds

Each layer addresses a class of question the LLM would otherwise guess at. The opt-in SI profiling pass runs against your MySQL data without changing your schema or writing to your database, and refreshes incrementally when your schema changes. what Schema Intelligence adds and how it stays current →

AI-curated descriptions

Plain-English purpose for every database, schema, table, and column — generated once, refreshed when your schema changes. Confidence-scored; user-authored descriptions always win.

orders: “Customer order headers;
one row per checkout.”

Table classifications

Each table tagged FACT (transactional events), DIM (descriptive reference), or LOOKUP (small code maps), plus a business domain — sales, hr, seo, finance, support, and 14 more.

orders [FACT, domain:sales]
customers [DIM, domain:customers]

Semantic types per column

Eighteen types — currency_usd, email, date_iso, status_code, percentage, ranking_position, identifier, url, person_name, and more. The AI generates dialect-correct MySQL SQL appropriate to each type.

total_amount: currency_usd
email: email · order_date: date_iso

Sample values from real data

Random rows surfaced to the LLM so it recognises patterns no schema can show — formatting conventions, encoded values, abbreviation styles, and the actual shape of your strings.

sku: [‘QS-001-MINT’, ‘QS-014-DARK’,
‘QS-027-AMBER’]

Enum detection with distributions

Low-cardinality columns (50 or fewer distinct values, at most 5% of rows unique) mapped to their full value list with row counts. The AI never guesses casing or spelling.

status: paid (54%) | shipped (24%)
| delivered (12%) | pending (5%) …

Implicit foreign-key discovery

Cross-table data overlap analysis finds joins that aren’t declared as DDL constraints. Stored alongside formal FKs with confidence scores, returned by qs_get_relationships.

order_items.order_id -> orders.id
(98% overlap, conf 0.95)

Same prompt, different SQL

The proof is in the SQL the AI tool actually writes. Same Cursor session, same Claude model, same prompt — “What were the top 5 products by revenue in the last 30 days?” Without Schema Intelligence the LLM has to guess. With it, the LLM knows.

Without Schema Intelligence
— LLM’s first attempt against bare schema: SELECT product_id, SUM(unit_price) AS revenue FROM order_items WHERE order_date >= ‘2024-01-01’ AND status = ‘Paid’ ORDER BY revenue DESC LIMIT 5 ERROR: order_date / status not on order_items order_date and status live on orders, not items no JOIN — order_items isn’t time-stamped SUM(unit_price) ignores quantity — wrong revenue hardcoded date — “last 30 days” is dynamic ‘Paid’ wrong case (real values are lowercase) returns product_id, not product name
With Schema Intelligence
— LLM’s first attempt with SI enabled: SELECT p.id, p.name, SUM(oi.quantity * oi.unit_price) AS revenue FROM orders o JOIN order_items oi ON oi.order_id = o.id JOIN products p ON p.id = oi.product_id WHERE o.order_date >= NOW() – INTERVAL 30 DAY AND o.status = ‘paid’ GROUP BY p.id, p.name ORDER BY revenue DESC LIMIT 5 5 rows. Correct first try. FACT/DIM tags guided the join structure FK discovery surfaced order_id -> orders.id order_date saw semantic type = date_iso enum lookup picked correct lowercase ‘paid’ MySQL-idiomatic NOW() – INTERVAL 30 DAY
Don’t want to run Schema Intelligence? MCP still works — schema tools return bare metadata (types, primary keys, formal foreign keys, indexes) and every degraded response carries an si_recommendation block telling the AI what it’s missing, including a one-call option to enable SI mid-conversation via qs_request_si_analysis. how Schema Intelligence runs and how long it takes →

Connect AWS RDS, Azure Database, or Google Cloud SQL MySQL to Claude

Most production MySQL today runs on a managed cloud service rather than a self-hosted box. Query Streams MCP works the same way against managed MySQL on every major cloud — the only difference is where you install the Network Agent and which authentication method you choose. Below are the three most common deployment scenarios with the recommended setup for each.

AWS RDS for MySQL / Aurora MySQL

EC2 / VPC peer

Install the Network Agent on a small EC2 instance in the same VPC and subnet group as your RDS instance for sub-millisecond network latency. db.t4g.micro is plenty for the connection-pool footprint of typical MCP traffic; scale up only if you have many simultaneous saved-query users.

  • Auth: IAM database authentication recommended; password auth supported as fallback.
  • Aurora MySQL: point the agent at the cluster reader endpoint — MCP is read-only at the agent, so the writer endpoint is never needed.
  • Multi-AZ failover: RDS handles it transparently; the agent reconnects automatically.
  • Outbound: the agent’s HTTPS egress to agent.querystreams.com works through any standard NAT gateway or VPC egress route — no custom firewall rules.

Azure Database for MySQL (Flexible Server)

VNet / private link

Install the Network Agent on an Azure VM in the same VNet as your Flexible Server (or use private endpoint / private link). FQDNs end in *.mysql.database.azure.com; Burstable B1ms is a fine starting tier for the agent host.

  • Auth: Azure AD / Microsoft Entra ID authentication recommended for production; SQL auth (username/password) supported.
  • SSL: Azure requires TLS by default — the agent enforces it automatically and pins the Microsoft RootCA bundle.
  • Single Server (legacy): still supported for now; Microsoft’s retirement timeline applies. Migrate to Flexible Server when convenient — the agent’s connection string changes but everything above the agent stays identical.
  • Outbound: standard Azure VNet egress works unchanged; no Azure Firewall rule additions needed.

Google Cloud SQL for MySQL

GCE / Cloud Run

Install the Network Agent on a GCE VM in the same project and region as your Cloud SQL instance, or run it on Cloud Run with Direct VPC egress. Public IP is allowed but private IP through the Cloud SQL private services connection is the recommended pattern.

  • Auth: IAM database authentication recommended; password auth supported.
  • Cloud SQL Auth Proxy: compatible — the agent connects through the proxy when configured. Most installations skip the proxy because the agent is already inside the VPC.
  • Generation: all Cloud SQL for MySQL generations are supported (the wire protocol is standard MySQL).
  • Outbound: Cloud Run + Direct VPC egress, or a GCE instance with default egress, both reach agent.querystreams.com without firewall changes.
The agent dialing OUT is identical across all three clouds. Whether your MySQL lives on AWS RDS, Azure Database for MySQL, or Google Cloud SQL, the cloud link from the Network Agent to Query Streams uses the same outbound HTTPS to agent.querystreams.com on port 443. There are no inbound firewall changes required on any cloud, no IP allowlisting, no VPN, no NAT punchthrough. Per Microsoft, AWS, and Google security guidance, prefer IAM / Azure AD database authentication over long-lived passwords whenever the engine supports it — the agent’s credential store handles all three.
Nova AI

MCP not for you? Try Nova AI instead.

Skip the JSON config entirely: Nova AI is built into the Query Streams web portal and asks the same plain-English questions against your MySQL connector — same agent, same read-only enforcement, same Schema Intelligence, no MCP plumbing.

Meet Nova AI

Prerequisites

Before you start, make sure you have:

  1. A free Query Streams account at my.querystreams.com.
  2. The Query Streams Network Agent installed on a machine that can reach your MySQL server — see Download the Query Streams Agent.
  3. A MySQL connector configured against the agent — see the existing connector setup guides for the connection string. The agent holds the MySQL user password (or IAM / Azure AD credentials for managed cloud MySQL); the AI tool never touches them.
  4. Any MCP-capable AI client. We’ll show Cursor, Claude Desktop, ChatGPT, and Grok in this guide; if you use Windsurf, Zed, Continue, Cline, VS Code Copilot, Codex, or Goose, the config block is essentially the same.
  5. Five minutes.
You only set up the agent once. The same agent that powers Query Streams’ Excel and Google Sheets add-ons, the web Query Builder, and Nova AI also serves MCP. Adding MCP to an existing Query Streams account is just generating a key — the agent and MySQL connector are already running.
1

Generate an MCP key

From the /mcp page in Query Streams, mint a key with the scopes you want.

2

Drop it into your AI client

One JSON snippet for Cursor, Claude, ChatGPT, or Grok. Same key everywhere.

3

Ask a question

“What were our top 10 customers by lifetime value?” — the AI calls the right tools, you get the answer.

Step 1: Generate an MCP key in Query Streams

Sign in to Query Streams and open the MCP page (or sign in first at my.querystreams.com and click MCP in the left navigation). Click Generate key, give the key a recognizable name (something like cursor-laptop or claude-desktop), and pick the scopes you want this key to have:

  • read — the AI can browse connectors and read schema. Required for everything else.
  • analyze — the AI can profile tables and discover relationships (sample values, distributions, semantic types). Optional but strongly recommended for MySQL work, where understanding the shape of your data matters when the LLM is generating joins across legacy schemas.
  • execute — the AI can actually run SQL. Without this, the AI is read-only against schema metadata only.

For a typical “let Claude analyse my MySQL data” workflow, all three scopes are appropriate. For a key you’re handing to a teammate or a less-trusted client, drop execute and let them browse only. You can revoke any key at any time from the same page; the AI client will see MCP_KEY_REVOKED on its next call and stop working immediately. There’s no propagation delay.

Copy the key now — Query Streams shows it once, then stores only a hash. If you lose it, generate a new one. The key looks like qsmcp_ followed by 48 random characters and is what your AI client sends in the X-MCP-Key request header.

Step 2: Add Query Streams MCP to your AI client

The configuration is the same shape across every MCP-capable client — an MCP server entry pointing at https://mcp.querystreams.com with your key in the X-MCP-Key header. Pick your client below.

Cursor
Cursor ~/.cursor/mcp.json
// Edit ~/.cursor/mcp.json
{
  "mcpServers": {
    "querystreams": {
      "url": "https://mcp.querystreams.com",
      "headers": {
        "X-MCP-Key": "qsmcp_PASTE_KEY_HERE"
      }
    }
  }
}
Claude Desktop
Claude Desktop claude_desktop_config.json
// Settings → Developer → Edit Config
{
  "mcpServers": {
    "querystreams": {
      "url": "https://mcp.querystreams.com",
      "headers": {
        "X-MCP-Key": "qsmcp_PASTE_KEY_HERE"
      }
    }
  }
}
ChatGPT
ChatGPT Apps & Connectors
// Settings → Apps & Connectors → Add MCP
Server URL  https://mcp.querystreams.com
Auth header X-MCP-Key
Header value qsmcp_PASTE_KEY_HERE

// Requires a paid ChatGPT plan
// (Plus / Pro / Team / Enterprise).
Grok
Grok Remote MCP Tools
// Grok → Settings → Tools
{
  "mcp_servers": [{
    "name": "querystreams",
    "url": "https://mcp.querystreams.com",
    "auth_header": "X-MCP-Key",
    "auth_value": "qsmcp_..."
  }]
}

Restart your AI client. On its next start it will discover the eight Query Streams MCP tools listed above and surface them in its tool palette. In Cursor and Claude Desktop you can verify by typing “list connectors” — the AI should call qs_list_connectors and return your MySQL connector along with anything else you have configured.

Step 3: Ask the AI a MySQL question

You don’t write SQL — the AI does. You ask a question, the AI picks the right MCP tool, the agent runs the query against your MySQL database, and the answer comes back as text plus tables. Three example prompts to try first:

“What’s our daily revenue trend over the last 30 days?”
Revenue
The AI calls qs_get_connector_schema to discover the orders, order_items, customers, and products tables, then qs_run_query with a SELECT that buckets by DATE(o.order_date), joins orders to order_items, and aggregates SUM(oi.quantity * oi.unit_price). It uses MySQL-idiomatic WHERE o.order_date >= NOW() - INTERVAL 30 DAY for the time bound and the SI-discovered enum value 'paid' to exclude pending and cancelled orders. You get a 30-row result with day, gross revenue, order count, and AOV — the AI typically flags weekend dips, week-over-week growth, and any anomalies it spots without you having to ask.
“Which products are running low on stock?”
Inventory
The AI inspects products for an inventory or stock column (Schema Intelligence surfaces it as a counter semantic type), correlates against the last 30 days of order_items.quantity demand, and projects days-of-cover. The result is a ranked table with product name, current stock, average daily demand, and projected days-until-stockout. The AI usually highlights the products that fall below a 14-day cover threshold as reorder candidates and groups them by category so the procurement team can batch their purchase orders.
“Show me the top customers who haven’t placed an order in 60+ days.”
Retention
The AI uses customers joined to orders with a MAX(o.order_date) aggregate per customer, filtered to HAVING MAX(o.order_date) < NOW() - INTERVAL 60 DAY, and ranked by historical lifetime value (SUM(o.total_amount) across the customer’s full history). The result is a focused list of high-value lapsed customers with email, last-order date, days-since-last-order, and lifetime spend — the AI typically suggests a winback campaign and flags any customers whose lapse coincides with a refund or support escalation. You can drill in with “why did acme-corp stop ordering?” and the AI will pull payments and order history.

The first time the AI calls a tool, your client may pop up a confirmation prompt asking you to approve the tool call — that’s MCP’s standard consent flow, not anything Query Streams adds. Approve once and the AI proceeds with the rest of the conversation freely. You can revisit the consent at any time in your client’s settings.

Honest billing notice: MCP usage is charged on uncompressed bytes

MCP’s Streamable HTTP transport can’t compress reliably end-to-end, so it bills uncompressedBytes where the Excel, Sheets, Query Builder, and Nova clients bill compressedBytes: a 3 MB MySQL aggregate query costs ~3 MB via MCP vs. ~400–600 KB on those transports, because MySQL data with repeated VARCHAR enum values (statuses, categories, payment methods) compresses ~5–7x via LZ4. Same data, different transport, different billable size. how data-realm billing works across transports →

Frequently asked questions

Do I need to open ports or run a VPN to use this? +
No inbound rules, port-forwarding, NAT punchthrough, or VPN. The Network Agent makes one outbound TLS connection (port 443) and your AI client reaches https://mcp.querystreams.com from the public internet — if outbound HTTPS works on the agent host, MCP works. See how the outbound-only connection works →
Which AI tools can I use with Query Streams MCP? +
Any client that speaks the open Model Context Protocol — Claude Desktop, Claude Code, Cursor, ChatGPT (paid), Grok, Gemini CLI, Windsurf, Zed, and 500+ more. Bring your own AI tool; you don’t have to switch. Full list of supported AI clients →
Can I revoke an MCP key? +
Yes — three independent kill-switches (per-key from the /mcp page, per-org via plan settings, and platform-level), none of which need a database password rotation or agent restart. More on MCP key security →
How is MCP usage billed against my data realm? +
MCP execute calls deduct from the same data-realm budget your Excel, Google Sheets, web Query Builder, and Nova AI usage already draws on — one consumption budget across every access method. The size measured for MCP differs. The other clients run over our compressed cloud link (we bill compressedBytes); MCP runs over Streamable HTTP, which doesn’t reliably support compression end-to-end through every client and proxy, so we bill uncompressedBytes. A 3 MB MySQL aggregate result returned to Excel typically costs ~400–600 KB of your data realm (LZ4 compresses repeated VARCHAR enum values 5–7x); the same 3 MB result returned to Cursor over MCP costs ~3 MB. We’re transparent about it because we’d rather you know up front than be surprised at the end of the billing cycle.
Does Query Streams MCP work with MySQL 5.7 / 8.0 / 8.1, Percona Server, or Aurora MySQL? +
Yes — the Network Agent uses the standard MySQL Connector/NET driver. MySQL 5.7+ (Community Edition + Enterprise Edition), MySQL 8.0 and 8.1, Percona Server for MySQL (a drop-in replacement with the XtraDB engine), MariaDB-as-MySQL drop-in (wire-protocol compatible at the connection layer), and AWS Aurora MySQL are all supported. For Aurora MySQL clusters, point the agent at the cluster reader endpoint — the agent only runs SELECT queries via MCP read-only enforcement, so the writer endpoint is never needed. Authentication options include mysql_native_password, caching_sha2_password (the MySQL 8 default), AWS IAM database authentication, Azure AD / Microsoft Entra ID on Azure Database for MySQL, and Google IAM database authentication on Cloud SQL for MySQL. SSL/TLS with custom CA certs is fully supported. For older MySQL 5.6 instances, contact support — there’s a fallback driver path for those. Tip: register each MySQL instance you operate as its own connector. Your “production-oltp-mysql” and “warehouse-replica-mysql” can be two separate connectors on the same key, and the LLM picks the right one based on the question (point lookups go to OLTP, big aggregations go to the read replica or warehouse). The MCP server doesn’t see the credentials; only the agent does.
How does this differ from running an open-source MySQL MCP server myself? +
A direct MySQL MCP server (community projects on GitHub do exist) is one MCP per data source. To get Claude reading from your MySQL + Google Search Console + your Stripe account + your Snowflake warehouse you’d need four MCP servers configured separately in every AI client, each with its own credentials, each with its own scope model, each with its own audit story. Query Streams MCP is one key reaching every connector your account has paired. You also pick up Schema Intelligence, agent-layer read-only enforcement, per-key rate limits, audit trail in event_logs, and the same data-realm billing pipeline you already use — none of which a direct MySQL MCP gives you.
What happens if the AI tries to write or delete data? +
It’s rejected at the agent before the data source sees the SQL. Every qs_run_query call is parsed by a hardcoded read-only validator that allows only SELECT, WITH, and EXPLAIN statements; anything else returns READONLY_VIOLATION and never reaches MySQL. The validator runs in the agent process on your network, not in the cloud, so a compromised cloud surface couldn’t bypass it. (You can layer a MySQL-side read-only user (e.g. GRANT SELECT ON db.* to a dedicated qs_readonly user) on top if you want belt-and-suspenders — the agent’s validator is independent of whatever MySQL grants you’ve configured.)
Can I see what the AI actually asked? +
Yes. Every MCP tool call writes a row to event_logs with the org, user, key, scope, latency, and result code. The org-admin can answer “who used MCP last week, which connector, and what did they ask?” with a single query. Note that we log the tool name and metadata, not the SQL text or returned rows — those flow through the cloud link and never land in cloud logs. If you want full SQL audit, enable database-side audit on the underlying engine; for MySQL specifically that’s the audit_log plugin (MySQL Enterprise Audit), the Percona Audit Log Plugin for community / Percona installations, or your existing general / slow-query log pipeline.
Do I have to run Schema Intelligence to use Query Streams MCP? +
No — Schema Intelligence is opt-in per (connector, database) pair, and MCP works fine without it. The AI gets bare schema (types, primary keys, formal foreign keys, indexes) and writes basic queries. With SI enabled, the AI gets six additional layers of curated metadata: (1) AI-curated descriptions on every database, table, and column; (2) table classifications (FACT for transactional events, DIM for descriptive reference, LOOKUP for small code maps) plus a business domain tag (sales, hr, seo, finance, support, and 14 more); (3) a semantic type on every column (currency_usd, email, date_iso, status_code, percentage, ranking_position, identifier, url, person_name, and 9 more) that drives dialect-correct MySQL SQL generation; (4) sample values from your real data so the LLM recognises patterns no schema can show; (5) enum detection with full value distributions for low-cardinality columns; and (6) AI-discovered foreign keys based on cross-table data overlap, surfaced through qs_get_relationships. Without SI, every schema-tool response also carries an si_recommendation block listing exactly what’s missing for the call — the AI can read this and offer to trigger SI mid-conversation via qs_request_si_analysis. Run time scales with table count: a small database under 100 tables completes in around 10 minutes; a typical mid-size database (a few hundred tables) finishes in 15–25 minutes; a large enterprise database with 1,500+ tables can take 45–60 minutes for a full scan. SI runs through your Network Agent against your data (never in the cloud), never writes to your database, never changes your schema, and refreshes incrementally when your schema changes — so subsequent runs after you add or alter tables are much faster than the first one. The end-to-end effect: with SI enabled, your AI client writes correct SQL on the first try far more often than it does against any “MCP for X” server that just hands the LLM information_schema.
What if I add another connector later, like Stripe or PostgreSQL? +
Nothing changes client-side — the same key reaches the new connector the moment the agent pairs it (qs_list_connectors picks it up automatically). One config block buys your whole account, present and future. Why one key covers every connector →
Do I have to set up MCP just to chat with my data? +
No — Nova AI is built into the Query Streams portal and works against every connector (MySQL included) with no MCP setup or config files. Use Nova to chat with your data inside Query Streams; use MCP when you want your own AI client (Claude, Cursor, ChatGPT, …) to reach the same data — same agent, same connectors, same Schema Intelligence underneath. Learn more about Nova AI →
Does Query Streams MCP work with AWS RDS for MySQL, Azure Database for MySQL, or Google Cloud SQL for MySQL? +
Yes — managed MySQL services on every major cloud are fully supported. AWS RDS for MySQL (single-instance and Multi-AZ deployments), AWS Aurora MySQL clusters (point at the cluster reader endpoint — the agent only runs SELECT), Azure Database for MySQL (both Single Server and Flexible Server), and Google Cloud SQL for MySQL (all generations) all work out of the box. Install the Network Agent in the same VPC, VNet, or GCP region as your DBaaS instance for low-latency queries. The agent uses standard MySQL credentials — IAM database authentication on RDS, Azure AD / Microsoft Entra ID on Azure Database for MySQL, IAM database authentication on Cloud SQL, or plain password authentication on any of them. The cloud link from the agent to Query Streams is identical regardless of which DBaaS hosts your engine; everything below the agent is your existing infrastructure, and Query Streams never sees the database credentials.

Get started

Connect your AI tool to your MySQL data in five minutes.

One MCP key reaches MySQL — on-premise, AWS RDS, Azure Database for MySQL, or Google Cloud SQL — every other database, and every API connector in your Query Streams account, with full audit trail, per-key rate limits, and zero firewall changes. Claude, Cursor, ChatGPT, and Grok all work out of the box.

Related guides: Download the Query Streams Agent | Database Connector Setup | All MCP Server guides | Nova AI text-to-SQL

Category: MCP Server

Tags: mcp, claude, cursor, mysql, database, open-source-database, aws-rds, azure-database, cloud-sql, aurora-mysql

Meta Description: Connect MySQL to Claude or Cursor via Query Streams MCP. RDS, Azure, Cloud SQL ready. Outbound-only, 5-min setup.

Updated on June 16, 2026

Powered by BetterDocs