yuru-sha
MCP Serveryuru-shapublic

mcp server mysql

MCP Server for MySQL databases

Repository Info

8
Stars
1
Forks
8
Watchers
1
Issues
JavaScript
Language
MIT License
License

About This Server

MCP Server for MySQL databases

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

mcp-server-mysql

CI Status smithery badge

Model Context Protocol Server for MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.

Features

  • Read-only access to MySQL databases
  • Schema inspection capabilities
  • Safe query execution within READ ONLY transactions
  • Docker support
  • NPM package available

Installation

Using Docker

# Build the Docker image
make docker

# Run with Docker
docker run -i --rm mcp/mysql mysql://host:port/dbname

Installing via Smithery

To install MySQL Database Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @yuru-sha/mcp-server-mysql --client claude

Usage

With Claude Desktop

Add the following configuration to your claude_desktop_config.json:

{
  "mcpServers": {
    "mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mcp/mysql",
        "mysql://host:port/dbname"
      ]
    }
  }
}

Note: When using Docker on macOS, use host.docker.internal if the MySQL server is running on the host network.

Connection URL Format

mysql://user@host[:port]/database

Replace /database with your database name.

Development

# Initial setup
make setup

# Build the project
make build

# Format code
make format

# Run linter
make lint

License

This project is released under the MIT License.

Security

This server enforces read-only access to protect your database. All queries are executed within READ ONLY transactions.

For enhanced security, we recommend creating a read-only user.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Quick Start

1

Clone the repository

git clone https://github.com/yuru-sha/mcp-server-mysql
2

Install dependencies

cd mcp-server-mysql
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Owneryuru-sha
Repomcp-server-mysql
LanguageJavaScript
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation