MySQL MCP server official setup: OAuth, tokens and enterprise controls

Whether the official Oracle MySQL MCP server and community servers support OAuth, tokens and centrally managed access, what the documentation states, and what must be confirmed before approval.

On this page

Does the MySQL MCP server support OAuth and centrally managed access?

A platform or security lead approving an AI agent for MySQL needs to know that the documented OAuth and IAM model belongs to Oracle's OCI MCP servers over HTTP, not to the MySQL server. The facts available for the MySQL server do not describe a central SSO or admin policy layer, and the community servers rely on a shared secret for remote use or on read-only configuration. Treat the MySQL server as needing a database-level access design rather than an identity-provider rollout until Oracle confirms otherwise.

For the OCI servers, Oracle's oracle/mcp repository says HTTP requests run as the authenticated OCI IAM user, that the setup uses an OCI IAM confidential application, and that scopes default to openid, profile, email and an invoke scope for the server when IDCS_REQUIRED_SCOPES is unset. Confirm with Oracle whether the MySQL server accepts any of these settings, whether it has an HTTP transport with per-user authentication, and whether it can be governed by an administrator who can disable or restrict clients centrally. Ask who can revoke a credential or stop a session, and how quickly.

To approve the tool, ask Oracle in writing for the supported transports, the authentication method for each, how credentials are stored and rotated, whether audit events identify the individual user or only a shared identity, and which settings control tool exposure. Map the answers to the MySQL grants the agent would use, and require a dedicated least-privilege database account. If the answers do not show per-user attribution and central revocation, record that gap as a risk and restrict the agent to a read-only account on a non-production copy.

Authentication and admin controls by server and transport

This table compares how each MySQL MCP server option authenticates, whether SSO or central admin controls are documented, and whether read-only or write behavior is stated, by server and transport. Read each row as what the cited documentation says, and treat any entry marked not documented as a question to put to Oracle or the maintainer before approval. The main takeaway: the OAuth-style identity path Oracle documents applies to its OCI HTTP servers, so the sign-in path for the MySQL server itself needs confirmation.

Server and transportAuthenticationSSO or central admin documentedRead-only or write behavior
Oracle MySQL MCP server, stdio (documented)Not documented for the MySQL server in the supplied sources. OCI stdio servers run with the permissions of the configured OCI CLI profile.Not documented. Oracle advises least-privilege IAM and secure credential management for its OCI servers.Not documented for the MySQL server. Confirm in the README before enabling writes.
Oracle OCI MCP servers, HTTP (documented for OCI servers)OCI IAM confidential application configured through IDCS_DOMAIN, IDCS_CLIENT_ID and IDCS_CLIENT_SECRET.OCI IAM is the identity source. Default scopes are openid, profile, email and an oci_mcp invoke scope.Not documented in the supplied sources. HTTP requests run as the authenticated OCI IAM user.
Oracle MySQL MCP server, HTTP (not documented)HTTP transport for the MySQL server is not documented in the supplied sources. Confirm in the README.Not documented. Ask whether IAM-issued identity is accepted over HTTP.Not documented.
designcomputer/mysql_mcp_server (community)Not documented in the supplied sources. Confirm how the server holds and uses database credentials.Not documented. No central admin or SSO control appears in the supplied sources.Not documented in the supplied sources. The project describes itself as secure interaction with MySQL databases.
benborla/mcp-server-mysql, remote mode (community)Shared secret set through REMOTE_SECRET_KEY with IS_REMOTE_MCP and PORT. The sample configuration indicates a shared secret, not OAuth.Not documented. The sample configuration shows no per-user identity or central admin control.Repository description says read-only access for schema inspection and read-only queries.

How the OCI IAM and shared-secret models differ

