Skip to content
MCP Servers
MCP

mcp-server-mysql

Runs read queries against a MySQL database and inspects its schema.

From plugin
mcp-server-mysql
2.2k1 skill1 MCP

Claude Code

$ claude mcp add mcp-server-mysql -- npx -y @benborla29/mcp-server-mysql

From the README

What can you do with mcp-server-mysql?

  • Read-only by default

    write operations opt-in via env flags

  • Claude Code integration

    optimized for Anthropic's Claude Code CLI

  • SSH tunnel support

    built-in support for remote databases

  • Multi-DB mode

    query across multiple databases without reconnecting

  • Schema-specific permissions

    per-database read/write control

  • PII redaction

    automatic masking of sensitive data in results

  • Remote mode

    HTTP transport with bearer token auth

  • SSL/TLS support

    encrypted connections with mTLS option

Security report

Found

Low risk

  • Known flaws

    None known

  • Signed build

    No

    No build provenance published

  • Maintained

    Jul 27, 2026

    Last push

  • Licence

    MIT

  • Runs as

    npx

    On your machine

  • Deprecated

    No

Signals from public registries, not an audit. Checked Nov 23, 2026.

mcp-server-mysql README

MCP Server for MySQL

Trust Score

Sponsor — Bloome

Bloome

Using mcp-server-mysql to let your AI query MySQL? Bloome brings that to your whole team — an AI-agent IM platform where AI agents are members of the chat. Connect your MCP tools and have agents inspect schemas, run queries, and answer data questions for everyone in one thread. Zero local setup, runs in the cloud, on web and mobile.


MCP server that gives Claude and other LLMs access to MySQL — inspect schemas, run queries, and optionally write data, all through the Model Context Protocol.

Key Features

  • Read-only by default — write operations opt-in via env flags
  • Claude Code integration — optimized for Anthropic's Claude Code CLI
  • SSH tunnel support — built-in support for remote databases
  • Multi-DB mode — query across multiple databases without reconnecting
  • Schema-specific permissions — per-database read/write control
  • PII redaction — automatic masking of sensitive data in results
  • Remote mode — HTTP transport with bearer token auth
  • SSL/TLS support — encrypted connections with mTLS option

Requirements

  • Node.js v20+
  • MySQL 5.7+ (8.0+ recommended)
  • MySQL user with appropriate privileges

Quick Install

Claude Code (simplest):

claude mcp add mcp_server_mysql \
  -e MYSQL_HOST="127.0.0.1" \
  -e MYSQL_PORT="3306" \
  -e MYSQL_USER="root" \
  -e MYSQL_PASS="your_password" \
  -e MYSQL_DB="your_database" \
  -- npx @benborla29/mcp-server-mysql

Claude Desktop / other clients:

{
  "mcpServers": {
    "mcp_server_mysql": {
      "command": "npx",
      "args": ["-y", "@benborla29/mcp-server-mysql"],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASS": "your_password",
        "MYSQL_DB": "your_database"
      }
    }
  }
}

All write operations are disabled by default. Enable with ALLOW_INSERT_OPERATION=true, ALLOW_UPDATE_OPERATION=true, ALLOW_DELETE_OPERATION=true.

Documentation

Tools & Resources

Tool: mysql_query Execute SQL queries. Read-only by default. Write operations enabled per flag.

Resources: mysql://tables Lists all tables and column metadata for the connected database.

Contributing

PRs welcome at github.com/benborla/mcp-server-mysql.

git clone https://github.com/benborla/mcp-server-mysql.git
pnpm install
pnpm run build
pnpm test

Contributors

License

MIT — see LICENSE for details.

Stats
2,228
Stars
Maintained
Maintenance
JavaScript
Language
MIT
License
Last commit
Created
Added

Repo: benborla/mcp-server-mysql

@benborla
Ships withmcp-server-mysql

A Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.

2.2k1 skill1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
2.2k
Star history of benborla/mcp-server-mysql on GitHub, a chart by star-history.com

More MCP servers from other plugins.

gitnexus

gitnexus

MCP

Ships with gitnexus: GitNexus indexes a codebase into a knowledge graph of symbols, calls, dependencies and execution flows. Use…

@abhigyanpatwari@abhigyanpatwariInstall MCP
mcp-use-docs

mcp-use-docs

MCP

Ships with mcp-use: The fullstack MCP framework to develop MCP Apps for ChatGPT / Claude & MCP Servers for AI Agents.

mcp-use3d11k
@mcp-use@mcp-useInstall MCP
cloudwatch

cloudwatch

MCP

Amazon's monitoring service that collects metrics, logs and alarms across AWS infrastructure and apps.

mcp5d9.9k
@awslabs@awslabsInstall MCP
treg

treg

MCP

Ships with treg: OpenRouter, but for agent tools instead of models. Point an agent at one base URL with one token and it can do…

treg5d8.4k
@superdesigndev@superdesigndevInstall MCP

Questions about mcp-server-mysql.

Which coding agents can use mcp-server-mysql?
mcp-server-mysql works in any agent that reads an MCP config file: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf. Each agent reads it from its own file; this page names the file for each one.
How do I add mcp-server-mysql to Claude Code?
Run this in your terminal: claude mcp add mcp-server-mysql -- npx -y @benborla29/mcp-server-mysql
Is mcp-server-mysql safe to install?
Low risk. Signals from public registries, not an audit.