MCP server

MySQL MCP Server

Inspect MySQL schemas and run queries; writes are off unless you enable them. Community-maintained (benborla on GitHub), not by the company whose product it connects to. It runs locally on your machine over stdio. Setup below for 12 clients (checked 2026-10-25). Repo and registry data checked 2026-10-24.
Maintainer
Community
Runs
Local (stdio)
GitHub
★ 2,179, last push 2026-07-27 (checked 2026-10-24) star history
License
MIT
Connects to
MySQL
MySQL GitHub star history

Install the MySQL MCP Server

Pick your client. Each tab starts the same local command. Config shapes checked against each client's docs on 2026-10-25.

Run in a terminal. Everything after -- is the command that starts the server. docs

claude mcp add --transport stdio mysql -- npx -y @benborla29/mcp-server-mysql

Security notes

  • The local server runs with your user's permissions (npx downloads it from npm on first run).
  • Connect it to a development database or a read-only user first: the model can run writes and deletes if the credentials allow them.
  • Community code: read it (or at least the tools it registers) before you give it credentials.
  • MCP Toolbox for Databasesofficial · ★ 17k

    One server for Postgres, MySQL, SQL Server, BigQuery, AlloyDB, Spanner and more, with tools you define in YAML.

  • Cloud SQLofficial

    Google-hosted server to manage Cloud SQL for MySQL, PostgreSQL and SQL Server instances.

  • DBHubcommunity · ★ 3.7k

    One server for Postgres, MySQL, MariaDB, SQL Server and SQLite with read-only mode.

  • Convexofficial · ★ 13k

    Read tables, run functions and inspect logs of a Convex deployment.

  • Firebaseofficial · ★ 4.5k

    Firestore, Auth, Data Connect, Storage and Remote Config tools, built into the Firebase CLI.

  • Supabaseofficial · ★ 3k

    Query Postgres, manage tables, migrations, edge functions and branches in your Supabase projects.

  • Qdrantofficial · ★ 1.6k

    Store and search memories in a Qdrant vector collection.

  • Self-hosted server that exposes chosen SQL tables, views and procedures as safe CRUD tools.

FAQ

What does the MySQL MCP Server do?+

Inspect MySQL schemas and run queries; writes are off unless you enable them.

Is the MySQL MCP server official?+

Community-maintained (benborla on GitHub), not by the company whose product it connects to.

How do I add MySQL to Claude Code?+

Run: claude mcp add mysql -- npx -y @benborla29/mcp-server-mysql. Add --scope project to share it with your team through .mcp.json.

How do I use the MySQL MCP server in Cursor or VS Code?+

Open the Cursor or VS Code tab above: it has the mcp.json entry and a one-click install link. Cursor uses the "mcpServers" key; VS Code uses "servers" and needs a type ("stdio").

Does MySQL work in ChatGPT and claude.ai?+

No: it runs locally over stdio, and ChatGPT and claude.ai only connect to remote servers. Use it in Claude Desktop, Claude Code, Cursor, VS Code or another client that can start a local process.

What are the alternatives to the MySQL MCP server?+

Other database MCP servers: MCP Toolbox for Databases, Cloud SQL, DBHub, Convex and Firebase.

All MCP servers · What is an MCP server? · Agent skills