The first design question is who the server acts as once it is running. In the oracle/mcp repository, the OCI MCP servers over stdio run every action with the permissions of the configured OCI CLI profile. The server inherits whatever identity that profile holds, so the effective rights are set by the IAM policies behind the profile, not by the MCP server itself. Reviewers should ask who owns each profile, whether it is shared across developers, and whether its policies follow least privilege, which the repository itself advises. A stdio server on a developer laptop therefore carries that laptop user's cloud rights into every agent session.

The HTTP model moves identity to the server boundary. Per the oracle/mcp repository, an OCI IAM confidential application is configured through IDCS_DOMAIN, IDCS_CLIENT_ID, IDCS_CLIENT_SECRET and related settings, and HTTP requests run as the authenticated OCI IAM user. When IDCS_REQUIRED_SCOPES is unset, the default is openid, profile and email plus an oci_mcp invoke scope for the server. The design implication is that each caller is individually identified and scoped, so access reviews and audit attribution can follow a named user. Note that these facts are documented for the OCI MCP servers. Before relying on them for the MySQL server, confirm in its MySQL MCP server README which auth path applies to MySQL AI and HeatWave connections, since that README is the authority for the MySQL server.

The community benborla server takes a different route. Its sample .env includes IS_REMOTE_MCP, PORT and REMOTE_SECRET_KEY for remote use, which points to a shared secret rather than OAuth or per-user identity. Any client holding that secret is treated the same, so the server cannot tell one employee from another, and revoking one person's access means rotating the secret for everyone. Reviewers should weigh that against the design of the Oracle path: a shared secret is simpler to stand up but gives weaker attribution and a larger blast radius if leaked. Whatever model is chosen, the secret or client credential should live in a managed secret store and be rotated on a schedule the organization sets.

Decisions to make before choosing an MCP transport and identity model

Before a MySQL MCP server reaches staff, the team has to settle who the agent acts as, how it connects, where database permissions live, and how secrets and logs are handled. These choices decide how well a reviewer can trace an action back to a person and how far a single compromised credential can reach.

Named user or service identity

Decide whether the agent connects as an individual engineer's identity or as a shared service account. A named identity lets the MySQL audit trail and any HeatWave or OCI logs attribute a query to a person. A shared service account means every agent action looks the same, so the blast radius is the full grant set of that account. The oracle/mcp documentation says HTTP requests run as the authenticated OCI IAM user, which is the attribution path to confirm for your setup.

MySQL MCP README

Stdio versus HTTP transport

A stdio server runs as a local process under the user's own operating system account and database credentials, so each developer's machine holds the secret. An HTTP server runs centrally and moves authentication to the server side. The oracle/mcp repository says its OCI servers over HTTP use an OCI IAM confidential application, while stdio actions take the permissions of the local profile. Check which transport the chosen server supports and where the credential then sits.

Ownership of database grants

Decide who writes and approves the MySQL grants the agent uses, and keep that decision outside the MCP configuration. Grants on a dedicated, least-privilege user limit what any tool can read or change, regardless of which client calls it. Confirm which team owns that account, how changes are reviewed, and whether the community server's own read-only or query controls are enforced in addition to database grants, since a server-side flag does not replace a restricted MySQL user.

Secret storage and rotation

Record where each credential lives: the database password, the OCI IAM client secret for HTTP setups, or the REMOTE_SECRET_KEY shared secret in a community sample. Keep them out of shared configuration files and source control, and set a rotation owner and schedule. A shared secret, unlike OAuth tokens, has no per-user expiry or revocation by default, so a leaked value stays valid until someone rotates it. Ask the server maintainer how rotation is supposed to work.

Where logs are collected

Decide which systems capture agent activity: MySQL's own audit or general logs, the MCP server's logs, the OCI or identity provider sign-in records, and the AI client's history. Attribution only holds if the identity used by the agent appears in these logs. Confirm with the vendor and your database team what each source records, how long it is retained, and whether it reaches your central log store, since the supplied documentation does not describe these settings in detail.

How the answer changes by identity provider, deployment and data sensitivity

