Skip to main content
mcpSource-backed

MySQL MCP Server

MCP server for connecting Claude to MySQL databases with schema inspection, SQL query execution, SSH tunnel support, multi-database mode, and configurable write-operation controls.

by benborla · submitted by oktofeesh1·added 2026-06-05·
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://github.com/benborla/mcp-server-mysql/blob/main/README.md, https://github.com/benborla/mcp-server-mysql
Brand
MySQL MCP Server
Brand domain
github.com
Safety notes
MySQL MCP Server can inspect schemas and run SQL queries against configured databases., Write and DDL operations can be enabled through environment variables, so keep insert, update, delete, and DDL permissions disabled unless explicitly required., Use a least-privilege MySQL user and avoid connecting the server to production databases with broad grants., Multi-database mode can expose every database visible to the configured MySQL user., SSH tunnel settings, query timeouts, cache settings, logging, and rate limits should be reviewed before connecting an MCP client.
Privacy notes
Database hostnames, schema names, table names, column names, query text, query results, credentials, prompts, logs, and tool outputs may be visible to the MCP client and model provider., Query results may contain customer data, credentials, tokens, personal data, financial data, internal IDs, or regulated records., MCP client configs, shell history, logs, screenshots, and shared project files can leak MySQL credentials if not handled carefully., Prefer local or user-scoped MCP configuration for database credentials instead of committing project-scoped configs.
Author
benborla
Submitted by
oktofeesh1
Claim status
unclaimed
Last verified
2026-06-05

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

63

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Needs review

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    No reviewed flag detected in metadata.

    Pending

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

CLI install

Copy-ready — paste the snippet to get started.

15 minutes

Adoption plan

Balanced adoption plan

Current risk score 24/100. Use staged verification before broader rollout.

Risk 24

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    No review metadata found; increase manual validation.

    Pending
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Missing required evidence: Metadata review. Risk score 31.

Risk 31

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Missing

Review metadata is missing.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required gaps: Metadata review

Decision timeline

Decision timeline · balanced

Blocking gaps: Check metadata review status. Risk 28.

Risk 28

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is missing.

Pending

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

Blockers: Check metadata review status

Prerequisite readiness

Prerequisite readiness

5 prerequisites to line up before setup. Have accounts and credentials ready first. Includes a review or approval gate.

0/5 ready
Account & credentials1Install & runtime1Permissions & scopes1Review & approval1General115 minutes

Safety & privacy surface

Safety & privacy surface

5 safety and 4 privacy notes across 5 risk areas. Review closely: credentials & tokens, permissions & scopes.

5 areas
  • SafetyExecution & processesMySQL MCP Server can inspect schemas and run SQL queries against configured databases.
  • SafetyPermissions & scopesWrite and DDL operations can be enabled through environment variables, so keep insert, update, delete, and DDL permissions disabled unless explicitly required.
  • SafetyPermissions & scopesUse a least-privilege MySQL user and avoid connecting the server to production databases with broad grants.
  • SafetyGeneralMulti-database mode can expose every database visible to the configured MySQL user.
  • SafetyData retentionSSH tunnel settings, query timeouts, cache settings, logging, and rate limits should be reviewed before connecting an MCP client.
  • PrivacyCredentials & tokensDatabase hostnames, schema names, table names, column names, query text, query results, credentials, prompts, logs, and tool outputs may be visible to the MCP client and model provider.
  • PrivacyCredentials & tokensQuery results may contain customer data, credentials, tokens, personal data, financial data, internal IDs, or regulated records.
  • PrivacyCredentials & tokensMCP client configs, shell history, logs, screenshots, and shared project files can leak MySQL credentials if not handled carefully.
  • PrivacyCredentials & tokensPrefer local or user-scoped MCP configuration for database credentials instead of committing project-scoped configs.

Safety notes

  • MySQL MCP Server can inspect schemas and run SQL queries against configured databases.
  • Write and DDL operations can be enabled through environment variables, so keep insert, update, delete, and DDL permissions disabled unless explicitly required.
  • Use a least-privilege MySQL user and avoid connecting the server to production databases with broad grants.
  • Multi-database mode can expose every database visible to the configured MySQL user.
  • SSH tunnel settings, query timeouts, cache settings, logging, and rate limits should be reviewed before connecting an MCP client.

Privacy notes

  • Database hostnames, schema names, table names, column names, query text, query results, credentials, prompts, logs, and tool outputs may be visible to the MCP client and model provider.
  • Query results may contain customer data, credentials, tokens, personal data, financial data, internal IDs, or regulated records.
  • MCP client configs, shell history, logs, screenshots, and shared project files can leak MySQL credentials if not handled carefully.
  • Prefer local or user-scoped MCP configuration for database credentials instead of committing project-scoped configs.

Prerequisites

  • Node.js 20 or newer available to the MCP client runtime.
  • MySQL 5.7 or newer, with MySQL 8.0 or newer recommended upstream.
  • Dedicated MySQL user with only the database grants required for the intended workflow.
  • MySQL host, port, credentials, database name, SSL, and optional SSH tunnel settings prepared.
  • Insert, update, delete, DDL, multi-database, and schema-specific permissions reviewed before enabling them.

Schema details

Install type
cli
Troubleshooting
No
Source repository stats
Scope
Source repo
Collection metadata
Estimated setup
15 minutes
Difficulty
advanced
Full copyable content
{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": ["-y", "@benborla29/mcp-server-mysql"],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "YOUR_MYSQL_USER",
        "MYSQL_PASS": "YOUR_MYSQL_PASSWORD",
        "MYSQL_DB": "YOUR_DATABASE",
        "ALLOW_INSERT_OPERATION": "false",
        "ALLOW_UPDATE_OPERATION": "false",
        "ALLOW_DELETE_OPERATION": "false",
        "ALLOW_DDL_OPERATION": "false"
      }
    }
  }
}

About this resource

Content

MySQL MCP Server connects Claude-compatible MCP clients to MySQL databases. It can inspect schema resources, execute SQL queries, work through SSH tunnels, support multi-database mode, and enforce configurable insert, update, delete, and DDL permissions.

The upstream README documents the @benborla29/mcp-server-mysql NPM package, Claude Code and Codex CLI configuration, global install and NPX usage, SSH tunnel setup, multi-database mode, and environment-variable based operation controls.

Source Review

These sources were reviewed on 2026-06-05. Prefer the live repository, README, multi-database guide, package metadata, and NPM registry metadata for current package name, environment variables, write-permission controls, and SSH tunnel behavior.

Features

  • Inspect MySQL schemas and database connections.
  • Execute SQL queries through an MCP tool surface.
  • Disable insert, update, delete, and DDL operations by default through environment variables.
  • Configure schema-specific permissions for multi-database workflows.
  • Use MySQL host/port, socket, SSL, SSH tunnel, query timeout, cache, and rate-limit settings.
  • Run in single-database mode or multi-database mode.
  • Install globally or run with NPX from MCP clients such as Claude Code and Codex CLI.

Installation

For MCP clients that launch stdio servers:

{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": ["-y", "@benborla29/mcp-server-mysql"],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "YOUR_MYSQL_USER",
        "MYSQL_PASS": "YOUR_MYSQL_PASSWORD",
        "MYSQL_DB": "YOUR_DATABASE",
        "ALLOW_INSERT_OPERATION": "false",
        "ALLOW_UPDATE_OPERATION": "false",
        "ALLOW_DELETE_OPERATION": "false",
        "ALLOW_DDL_OPERATION": "false"
      }
    }
  }
}

Restart the MCP client after adding the server and verify the configured MySQL user has only the grants needed for the intended workflow.

Use Cases

  • Ask Claude to inspect tables and columns before writing application code.
  • Query development data while debugging a local feature.
  • Review schema shape across one database or several databases.
  • Use SSH tunnels for remote development databases.
  • Keep production schemas read-only while allowing write operations in development or test schemas.
  • Add explicit DDL controls before asking an agent to help with migrations.

Safety and Privacy

Database MCP tools need careful boundaries. Even when write operations are disabled in the MCP server configuration, the configured MySQL user should also use least-privilege database grants. Do not rely on a single layer of MCP-side configuration to protect production data.

