MySQL MCP server data privacy: what leaves the database

Where data goes when an AI agent uses a MySQL MCP server: connection encryption, log handling, and where MySQL AI processing runs, based on the server repositories' own documentation.

On this page

Does the MySQL MCP server keep data inside the database? What a privacy reviewer needs to confirm

A privacy reviewer has to decide whether query results and schema details leave the database when an agent connects. The supplied documentation covers connection encryption, log masking and where processing runs, but it documents no retention periods and no data-processing terms for either server, so those answers must come from the vendor in writing. The answer also differs by server: the official Oracle server is documented for MySQL AI and MySQL HeatWave connections, while the community servers are third-party projects with their own documentation and no Oracle terms attached.

For the Oracle server, the oracle/mcp MySQL README says that on MySQL AI connections, processing takes place within the database service instance itself, not a distributed cluster. Confirm which deployment your organization would use, whether it is a HeatWave or MySQL AI service and in which region, and ask Oracle to state in writing where prompts, result sets and any embeddings are stored, how long they are kept, and whether any of that data is used to train or improve services. Ask whether processing for MySQL AI features can occur outside the database service instance in any configuration.

For community servers, check each server's own configuration before approving it. The designcomputer MySQL MCP server README says passwords and SSH private keys are masked in server logs, but it lists MYSQL_SSL_MODE options from DISABLED to VERIFY_IDENTITY with DISABLED as the sample value, so TLS must be set explicitly and verified. The benborla server's sample `.env` sets MYSQL_SSL to false and makes query logging a choice through ENABLE_LOGGING and MYSQL_LOG_LEVEL. Require verified TLS, decide on log level and log storage, and confirm that the MCP transport chosen (MCP_TRANSPORT as stdio or sse) keeps traffic local or on a network path you control.

Data privacy controls by server and option

This table compares the data privacy controls that the community designcomputer and benborla servers and the Oracle MySQL server document, row by row. Read the middle column for what the vendor or project says, the third for whether the control is on by default or set by you, and the last for gaps to confirm before approval.

ControlWhat is documentedBuilt in or configured
TLS mode (designcomputer, MYSQL_SSL_MODE)Options are DISABLED, REQUIRED, VERIFY_CA and VERIFY_IDENTITY; the README sample value is DISABLEDConfigured. Encryption must be set explicitly in the environment settings
Log masking (designcomputer)Passwords and SSH private keys are automatically masked in server logsBuilt in. Confirm that query text and returned rows are not logged in full
MCP transport (designcomputer, MCP_TRANSPORT)Offers stdio or sse transportsConfigured. stdio keeps traffic local to the client; sse exposes a network endpoint, so confirm its binding and access controls
In-database processing (oracle/mcp, MySQL AI connections)Processing takes place within the database service instance itself, not a distributed clusterBuilt in for MySQL AI connections. Confirm the data path for any non-AI connection and for model or embedding calls
Query logging switch and log level (benborla sample .env)ENABLE_LOGGING and MYSQL_LOG_LEVEL settings appear in the sample configurationConfigured. Logging is a choice; confirm what each level writes and where the log file is stored
SSL default in sample (benborla, MYSQL_SSL)The sample .env sets MYSQL_SSL to falseConfigured. Copying the sample leaves the connection unencrypted; set it to true and verify the certificate
Log retention and log destinationNot stated in the README or sample configuration reviewedTo confirm with the project maintainers or by testing log output in your own environment
Data sent to external model providersNot documented as a server feature in the sources reviewed; the client application decides what it sendsTo confirm with the MCP client vendor and your own network capture

Where a query's data travels between the agent, the MCP server and MySQL

Every query travels over three hops: the AI client sends a tool call to the MCP server, the MCP server opens a connection to MySQL, and the rows come back along the same path to the client. The first hop is the one most teams overlook. The transport setting decides whether it stays on one machine or crosses the network. The community designcomputer/mysql_mcp_server README offers MCP_TRANSPORT with two values, stdio and sse. With stdio, the client launches the server as a local process and the tool calls move between processes on the same computer. With sse, the server listens over HTTP, so the tool calls and their results can cross the network. Confirm which transport each deployment uses before approving it, and check who else can reach the port if sse is chosen.