When MySQL runs in Oracle Cloud Infrastructure (OCI) and the MySQL MCP server runs in the same environment, the documentation points to OCI Identity and Access Management (IAM) as the identity layer. The oracle/mcp repository describes two transports for its OCI MCP servers. Over stdio, every action runs with the permissions of the configured OCI CLI profile, so the profile's IAM policies are the real limit. Over HTTP, the repository directs you to an OCI IAM confidential application configured through IDCS_DOMAIN, IDCS_CLIENT_ID and IDCS_CLIENT_SECRET, and requests run as the authenticated OCI IAM user.

  • Stdio profile scope: Confirm which OCI CLI profile the server uses and that its IAM policies grant only the database actions the team needs.
  • HTTP identity: Confirm that each request is attributed to a named OCI IAM user, not a shared account.
  • Default scopes: When IDCS_REQUIRED_SCOPES is unset, the documented defaults are openid, profile, email and an oci_mcp invoke scope. Ask Oracle whether the MySQL server applies the same defaults.
  • Secret storage: Ask where the client secret is held and who can read it.
  • Read versus write: The documentation does not list which MySQL statements an IAM policy blocks. Ask Oracle to confirm this in writing.

Before approval, confirm each of these points against the current MySQL server README and in writing with Oracle.

Order of work before production approval

This sequence confirms which MySQL MCP server is in use, proves its authentication path and database privileges in a test environment, and sets up the controls a reviewer needs before production approval. Each step ends with a written check that can be filed as evidence.

  1. Confirm the server and its repository

    The platform owner confirms which project will run, and records the repository, the version or commit, and the publisher. Oracle's MySQL MCP server lives in the oracle/mcp repository and is described as the recommended server for MySQL HeatWave and MySQL AI. Community projects such as designcomputer/mysql_mcp_server and benborla/mcp-server-mysql are not Oracle products and must be approved as community software. Done when the approval record names the publisher, the exact version, and the owner who accepted the risk.

  2. Confirm the transport and authentication path

    The engineer reads the README for the chosen server and writes down the transport it supports, whether it runs locally over stdio or as an HTTP endpoint, and how each path authenticates. Confirm whether the server needs an OCI configuration file and whether it supports connections without one, since that affects on-premises use. Do not assume OAuth or OCI IAM applies to the MySQL server: the OCI IAM settings in the oracle/mcp repository are documented for its OCI servers, so confirm the MySQL path separately. Done when the team can state, from the README, which credential the server uses and who it is tied to.

  3. Create and test a least-privilege MySQL account

    A database administrator creates a dedicated MySQL account for the agent, grants only the schema objects and privileges the use case needs, and avoids administrative and write privileges unless they are required. The administrator then connects with that account and tests what it can read, what it can change, and what it is refused. Run the same tests with the account from the MCP client to confirm the server does not widen the grant. Done when the test results are saved and show the denied statements the reviewer expects.

  4. Decide where the HTTP endpoint sits

    If the server runs over HTTP, the network team decides which hosts can reach it, places it behind the internal network boundary, and confirms that TLS terminates in an approved location. The security team then confirms how each request is authenticated. Where the README does not document per-user authentication for the endpoint, record that as an open item and do not expose the endpoint to general staff until a controlled method is in place. Done when a network diagram and an authentication note are attached to the approval record.

  5. Define secret storage and rotation

    The platform team stores the database password and any shared secret in the organization's approved secret manager, not in shared configuration files or chat tools. Where a sample configuration uses a shared secret, such as the REMOTE_SECRET_KEY style setting in a community sample, the team confirms who holds it and how it is replaced. Define who can rotate credentials, how often the review board expects that to happen, and how a leaked credential is revoked. Done when a rotation procedure exists and a test rotation has been completed in a non-production environment.

  6. Set log collection and review

    The operations team decides which logs leave the host: MySQL general and audit logs where enabled, server process output, and any access records the MCP server writes. Confirm what each log records, whether it includes query text or result data, and where it is retained. Confirm that the logs can attribute a query to the agent's database account, so that reviewers can answer who ran what. Done when a sample query has been traced end to end in the log store.

  7. Retest after any version change

    Before any upgrade of the server, the MySQL version, or the MCP client, the team repeats the privilege tests, the authentication checks, and the log trace in a staging environment. Compare the README and release notes against the approval record, and reopen the approval if the transport, authentication, or tool list has changed. Done when the retest report is signed by the platform owner and the security reviewer, and production is updated only after both sign off.