Keep credentials out of project-scoped files unless the project is private and the credentials are placeholders. Review logs, shell history, client config, and screenshots for leaked MySQL passwords, hostnames, schema names, and query results.

Duplicate Check

No benborla/mcp-server-mysql entry, @benborla29/mcp-server-mysql package entry, or matching source URL was found in content/mcp.

Source citations

Add this badge to your README

Show that MySQL MCP Server is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/mcp/mysql-mcp-server.svg)](https://heyclau.de/entry/mcp/mysql-mcp-server)

How it compares

MySQL MCP Server side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

Field

MCP server for connecting Claude to MySQL databases with schema inspection, SQL query execution, SSH tunnel support, multi-database mode, and configurable write-operation controls.

Open dossier

Token-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite.

Open dossier

Official Agentset MCP server that lets Claude retrieve cited knowledge-base results from an Agentset namespace through the `knowledge-base-retrieve` tool, with optional tenant scoping and custom tool descriptions.

Open dossier

MCP server that connects Claude to Bright Data web search, scraping, browser automation, public web datasets, and package metadata tools.

Open dossier
Next steps
Trust
Review statusNot reviewedNot reviewedNot reviewedNot reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceSource-backedSource-backedSource-backedSource-backed
Submitteroktofeesh1oktofeesh1oktofeesh1oktofeesh1
Install riskReview firstReview firstReview firstReview first
Notes Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓
BrandDBHub logoDBHubAgentset logoAgentsetBright Data logoBright Data
Categorymcpmcpmcpmcp
SourceSource-backedSource-backedSource-backedSource-backed
AuthorbenborlaBytebaseAgentsetBright Data
Added2026-06-052026-06-052026-06-062026-06-05
Platforms
Harness
Source repo
Safety notesMySQL MCP Server can inspect schemas and run SQL queries against configured databases. Write and DDL operations can be enabled through environment variables, so keep insert, update, delete, and DDL permissions disabled unless explicitly required. Use a least-privilege MySQL user and avoid connecting the server to production databases with broad grants. Multi-database mode can expose every database visible to the configured MySQL user. SSH tunnel settings, query timeouts, cache settings, logging, and rate limits should be reviewed before connecting an MCP client.DBHub can execute SQL queries against configured databases. SQL execution can read, create, update, delete, or otherwise modify data depending on database permissions and requested queries. Configure read-only mode, row limits, query timeouts, least-privilege credentials, and human review before using DBHub with production or sensitive databases. Custom tools can wrap reusable parameterized SQL, so review their definitions before allowing agents to call them.The MCP server sends Claude's retrieval queries to the Agentset API using the configured API key and namespace. The `knowledge-base-retrieve` tool can return up to 100 results per call and can rerank results by relevance. Namespace and tenant selection control which indexed documents are searchable; review them before connecting a shared agent. API keys should be scoped, rotated, and stored only in the MCP server environment or a secret manager. Custom tool descriptions can influence when the model calls the retrieval tool, so review them before use in production workflows.This server sends web searches, URLs, scraping targets, browser actions, package names, and dataset requests to Bright Data APIs. Review website terms, robots policies, rate limits, jurisdictional requirements, and internal scraping policies before automating collection. `PRO_MODE`, browser automation groups, data-product groups, and batch tools can increase cost, request volume, and operational impact. The server can create or use Bright Data zones through API calls; review account permissions and zone settings before running it with broad API tokens. Use `RATE_LIMIT`, group selection, and explicit tool allowlists to keep agent-driven browsing and scraping bounded.
Privacy notesDatabase hostnames, schema names, table names, column names, query text, query results, credentials, prompts, logs, and tool outputs may be visible to the MCP client and model provider. Query results may contain customer data, credentials, tokens, personal data, financial data, internal IDs, or regulated records. MCP client configs, shell history, logs, screenshots, and shared project files can leak MySQL credentials if not handled carefully. Prefer local or user-scoped MCP configuration for database credentials instead of committing project-scoped configs.Database connection strings, hostnames, schemas, table names, column names, row data, query text, query results, traces, and errors may be visible to the MCP client and model provider. Databases can contain personal data, customer records, credentials, business metrics, audit logs, payment data, healthcare data, and proprietary operational state. Avoid exposing production databases or regulated data unless the database, MCP client, and model session are approved for that access.Retrieved chunks can include private documents, product specs, policies, support content, internal procedures, historical project information, or customer-specific data. Retrieval queries, namespace IDs, tenant IDs, document chunks, citations, and tool outputs may be visible to the MCP client, model provider, Agentset logs, and application telemetry. Tenant IDs are useful for data segregation, but incorrect tenant or namespace configuration can expose the wrong knowledge base. Do not paste API keys, namespace IDs, tenant IDs, or retrieved private chunks into shared issue reports, screenshots, or repository files.Bright Data API tokens must stay in environment variables or secret managers and should never be committed to MCP configuration files. Queries, URLs, package names, web pages, scraping outputs, dataset filters, and browser activity may be visible to Bright Data, the MCP client, and the model provider. Public web data can still contain personal data, copyrighted content, customer information, or contractual restrictions. Tool outputs can include scraped page text, search results, social or ecommerce dataset fields, package metadata, and browser screenshots depending on enabled tools.
Prerequisites
  • Node.js 20 or newer available to the MCP client runtime.
  • MySQL 5.7 or newer, with MySQL 8.0 or newer recommended upstream.
  • Dedicated MySQL user with only the database grants required for the intended workflow.
  • MySQL host, port, credentials, database name, SSL, and optional SSH tunnel settings prepared.
  • Node.js and npx available to the MCP client runtime.
  • A PostgreSQL, MySQL, MariaDB, SQL Server, or SQLite database connection.
  • Database credentials with the minimum privileges needed for the workflow.
  • Read-only permissions or DBHub guardrails configured before connecting production data.
  • Agentset account or self-hosted Agentset deployment with a populated namespace.
  • Agentset API key with access to the namespace Claude should query.
  • Node.js 18.17 or newer for running the `@agentset/mcp` package.
  • Namespace ID selected with `--ns` or `AGENTSET_NAMESPACE_ID`.
  • Node.js and npx available to the MCP client runtime.
  • Bright Data account and API token stored as `API_TOKEN`.
  • Review of Bright Data plan limits, free-tier scope, paid modes, and data-product terms.
  • A decision about whether to use default rapid tools, `PRO_MODE`, `GROUPS`, or explicit `TOOLS`.
Install
npx -y @benborla29/mcp-server-mysql
npx @bytebase/dbhub@latest --transport stdio --dsn YOUR_DATABASE_DSN
Run `npx @agentset/mcp --ns <namespace-id>` with `AGENTSET_API_KEY` set in the MCP server environment.
npx @brightdata/mcp
Config
{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": ["-y", "@benborla29/mcp-server-mysql"],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "YOUR_MYSQL_USER",
        "MYSQL_PASS": "YOUR_MYSQL_PASSWORD",
        "MYSQL_DB": "YOUR_DATABASE",
        "ALLOW_INSERT_OPERATION": "false",
        "ALLOW_UPDATE_OPERATION": "false",
        "ALLOW_DELETE_OPERATION": "false",
        "ALLOW_DDL_OPERATION": "false"
      }
    }
  }
}
{
  "mcpServers": {
    "dbhub": {
      "command": "npx",
      "args": [
        "@bytebase/dbhub@latest",
        "--transport",
        "stdio",
        "--dsn",
        "YOUR_DATABASE_DSN"
      ]
    }
  }
}
{
  "mcpServers": {
    "agentset": {
      "command": "npx",
      "args": ["-y", "@agentset/mcp@latest", "--ns", "ns_xxx"],
      "env": {
        "AGENTSET_API_KEY": "agentset_xxx"
      }
    }
  }
}
{
  "mcpServers": {
    "bright-data": {
      "command": "npx",
      "args": ["@brightdata/mcp"],
      "env": {
        "API_TOKEN": "YOUR_BRIGHT_DATA_API_TOKEN",
        "GROUPS": "code,research",
        "RATE_LIMIT": "100/1h"
      }
    }
  }
}
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.