The second hop, from the MCP server to MySQL, is where encryption is configured. The designcomputer README lists MYSQL_SSL_MODE values of DISABLED, REQUIRED, VERIFY_CA and VERIFY_IDENTITY, and its sample value is DISABLED. Treat that as a signal that encryption is not on by default and must be set explicitly. The community benborla sample .env sets MYSQL_SSL to false, which has the same effect. TLS protects only this database hop. It does not encrypt the traffic between the AI client and the MCP server, and it does not control what the model provider receives. Ask the team to record the chosen SSL mode for each server and to confirm that the MySQL side requires encrypted connections.

The third hop is the one the data privacy review must cover in full. Whatever the tool returns is included in the context the AI client sends to its model provider, so result rows, column values and schema details can leave the organization even when every database hop is encrypted. The oracle/mcp MySQL README says that on MySQL AI connections, processing takes place within the database service instance itself, not a distributed cluster, but that statement describes where MySQL processing runs and not what the client then sends onward. Decide in advance which tables and columns may be returned to a model, restrict results through database grants or read-only settings, and confirm with the client vendor how that provider handles prompts and output.

How data moves when an agent queries MySQL through an MCP server

The diagram starts with the AI agent client, which sends a tool call to the MCP server. The first decision is the transport: stdio runs the server as a local process, while sse exposes it over the network, so confirm which one your configuration uses. The second decision is the SSL mode on the MySQL connection. The community designcomputer README lists DISABLED, REQUIRED, VERIFY_CA and VERIFY_IDENTITY and shows DISABLED as its sample value, so encryption must be set on purpose. Returned rows pass back through the server to the model provider, and logging settings decide what the server writes to its logs.

Query path from agent client to MySQL and model provider.

Decisions to make before connecting an agent to production data

Each decision below shapes what leaves the database when an agent queries it through a MySQL MCP server. Transport and TLS decide who can reach the server and whether traffic is encrypted, while logging and log storage decide what is written down about each query. The last two decisions, MySQL AI processing scope and result set limits, decide where processing happens and what data the agent actually receives.

Choose the transport

The community designcomputer server offers MCP_TRANSPORT set to stdio or sse. With stdio, the server runs as a local process started by the client, so it is reachable only from that machine. With sse, the server listens on a network interface, which means anyone who can reach that port may be able to connect. Confirm which transport your team uses, and whether the listening address is restricted to a trusted network.

Set the TLS mode explicitly

The designcomputer README lists DISABLED, REQUIRED, VERIFY_CA and VERIFY_IDENTITY as MYSQL_SSL_MODE values, and its sample shows DISABLED. Treat that sample as a starting point, not a standard. Set the mode in configuration, and choose VERIFY_CA or VERIFY_IDENTITY when you need the client to confirm the server certificate. Ask the database team to confirm the same mode is enforced on the MySQL side.

Decide query and error logging

Query logging is a configuration choice, not a default you can assume. The community benborla sample .env sets MYSQL_SSL to false and includes ENABLE_LOGGING and MYSQL_LOG_LEVEL settings. Decide whether statements, parameters and error messages are logged, and at what level. Verbose logs can hold customer records passed as query parameters, so set the level to the least detail your audit needs.

Control where logs live and who reads them

Log files are a second copy of what the agent asked for and what came back. The designcomputer README says passwords and SSH private keys are masked in server logs, but it does not promise that row data is masked. Name the log path, set file permissions so only the operations team reads it, and set a retention period that your own policy requires. Confirm that log shipping to a central system does not copy data into an unapproved region.

Confirm whether MySQL AI processing is in scope

The oracle/mcp MySQL README says that on MySQL AI connections, processing takes place within the database service instance itself, not a distributed cluster. That statement applies only if you use MySQL AI or HeatWave connections. A plain MySQL connection does not gain that property. Decide whether your data may be processed inside a managed service instance, and confirm the instance's region and access controls with Oracle before you connect production data.

Oracle MySQL server README

Limit the result sets the agent receives

Whatever a query returns goes to the AI client, and from there to the model provider the client uses. Decide which schemas, tables and columns the database account can read, and which columns such as contact details, payment data or health records must never be returned. Use a read-only database account for the agent. Ask whether your AI client sends tool results to an external model, and document that answer for your reviewers.

How the answer changes by server and deployment

The Oracle server lives in the oracle/mcp repository and its README is the recommended starting point for MySQL HeatWave or MySQL AI. Its README states that, on MySQL AI connections, processing takes place within the database service instance itself rather than a distributed cluster. That is the most specific processing-location statement in the sources reviewed for this page, but it covers MySQL AI connections only. For a plain self-managed MySQL connection, confirm the processing location and transport settings with Oracle and in the README rather than assuming the same behavior.

  • Processing location: On MySQL AI connections, the README says processing stays within the database service instance.
  • Encryption: Confirm how the connection to the database is encrypted and whether it can be required, using the README's connection settings.
  • Logs: Check what the server writes to logs, including whether query text or parameters appear, and where those logs are stored.
  • Scope: Verify whether your deployment is a MySQL AI or HeatWave connection, since the processing statement may not apply to other connections.

Before approval, ask Oracle or check the README for the current wording on transport security, log contents and retention, and record the answers against your deployment.

What the repositories do not document for data privacy

The server repositories document some controls for data in transit and logs, but they are silent on several questions a privacy or compliance reviewer will ask. Each card names a gap, why it matters for what leaves the database, and the usual way to close it before an agent reaches production data.

Log and query text retention

The documentation covers which values are masked in logs, but it does not state how long logs or query text are kept, where they are written, or who can read them. Query text can carry customer identifiers in WHERE clauses even when passwords are masked. Ask the vendor or community maintainer for the retention and storage location in writing, then run a test session in a non-production database and review exactly what lands in the log files and any log sink.

Community server README

Masking scope for personal data

A masking rule that hides passwords and SSH private keys does not show whether it also covers personal data that appears inside SQL statements or returned rows. A query such as a lookup by email address would be written to the log as typed unless the server says otherwise. Confirm the masking rules in the code and in a test run, and decide whether logging of query text should be turned off or limited for tables that hold personal data.

Default encryption in sample configuration

The community benborla sample configuration sets encryption to false, and the designcomputer sample uses DISABLED for MYSQL_SSL_MODE. Neither sample proves that a production deployment is encrypted. Set the SSL mode explicitly, use REQUIRED or a verifying mode where the database supports it, and confirm with a network capture or a database status query that sessions from the agent host are encrypted before any real data flows.

Data residency of AI processing

The Oracle README says processing on MySQL AI connections takes place within the database service instance itself. It does not state the region, the data residency options, or where the connected client sends the rows it receives. Ask Oracle to confirm in writing which region hosts the instance, whether any processing leaves that region, and whether returned results are sent to a model provider chosen by the client.

Provider handling of returned results

Once a query returns rows to an AI client, the rows go to whichever model provider that client uses. The server repositories do not describe the retention or training terms of those providers. Treat every result set as data leaving the organization, check the client's own data policy and retention settings, and limit which columns and tables the agent account can read so that sensitive rows never reach the client.

Database-level audit as the backstop

Application logs depend on the server writing them correctly and on nobody changing the settings. The repositories do not describe a database-side audit trail that records which account ran which statement. Use the database's own audit or general query logging, scoped to the agent's account, together with network controls that allow only the agent host to reach the database port. Compare the two records during the test review.

Verifying data handling before a production connection

