MCP MySQL Server

by yuru-sha
MIT License
6
  • Apple

Integrations

  • Allows Language Learning Models (LLMs) to inspect database schemas and execute read-only queries on MySQL databases

mcp-server-mysql

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][:password]@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.

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables LLMs to interact with MySQL databases by inspecting schemas and executing safe, read-only queries within transactions.

  1. Features
    1. Installation
      1. Using Docker
      2. Installing via Smithery
    2. Usage
      1. With Claude Desktop
      2. Connection URL Format
    3. Development
      1. License
        1. Security
          1. Contributing

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that provides read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.
              Last updated -
              1,219
              133
              TypeScript
              MIT License
              • Linux
              • Apple
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server providing read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.
              Last updated -
              1,219
              TypeScript
              MIT License
              • Linux
              • Apple
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that provides read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.
              Last updated -
              1,219
              MIT License
            • -
              security
              F
              license
              -
              quality
              Provides read-only access to PostgreSQL databases, enabling LLMs to inspect database schemas and execute read-only SQL queries within a secure transaction context.
              Last updated -
              19,917
              JavaScript
              • Apple

            View all related MCP servers

            ID: 9giyvsy2ap