Request path from an AI client to MySQL with an identity check

The diagram starts at the AI client, which calls the MySQL MCP server over a transport. The Oracle server's HTTP path goes through an OCI IAM confidential application, where the request runs as the authenticated user. The community option uses a configured shared secret instead, which is not OAuth. Both end at the MySQL account, and the grants on that account decide what the agent can read or change. Central policy and audit sit outside the documented server unless you add them.

Two identity paths reach one MySQL account, whose grants set the limits.

Evidence a security reviewer should request

This table lists the evidence to request for each control, what to ask the vendor or project for, and where the supplied documentation stops. Read the source column first: most rows depend on the Oracle MySQL README or on a community project, and several controls are not documented in the sources at all.

ControlWhat to ask forWhere it comes from
Authentication method per transportWritten statement of how the Oracle MySQL server authenticates over stdio and over any HTTP mode, and which mode applies to MySQL AI or HeatWave connectionsOracle oracle/mcp MySQL README; the OCI HTTP IAM model is documented for OCI servers, not confirmed for the MySQL server
IAM application scopesConfirmation whether the MySQL server uses OCI IAM confidential application scopes at all, and the exact scope names if it doesOracle documents IDCS_REQUIRED_SCOPES defaults for OCI MCP servers over HTTP; applicability to the MySQL server is not confirmed
Secret handlingWhere database passwords and any client secrets are stored, whether they appear in config files or environment variables, and how rotation worksOracle advises least-privilege IAM and secure credential management for OCI servers; MySQL-specific guidance must be confirmed
MySQL account and grant listingThe database account the server uses, the grants it holds, and a read-only or write-capable grant set tested in your environmentNot documented in the supplied sources for the Oracle server; the community benborla server describes read-only access, which must be verified in its code and configuration
Log destinationWhere server and query logs are written, their retention, whether they contain SQL text or result rows, and whether they reach your SIEMNot documented in the supplied sources; confirm with Oracle and inspect the server output in a test environment
Vendor support statementWritten statement of the support level, named maintainer, and supported versions for the Oracle server versus the community designcomputer and benborla projectsOracle README describes the server as the recommended starting point for MySQL HeatWave or MySQL AI; community projects are not Oracle products
Version pinnedExact release or commit you will deploy, with a checksum or signed artifact and a change-control record for upgradesRepository release history on the oracle/mcp GitHub repository; the sources supplied do not name a release

What buyers ask before approving the MySQL MCP server

Does the official Oracle MySQL MCP server support SSO?

The Oracle MySQL MCP server README, as reviewed, does not document SSO or centrally managed sign-in for the MySQL server itself. The OCI IAM sign-in pattern in the oracle/mcp repository applies to the OCI MCP servers over HTTP transport, and the MySQL server's own authentication is described separately. Ask Oracle or check the oracle/mcp MySQL README for the current sign-in options for your deployment. Until the documentation confirms SSO for your transport, treat it as unverified and record the database account and credential model your team will use.

What does an OCI IAM confidential application need for MCP over HTTP?

For HTTP transport, the oracle/mcp repository says you configure an OCI IAM confidential application through settings such as IDCS_DOMAIN, IDCS_CLIENT_ID and IDCS_CLIENT_SECRET. HTTP requests then run as the authenticated OCI IAM user. If IDCS_REQUIRED_SCOPES is unset, the default is openid, profile and email plus an oci_mcp invoke scope for the server. Over stdio, actions run with the permissions of the configured OCI CLI profile, so that profile should follow least-privilege IAM and secure credential handling. Your IAM team should own the application, the secret rotation and the scope list, and the database grants still control what the agent can change.

