Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI β†’ MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE β†— (opens in a new tab)
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub β†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ—„οΈ Databases
  3. Mysql
Mysql logo
Health: ActiveRecent health check succeeded.Last checked 9/7/2026, 7:08:09 PM

Mysql

User RatingsBe the first to rate and review this MCP server! Enrichment pendingWe haven’t run our AI enrichment pass on this listing yet, so the overview, use cases, and FAQ below may be sparse or missing. We work through the catalog over time β€” check back soon.
View Repository1 GitHub StarsTotal stargazers on GitHub for the source repository (1 stars).

MCP server for MySQL/MariaDB β€” pooled async queries with destructive-query safety

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
Manual Client & Custom JSON ConfigExpand JSON β–Ύ

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": [
        "-y",
        "mysql"
      ]
    }
  }
}

πŸ’‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

Install Directory Badge Claim listing AlternativesπŸ—„οΈ More in Databases

Documentation Overview

MySQL MCP Server

A high-quality Model Context Protocol (MCP) server implementation for MySQL databases. This server enables AI assistants like Claude to interact with MySQL databases through a standardized protocol.

Version: 0.2.0 | Protocol: MCP 2025-03-26 | Rust: 1.70+ | Status: Production Ready

Table of Contents

  • Features
  • Installation
  • Quick Start (5 Minutes)
  • Usage
  • Available Tools
  • Database Context Feature
  • Security Considerations
  • Architecture
  • Troubleshooting
  • Development
  • Deployment Guide
  • Contributing
  • License
  • Support

Features

  • Schema Inspection: Retrieve table schemas and structure information
  • Query Execution: Execute SQL queries (read-only by default for safety)
  • Data Manipulation: Insert, update, and delete operations
  • Database Context: Specify which database to use per query
  • Safety Controls: Configurable query restrictions to prevent dangerous operations
  • Connection Management: Robust connection handling with retry logic and pooling
  • Error Handling: Comprehensive error reporting with detailed messages
  • JSON-RPC 2.0 Protocol: Standardized communication via stdio

Installation

Prerequisites

  • Rust 1.70+
  • MySQL 5.7+ or MariaDB 10.2+
  • Access to a MySQL database

Building from Source

bash
git clone <repository-url>
cd mcp-server-mysql
cargo build --release

The compiled binary will be available at target/release/mcp-server-mysql.

From Release Package

bash
# Extract the package
tar -xzf mcp-server-mysql-v0.2.0-linux-x86_64.tar.gz

# Move binary to system path (optional)
sudo cp mcp-server-mysql /usr/local/bin/

# Verify installation
mcp-server-mysql --version

Quick Start (5 Minutes)

Step 1: Build the Server

bash
cargo build --release

The binary will be at target/release/mcp-server-mysql

Step 2: Test the Connection

bash
./target/release/mcp-server-mysql \
  --host localhost \
  --username root \
  --password yourpassword \
  --database testdb

You should see: "MCP MySQL Server started and ready to accept connections"

Step 3: Configure Claude Desktop

Edit your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add this configuration:

config.json
{
  "mcpServers": {
    "mysql": {
      "command": "/absolute/path/to/mcp-server-mysql",
      "args": [
        "--host", "localhost",
        "--port", "3306",
        "--username", "your_username",
        "--password", "your_password",
        "--database", "your_database"
      ]
    }
  }
}

Security Note: For production use, consider using environment variables or a secure secrets management solution instead of hardcoding passwords in the configuration file.

Step 4: Restart Claude Desktop

Close and reopen Claude Desktop completely. You should see a small hammer icon indicating the MCP server is connected.

Step 5: Try it Out!

Ask Claude:

  • "Can you show me the schema for the users table in my MySQL database?"
  • "Query the database and show me the first 10 rows from the products table"
  • "What tables are in my database?"

Usage

Command Line Arguments

bash
mcp-server-mysql \
  --host localhost \
  --port 3306 \
  --username your_username \
  --password your_password \
  --database your_database \
  --allow-dangerous-queries false

Arguments Reference

ArgumentDescriptionDefaultRequired
--hostMySQL server hostnamelocalhostNo
--portMySQL server port3306No
--usernameMySQL username-Yes
--passwordMySQL password (empty)No
--databaseDatabase name to connect to-Yes
--allow-dangerous-queriesAllow INSERT/UPDATE/DELETE queriesfalseNo

Configuration with Claude Desktop

Add this configuration to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

config.json
{
  "mcpServers": {
    "mysql": {
      "command": "/path/to/mcp-server-mysql",
      "args": [
        "--host", "localhost",
        "--port", "3306",
        "--username", "your_username",
        "--password", "your_password",
        "--database", "your_database"
      ]
    }
  }
}

Available Tools

1. mysql (Schema Inspection)

Retrieve database schema information for tables.

Parameters:

  • table_name (string): Name of the table to inspect, or "all-tables" to get all table schemas

Example:

config.json
{
  "table_name": "users"
}

Returns:

  • Column information (name, type, nullable, defaults, keys)
  • Index information
  • Table constraints

2. query (SQL Execution)

Execute SQL queries on the database.

Parameters:

  • query (string): SQL query to execute
  • database (string, optional): Database name to use for this specific query

Example:

config.json
{
  "query": "SELECT * FROM users WHERE active = 1 LIMIT 10",
  "database": "my_database"
}

Safety:

  • By default, only SELECT queries are allowed
  • Use --allow-dangerous-queries flag to enable INSERT/UPDATE/DELETE
  • Dangerous keywords are blocked unless explicitly enabled

3. insert (Insert Data)

Insert data into a specified table.

Parameters:

  • table_name (string): Name of the table
  • data (object): Key-value pairs of column names and values

Example:

config.json
{
  "table_name": "users",
  "data": {
    "username": "john_doe",
    "email": "john@example.com",
    "active": true
  }
}

Returns: Last insert ID

4. update (Update Data)

Update data in a specified table based on conditions.

Parameters:

  • table_name (string): Name of the table
  • data (object): Key-value pairs of columns to update
  • conditions (object): Key-value pairs for WHERE clause

Example:

config.json
{
  "table_name": "users",
  "data": {
    "email": "newemail@example.com",
    "updated_at": "2024-01-15 10:30:00"
  },
  "conditions": {
    "id": 123
  }
}

Returns: Number of affected rows

5. delete (Delete Data)

Delete data from a specified table based on conditions.

Parameters:

  • table_name (string): Name of the table
  • conditions (object): Key-value pairs for WHERE clause

Example:

config.json
{
  "table_name": "users",
  "conditions": {
    "id": 123
  }
}

Returns: Number of affected rows

Warning: Always specify conditions to avoid deleting all rows!

Database Context Feature

The Problem

Previously, database context was not maintained between queries:

Dockerfile
-- Query 1
USE dev_database;  -- Succeeds

-- Query 2 (new connection from pool)
SELECT * FROM my_table;  -- ❌ Fails: context was lost

The Solution

Use the optional database parameter on each query:

config.json
{
  "query": "SELECT * FROM my_table",
  "database": "dev_database"
}

Benefits

  1. Explicit and Clear: Know exactly which database each query uses
  2. No Hidden State: Each query is independent
  3. Backward Compatible: Existing queries without parameter still work
  4. No Race Conditions: Each query gets its own connection
  5. Simple to Use: Just add "database": "name" to query arguments

Usage Examples

Basic Query with Database Parameter

config.json
{
  "query": "SELECT * FROM crm_sites LIMIT 10",
  "database": "dev_smartConnect_za"
}

Query Without Database Parameter (Uses Default)

config.json
{
  "query": "SELECT * FROM users WHERE active = 1"
}

Uses the database specified in --database startup argument.

Multiple Databases in Same Session

Dockerfile
// Query database 1
{
  "query": "SELECT COUNT(*) FROM customers",
  "database": "production_db"
}

// Query database 2
{
  "query": "SELECT COUNT(*) FROM test_data",
  "database": "test_db"
}

Before vs After

Before (Required fully qualified names):

Dockerfile
SELECT * FROM dev_smartConnect_za.crm_sites
  JOIN dev_smartConnect_za.crm_orgs ON ...
WHERE dev_smartConnect_za.crm_sites.active = 1;

After (Clean and simple):

config.json
{
  "query": "SELECT * FROM crm_sites JOIN crm_orgs ON ... WHERE active = 1",
  "database": "dev_smartConnect_za"
}

Common Scenarios

Scenario 1: Single Database Project

Set default database and omit the parameter:

Dockerfile
# Startup
--database my_project_db

# Query (no database parameter needed)
{
  "query": "SELECT * FROM users"
}

Scenario 2: Multiple Database Project

Specify database for each query:

json
// Customer database
{ "query": "...", "database": "customers_db" }

// Orders database
{ "query": "...", "database": "orders_db" }

// Analytics database
{ "query": "...", "database": "analytics_db" }

Error Handling

Error Code -32005: Connection Acquisition Failed

Code
Cause: Connection pool exhausted
Solution: Retry after a moment

Error Code -32006: Database Context Switch Failed

Code
Cause: Database doesn't exist or user lacks permissions
Solution: Verify database exists and user has access

Best Practices

βœ… DO

  • Specify database explicitly for production queries
  • Use descriptive database names in your queries
  • Test with SELECT DATABASE() to verify context
  • Group queries by database for clarity

❌ DON'T

  • Mix qualified and unqualified names in the same query
  • Assume persistence - specify database for each query
  • Use special characters in database names if possible
  • Forget to verify user permissions for all databases

Security Considerations

Read-Only Mode (Default)

Read the full README β†’View source on GitHub β†’

Related MCP Servers

View all in Databases View all alternatives
  • Dbhub logoDbhub

    Minimal Database MCP Server for PostgreSQL, MySQL, SQL Server, SQLite, MariaDB

    πŸ—„οΈ Databases0 views
    Compare vs Dbhub β†’
  • Mysql MCP Server logoMysql MCP Server

    MySQL database integration with configurable access controls, schema inspection, and comprehensive security guidelines

    πŸ—„οΈ Databases3 views
    Compare vs Mysql MCP Server β†’
  • MySQL MCP logoMySQL MCP

    MCP server for one MySQL database: schema, read-only queries and guarded writes.

    πŸ—„οΈ Databases0 views
    Compare vs MySQL MCP β†’
  • Genai Toolbox logoGenai Toolbox

    Open source MCP server specializing in easy, fast, and secure tools for Databases.

    πŸ—„οΈ Databases5 views
    Compare vs Genai Toolbox β†’

Reviews

No reviews yet β€” be the first to share how this listing worked for you.

Frequently Asked Questions about Mysql

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "mysql": { "command": "npx", "args": ["-y", "mysql"] } }

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMysql AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mysql?style=directory)](https://allmcps.com/mcp/mysql)
HTML Embed
<a href="https://allmcps.com/mcp/mysql"><img src="https://allmcps.com/api/badge/mysql?style=directory" alt="Mysql on AllMCPs" /></a>

Technical Specs & Signals

CategoryπŸ—„οΈDatabases
More technical detailsExpand β–Ύ
TransportSTDIO
RuntimeNode.js
Last updatedSep 7, 2026
Views0
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars1
GitHub Star CountTotal stargazers on GitHub representing community popularity (1 stars).
29Quality signal: Emerging Β· 29/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools11/30
Adoption & activity1/15
Community engagement0/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge and attach your website β€” proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it β€” no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in πŸ—„οΈ Databases β†’Best MCP servers for Databases β†’Alternatives to Mysql β†’Install in Claude DesktopInstall in CursorInstall in VS Code