Skip to main content
MCP Server

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.

Share
1,766 stars JavaScript MIT Updated: 2026-06-04

Send to Your Agent

Copy this prompt and paste it into Claude, Cursor, or any MCP client to install instantly.

Install the Mysql MCP server for me.

Server: Mysql
Description: 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.
Install command: npx -y benborla/mcp-server-mysql

GitHub: https://github.com/benborla/mcp-server-mysql

Please install this MCP server and confirm when ready.

Paste into any AI agent with MCP support — works with Claude Desktop, Cursor, Cline, and more.

Quick Install

Config file: ~/Library/Application Support/Claude/claude_desktop_config.json

  1. Open Claude Desktop app
  2. Go to Settings → Developer → Edit Config
  3. Paste the config below into the file
  4. Restart Claude Desktop
{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": [
        "-y",
        "benborla/mcp-server-mysql"
      ]
    }
  }
}

Add this to your ~/Library/Application Support/Claude/claude_desktop_config.json

Installation Methods

npx Run directly with npx
npx -y benborla/mcp-server-mysql
npm Install via npm
npm install benborla/mcp-server-mysql

Tools (10)

Execute

SQL queries against the connected database

Input

`sql` (string): The SQL query to execute

By

default, limited to READ ONLY operations

Optional

write operations (when enabled via configuration):

INSERT

Add new data to tables (requires `ALLOW_INSERT_OPERATION=true`)

UPDATE

Modify existing data (requires `ALLOW_UPDATE_OPERATION=true`)

DELETE

Remove data (requires `ALLOW_DELETE_OPERATION=true`)

All

operations are executed within a transaction with proper commit/rollback handling

Supports

prepared statements for secure parameter handling

Configurable

query timeouts and result pagination

Compatibility

Claude Desktop
Cursor
Cline
VS Code
Devin (formerly Windsurf)

About

MCP Server for MySQL - Claude Code Edition

Overview

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.

Tools

  • Execute: SQL queries against the connected database
  • Input: sql (string): The SQL query to execute
  • By: default, limited to READ ONLY operations
  • Optional: write operations (when enabled via configuration):
  • INSERT: Add new data to tables (requires ALLOW_INSERT_OPERATION=true)
  • UPDATE: Modify existing data (requires ALLOW_UPDATE_OPERATION=true)
  • DELETE: Remove data (requires ALLOW_DELETE_OPERATION=true)
  • All: operations are executed within a transaction with proper commit/rollback handling
  • Supports: prepared statements for secure parameter handling
  • Configurable: query timeouts and result pagination

Installation

NPX

npx -y benborla/mcp-server-mysql

NPM

npm install benborla/mcp-server-mysql

Related Resources

Compare LLM Pricing

This server works with Claude, GPT-4o, and other models. Compare API costs side-by-side to find the cheapest option for your workflow.