This sequence turns the data handling questions into checks you can run and record, so the reviewer sees what the server sends, how the connection is protected, and what the agent can actually retrieve before any production database is reachable.

  1. Confirm the server and its repository

    Confirm which server you are evaluating and where its code comes from. Oracle's MySQL MCP server is published in the oracle/mcp repository, and its README describes it as the recommended server for MySQL HeatWave and MySQL AI. The designcomputer and benborla servers are community projects and are not Oracle or MySQL products. Record the repository, the version or commit you tested, and whether it is vendor-built or community-built. Done when the reviewer can see exactly which code will run against the database.

  2. Set the transport and encryption explicitly

    Choose the transport deliberately. The designcomputer server offers stdio and sse transports, so a local stdio process and a network-exposed SSE endpoint carry different exposure. Then set the TLS mode explicitly rather than relying on defaults. The designcomputer README lists DISABLED, REQUIRED, VERIFY_CA and VERIFY_IDENTITY, and its sample value is DISABLED. The benborla sample sets SSL to false. Confirm in your own configuration that the mode you chose is the one in effect, and record the chosen values for the reviewer.

  3. Decide logging and check masking in a test run

    Decide whether query logging is on, and at what level, before any production use. The benborla sample exposes logging settings as configuration choices. The designcomputer README states that passwords and SSH private keys are masked in server logs. Run a test session with a dummy credential and a sample query, then inspect the resulting log files to confirm the credential does not appear in plain text and to see what query content is written. Record where logs are stored, who can read them, and how long they are kept under your own retention policy.

  4. Confirm where MySQL AI processing runs

    If the connection uses MySQL AI or MySQL HeatWave features, confirm the processing location with Oracle before relying on it. The oracle/mcp MySQL README says that on MySQL AI connections, processing takes place within the database service instance itself, not a distributed cluster. Ask Oracle for the documentation that covers your deployment, the region, and any data that leaves the service instance for model calls or logs. Record the answer with the document reference. Community servers do not carry the same statement, so treat their processing location as unknown until the vendor documents it.

  5. Restrict returned data through account grants

    Limit what the agent can retrieve by creating a dedicated database account for the MCP server with only the schemas, tables and privileges the use case needs. Server-side settings do not replace database grants, so the account's privileges set the ceiling on any data returned to the model. Test with the account by asking for a table it should not see and confirm the access is refused. Record the grant statements or a privilege export and the test results.

  6. Record evidence for the reviewer

    Assemble one evidence file that a security or compliance reviewer can audit without repeating your tests. Include the repository and version, the transport and TLS settings in effect, the logging configuration, a sample log showing masked credentials, the Oracle statement on processing location if applicable, the account grant export, and the denied-access test result. Note which items are vendor-documented and which were verified by your own test. Done when each claim in the evidence file points to a document or a test result you can show.

Evidence a privacy reviewer asks for

This table lists the evidence a privacy or security reviewer should collect before a MySQL MCP server touches production data, and where each item comes from in the server. Use it as a checklist: a item marked as a repository setting shows intent, while a live test of the database connection or log output shows what actually happens. The main takeaway is that the community servers document encryption and log controls as settings you must turn on, so the evidence has to come from your own configuration and tests.

Evidence itemWhat it showsWhere it comes from
TLS configurationWhether the client-to-database connection is encrypted and how strictly the server certificate is checkeddesigncomputer README: MYSQL_SSL_MODE values DISABLED, REQUIRED, VERIFY_CA, VERIFY_IDENTITY; the sample shows DISABLED, so confirm the value in your deployment
Database TLS statusWhether the live session to MySQL actually uses TLS, independent of the configured settingYour own check on the database side, such as session status for the connection, run after the agent connects
Transport and exposureWhether the server listens only locally (stdio) or on the network (sse), which decides who can reach itdesigncomputer README: MCP_TRANSPORT set to stdio or sse; confirm the chosen value in the launch configuration
Log masking testWhether passwords and private keys stay out of log output during a real sessiondesigncomputer README states passwords and SSH private keys are masked in server logs; run a test connection with a known dummy password and search the log for it
Query logging settingWhether queries and results are written to logs at all, and at what levelbenborla sample .env: ENABLE_LOGGING and MYSQL_LOG_LEVEL; the example file is a starting point, not a policy
Log retention settingsHow long log files persist and who can read or delete themNot stated in the reviewed server documentation; ask the vendor or inspect the host's log rotation and retention configuration
Processing location statementWhere AI processing for MySQL AI runs and whether it leaves the database serviceoracle/mcp MySQL README: on MySQL AI connections, processing takes place within the database service instance, not a distributed cluster
Data flow diagramWhich hops carry the query, the result and the credentials between the AI client, the MCP server and MySQLBuild this yourself from the deployment; mark each hop, its encryption and its logging, and check it against the README statements
Community server processingWhether a community server sends query text or results to any external serviceNot documented in the reviewed repositories; confirm with the maintainer or by traffic inspection in a test environment

Questions buyers ask about MySQL MCP data privacy

Does a MySQL MCP server encrypt traffic to the database?

It depends on the server and on settings you choose. The community designcomputer/mysql_mcp_server project exposes a MYSQL_SSL_MODE setting with the options DISABLED, REQUIRED, VERIFY_CA and VERIFY_IDENTITY, and its sample value is DISABLED, so encryption is not on by default and must be set explicitly. Confirm the value in the deployed configuration, not the sample file. Ask your DBA which modes the database's certificates support, because VERIFY_CA and VERIFY_IDENTITY also require a trusted certificate chain and correct host names. For the community benborla server, the sample .env sets MYSQL_SSL to false, so the same check applies. Also confirm the network path between the agent host and MySQL, since encryption on the database link does not cover the link between the AI client and the MCP server.

Are database passwords written to MCP server logs?

The community designcomputer/mysql_mcp_server README says passwords and SSH private keys are automatically masked in server logs. That is a documented behavior of that project, and it does not tell you what the AI client, the host operating system or a wrapper script records. Verify it in your own environment by running a test connection with a known dummy password, then searching the log files, container logs and any tracing output for that string. Do the same check for any other MCP server your team adopts, because the masking claim belongs to one project only.

Is query logging turned on by default in MySQL MCP servers?

Query logging is a configuration choice, not a fixed default you can rely on. The community benborla/mcp-server-mysql sample .env includes ENABLE_LOGGING and MYSQL_LOG_LEVEL settings, which means whether queries are logged, and at what detail, depends on those values in your deployment. Check the exact keys in the configuration file you run, then decide where logs go, who can read them and how long they are kept. Query text can contain personal or regulated data taken from result sets, so a log that is useful for debugging can also become a privacy exposure. Set a retention period with your security team before enabling verbose logging in production.

Where does processing run when an AI agent uses MySQL AI through the official server?

According to the oracle/mcp MySQL MCP server README, on MySQL AI connections processing takes place within the database service instance itself, not in a distributed cluster. That statement covers where MySQL AI processing runs for that connection type. It does not describe where the AI client, its model provider or any other tool in the chain sends prompts and results, so review those flows separately. Ask Oracle to confirm the processing location for your MySQL HeatWave or MySQL AI region and service tier, and record the answer in your data flow diagram before approval.

Does the official Oracle MySQL MCP server store data outside the database?

The supplied documentation does not establish that the server stores data outside the database, and it does not establish that it avoids storing it. Treat this as an open question for the vendor. Ask Oracle to document what the server writes to disk, including logs, caches, temporary files, conversation or tool-call records, and whether any of that content includes query results. Then test it: run representative queries that return sample personal data, and inspect the host, container and log locations afterwards. Make the findings part of the written approval so the rollout does not rely on an assumption.

What does a MySQL MCP data privacy review cost, and who does the work?

No supplied fact gives a price or duration for this review, so the figure depends on scope that you and the provider agree in writing. The main cost drivers are the number of MCP servers in scope, how many database environments and schemas they reach, how much logging and network path review is needed, and whether your team already has documented data flows. Your internal costs come from DBA, security and compliance time. An external provider's fee comes from the written scope. DeployOpen plans and runs security testing, including AI and agent security reviews, and most engagements are fixed-scope with scope, deliverables and timelines agreed in writing before work begins. DeployOpen does not publish a price list, so request a quote based on your written scope.

Can our own team run a MySQL MCP data privacy review without outside help?

Yes, if your team has the skills to check configuration, network paths and log handling. The work is mostly verification: confirm the encryption mode actually applied, run dummy-credential tests to check masking, review logging keys and their retention, and document where processing and storage occur. A DBA can handle the database side, while security should own the log and network checks. Outside help is most useful when you need an independent test with a written findings report and a retest, which DeployOpen offers as part of its AI agent rollout security review. Whichever route you choose, keep the evidence so a compliance assessor or auditor can review it later.

Primary sources to check each data privacy claim against

Start with the repository README that matches the server you plan to deploy, because the data privacy answers differ by server. For the Oracle server, read the oracle/mcp MySQL MCP server README and check the passage on MySQL AI connections, which says processing takes place within the database service instance itself rather than a distributed cluster. Confirm that statement against the deployment you actually buy, including whether your data stays in the same region and whether the MySQL AI features you enable send anything outside the service instance. Then read Oracle's Oracle MCP Servers overview to confirm which Oracle product page covers your setup, since that overview lists SQLcl, OCI Database Tools and ORDS as Oracle AI Database options rather than the MySQL server.

For community servers, read the code and configuration, not only the marketing text. The designcomputer/mysql_mcp_server repository documents the MYSQL_SSL_MODE options (DISABLED, REQUIRED, VERIFY_CA and VERIFY_IDENTITY) and shows DISABLED in its sample, so verify the value your deployment actually runs with and check the MCP_TRANSPORT setting, since stdio and sse produce different exposure. Its README says passwords and SSH private keys are masked in server logs; test that claim by triggering an error and reviewing the output. The benborla/mcp-server-mysql .env file sets MYSQL_SSL to false in its example and includes ENABLE_LOGGING and MYSQL_LOG_LEVEL, so confirm both the TLS and the logging settings in your own environment file before any query leaves the host.

Keep a record of what each source does and does not say. Where a README is silent on log retention, on where a model provider receives query results, or on how long an MCP client keeps conversation history, mark that item as unconfirmed and ask the vendor or project maintainers in writing. Re-check the repositories on the day of approval and again before each upgrade, because community projects change their defaults between releases. A reviewer who can point from each privacy claim to a specific file, setting or README passage will make a faster and more defensible decision than one who relies on summaries.

How DeployOpen works on this

DeployOpen approaches MySQL MCP server data privacy as a question of what leaves the database, and in which direction. We scope the written questions first, then test the connection path, logging and processing location in your own environment, and hand over documented evidence your security and compliance reviewers can check.

How we scope

  • Written scope names which MySQL MCP server, official or community, is in play and which client connects to it.
  • Scope lists the data paths to examine: client to server connection, server logs, and any MySQL AI processing.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we build

  • We stand up a test instance of the chosen server in your own infrastructure with the exact transport and TLS settings under review.
  • We check whether the connection uses encryption as configured, and whether the server settings match what your policy requires.
  • We test whether passwords, keys and query text appear in logs, and confirm the logging settings your team will actually run.

How we hand over

  • A findings report maps each data flow to the configuration that controls it, with the evidence we collected.
  • Documentation records where processing happens for each server option, and what your team must confirm with the vendor.
  • We deliver fixes with a retest, so your security and compliance reviewers receive evidence from the final configuration.

How we support

  • Ongoing support is available as a retainer for upgrades to the MySQL MCP server and changes to logging or transport settings.
  • Continuous testing can re-check data handling after the server, client or database configuration changes.
  • DeployOpen prepares evidence for compliance assessments, but independent auditors and certification bodies issue any audit report.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.