Is a community MySQL MCP server acceptable for a regulated team?

Community servers can be used, but they need their own review because they are not Oracle or MySQL products. The benborla/mcp-server-mysql project describes read-only access for schema inspection and read-only queries, yet its sample remote settings (IS_REMOTE_MCP, PORT and REMOTE_SECRET_KEY) point to a shared secret rather than OAuth. The designcomputer/mysql_mcp_server project describes itself as secure interaction with MySQL but is also a community project. Before approval, confirm the exact code version, review how the secret is stored and rotated, check which statements the server allows, and test against a non-production database with a restricted account. Record the decision and the owner of the server.

What does a MySQL MCP rollout cost, and who pays for each part?

The cost has several parts, and each is paid by a different party. The server code is open source in the oracle/mcp repository, so the main costs are the database platform (MySQL HeatWave on OCI or a self-managed MySQL instance), the time your staff spend on IAM setup, configuration and testing, and the internal security and compliance review. If you bring in an outside firm, DeployOpen works from a written, fixed scope and does not publish a price list, so a quote follows from that scope. Ongoing support, upgrades and continuous testing are separate retainers. Ask every quote to separate one-time work (IAM application, grant design, review, testing) from recurring work (rotation, upgrades, retesting) and to state who licenses the database.

Can our own team run the MySQL MCP security review?

Yes, if your team has people who can read the server documentation, configure the OCI IAM application or the database account, and test the results. The review should cover the transport and sign-in path, the scopes or secret in use, the MySQL grants given to the agent's account, whether write statements are blocked, how credentials are stored, and whether prompt injection can make the agent run unwanted queries. Your team should also decide where logs are kept and who reads them. If the internal team lacks time or testing experience, DeployOpen's AI agent rollout security review tests this setup and delivers a findings report with fixes and a retest, scoped in writing before work starts.

What makes the rollout effort go up or down?

The main drivers are the transport and sign-in path, the number of users and AI clients, and where the database runs. Stdio with a local OCI CLI profile is a different review from HTTP with an OCI IAM application, and each needs its own scope list and secret handling. Effort also rises with the number of databases, the number of people who need access, whether the agent may write, the logging and retention rules your compliance team requires, and whether you use the MySQL AI features. An on-premises deployment without an OCI config file is a supported pattern according to the README FAQ, but it adds network, certificate and secret work. Ask any quote to list these drivers and the assumptions behind them.

How DeployOpen helps teams review an MCP database setup

DeployOpen reviews MySQL MCP server setups in the client's own environment, starting from the written scope. The work covers how the server authenticates, which MySQL grants and tool permissions apply, and what the client can read or change, with findings, fixes and a retest delivered in writing.

How we scope

  • Scope agrees which MySQL MCP server, transport and client applications are in the review before work starts.
  • The written scope lists which authentication path (OAuth, bearer token or shared secret) and which database accounts are assessed.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before any testing begins.

How we build

  • Testing covers tool permissions, database grants and whether write or schema-changing tools are reachable by the agent.
  • Review checks credential handling, including where tokens and secrets are stored and how they are rotated.
  • Setup is tested for prompt injection paths that could lead an agent to run unintended queries against live data.

How we hand over

  • Deliverables include a findings report with severity, reproduction steps and specific fixes for each issue.
  • Documentation records the authentication model, grants, logging configuration and the controls the client should confirm with its vendor.
  • A retest confirms that agreed fixes work as intended before the report is closed.

How we support

  • Ongoing support is available as a retainer for upgrades, configuration changes and periodic retesting.
  • Retainers can cover re-review when the MCP server version, client tools or database permissions change.
  • Support scope and frequency are set in writing so the client can plan review cycles with its security team.

Sources and further reading

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.