Back
Marketplace/MySQL

TL;DR

MySQL is a Databases MCP server that lets Claude Code, Cursor, Windsurf and any MCP-compatible AI agent mySQL database integration for AI queries. Install in 1 minute with mcpizy install mysql.

🐬

MySQL

4 tools

Databases

Last updated May 30, 2026 · By MCPizy team

MySQL database integration for AI queries

Official homepage

Install MySQL

Via MCPizy CLI (recommended):
mcpizy install mysql
Or run directly:
npx -y mcp-server-mysql
View on GitHub

Tools exposed

4 tools available
query

Run a read-only SQL query

Inputs

  • sqlstringrequired
list_databases

List all databases on the server

list_tables

List tables in the current database

describe_table

Show columns, types, and keys for a table

Inputs

  • tablestringrequired

Configuration

Works identically across clients. Only the config file path differs.

Claude Code~/.claude.json
{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": [
        "-y",
        "@benborla29/mcp-server-mysql"
      ],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASSWORD": "",
        "MYSQL_DATABASE": "mydb"
      }
    }
  }
}
Cursor.cursor/mcp.json
{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": [
        "-y",
        "@benborla29/mcp-server-mysql"
      ],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASSWORD": "",
        "MYSQL_DATABASE": "mydb"
      }
    }
  }
}
Windsurf~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": [
        "-y",
        "@benborla29/mcp-server-mysql"
      ],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASSWORD": "",
        "MYSQL_DATABASE": "mydb"
      }
    }
  }
}

Authentication setup

  1. 1

    Connect with a read-only MySQL user for safety

    Get it MYSQL_USER

What you can do with MySQL MCP

Paste any of these prompts into Claude Code, Cursor or another MCP-compatible client.

“Describe the schema of the `orders` table”

Uses: describe_table

“Show me every table in the current database with row counts”

Uses: list_tables, query

“Top 10 products by revenue in Q1”

Uses: query

Works with

Claude Code
Claude Desktop
Cursor
Windsurf
VS Code + Copilot
Any MCP Client

More Databases MCPs

⚡

DynamoDB

AWS DynamoDB NoSQL database operations

🐬

MariaDB

MariaDB relational database server

🪳

CockroachDB

Distributed SQL database for cloud apps

🗃️

SQLite

Local SQLite database access and management

Alternatives to MySQL

If MySQL doesn't fit your stack, these Databases MCP servers solve similar problems.

🔵

Neo4j

Graph database queries

🔍

Elasticsearch

Full-text search and analytics engine

🎯

Qdrant

Vector similarity search engine

Key Takeaways

  • MySQL exposes 4 tools for databases workflows in Claude Code, Cursor and Windsurf.
  • Authentication: 1 step (MYSQL_USER).
  • Install in 1 command: mcpizy install mysql — config written to your client automatically.
  • Free and open source (GitHub source linked above) — verified compatible with every MCP client (Claude Code, Claude Desktop, Cursor, Windsurf, VS Code + Copilot).
  • Best use case: "Describe the schema of the `orders` table".

Frequently asked questions

What is the MySQL MCP server?

The MySQL MCP server is an Databases Model Context Protocol server that lets Claude Code, Cursor, Windsurf, VS Code with Copilot, and other MCP-compatible AI agents mySQL database integration for AI queries. It exposes MySQL's capabilities as tools the AI can call directly from your editor or CLI.

How do I install MySQL MCP with Claude Code?

The fastest way is the MCPizy CLI: run `mcpizy install mysql` and MCPizy will add the server to your `.claude.json` automatically. You can also install it manually by adding an entry under `mcpServers` in `.claude.json` with the command `npx -y mcp-server-mysql` and restarting Claude Code.

Is MySQL MCP free?

Yes. The MySQL MCP server is free and open source (see the GitHub repository linked on this page). You may still need a MySQL account or API key to connect the server to the underlying service, but the MCP layer itself has no MCPizy subscription cost.

Does MySQL MCP work with Cursor and Windsurf?

Yes. Any MCP-compatible client works — including Claude Code, Claude Desktop, Cursor (via `.cursor/mcp.json`), Windsurf, VS Code with Copilot Chat, and custom agents built on the MCP SDK. The same install command targets all of them; only the config file path differs.

What can I do with MySQL MCP?

Once installed, your AI agent can mySQL database integration for AI queries directly inside your conversation. Typical use cases include asking Claude Code or Cursor to run MySQL operations, inspect results, chain MySQL with other MCP servers (see our Workflow Recipes), and automate repetitive databases tasks without leaving your editor.

Manage all your MCPs in one place

Monitor usage, track costs, and discover new MCPs.

Get Started Free