Skip to main content
MCP server CX Codex

mysql-mcp — Claude Code MCP server: install and use

Connects an AI agent to MySQL for queries, schema inspection, and server diagnostics. It runs from a Docker image.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add mysql-mcp -- docker run -i --rm docker.io/writenotenow/mysql-mcp:v1.0.0
Open on GitHub

What mysql-mcp does

mysql-mcp exposes 106 tools for working with MySQL from an AI agent. It covers CRUD operations, JSON and spatial data, schema inspection, active queries, performance, replication, locks, and InnoDB status. MCP resources such as mysql://schema, mysql://health, and mysql://performance provide database and telemetry views.

The server includes guided workflows named mysql_quick_query, mysql_quick_schema, and mysql_setup_observability. It also offers Code Mode, stateless MCP HTTP deployment, connection pooling, OAuth 2.1, TLS/SSL, and integrations with MySQL Router, ProxySQL, and MySQL Shell. A MySQL server is required. The install command depends on Docker being available.

What it helps with

  • inspect a MySQL database schema
  • run a query through the agent
  • check server health and query performance
  • find active queries and lock contention
  • review replication and InnoDB status

Example prompts for the agent

  • Use mysql-mcp to inspect the database schema and list its tables.
  • Run a quick MySQL query with the mysql_quick_query workflow.
  • Check database health, active queries, and performance through mysql-mcp resources.

How to install mysql-mcp

Platform CLI

claude mcp add mysql-mcp -- docker run -i --rm docker.io/writenotenow/mysql-mcp:v1.0.0

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about mysql-mcp

How do I install mysql-mcp in Claude Code?

Run claude mcp add mysql-mcp -- docker run -i --rm docker.io/writenotenow/mysql-mcp:v1.0.0.

What does mysql-mcp do?

It connects an AI agent to MySQL and provides tools for queries, schema work, diagnostics, replication checks, and database observability.

What does mysql-mcp need to run?

You need Docker and a MySQL server. The server also supports OAuth 2.1, TLS/SSL, and MCP HTTP transport.

Similar MCP servers

All MCP servers for Data and databases →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor