MySQL查询服务器 / MySQL Query Server MCP Server

MySQL query server based on the MCP sse.Multi-level SQL risk control & injection protection Docker support for quick deployment

Local serverstdioPython

What is the MySQL查询服务器 / MySQL Query Server MCP server?

MySQL查询服务器 / MySQL Query Server MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. MySQL query server based on the MCP sse.Multi-level SQL risk control & injection protection Docker support for quick deployment.

What you get

This project is a MySQL query server based on the MCP framework, supporting real-time database operations via SSE protocol. It features comprehensive security, logging, configuration, and sensitive information protection mechanisms, suitable for secure MySQL data access in development, testing, and production environments.

What the assistant can call

Once MySQL查询服务器 / MySQL Query Server is connected, these are the calls the assistant has available:

  • Multi — level SQL risk control & injection protection
  • Cross — database Access Protection**: Blocks unauthorized database access
  • Auto — enable database isolation in production**
  • HOST — 服务器监听地址 / Server listen address
  • PORT — 服务器监听端口 / Server listen port
  • MYSQL_HOST — MySQL服务器地址 / MySQL server host
  • MYSQL_PORT — MySQL服务器端口 / MySQL server port
  • MYSQL_USER — MySQL用户名 / MySQL username
  • MYSQL_PASSWORD — MySQL密码 / MySQL password
  • MYSQL_DATABASE — 要连接的数据库名 / Database name
  • DB_CONNECTION_TIMEOUT — 连接超时时间(秒) / Connection timeout (seconds)
  • DB_AUTH_PLUGIN — 认证插件类型 / Auth plugin type

Setting it up

cryptography on PyPI is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Configuration and credentials

You will need one environment variable: MYSQL_HOST. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Choosing this one

Among the database access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. MySQL查询服务器 / MySQL Query Server's toolset — Multi, Cross, Auto and 11 more — is a fair guide to whether it matches your workflow. It is maintained by mangooer; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch MySQL查询服务器 / MySQL Query Server.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the mysql查询服务器 / mysql query server mcp server does with a few real requests.

Available tools

ToolWhat it does
Multilevel SQL risk control & injection protection
Crossdatabase Access Protection**: Blocks unauthorized database access
Autoenable database isolation in production**
HOST服务器监听地址 / Server listen address
PORT服务器监听端口 / Server listen port
MYSQL_HOSTMySQL服务器地址 / MySQL server host
MYSQL_PORTMySQL服务器端口 / MySQL server port
MYSQL_USERMySQL用户名 / MySQL username
MYSQL_PASSWORDMySQL密码 / MySQL password
MYSQL_DATABASE要连接的数据库名 / Database name
DB_CONNECTION_TIMEOUT连接超时时间(秒) / Connection timeout (seconds)
DB_AUTH_PLUGIN认证插件类型 / Auth plugin type
DB_POOL_ENABLED是否启用连接池 / Enable connection pool (true/false)
DB_POOL_MIN_SIZE连接池最小连接数 / Pool min size

How to install the MySQL查询服务器 / MySQL Query Server MCP server

{
  "mcpServers": {
    "mysql-mcp-server-sse": {
      "command": "uvx",
      "args": ["cryptography"],
      "env": {
        "MYSQL_HOST": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
MYSQL_HOSTEndpoint or connection string the server talks to.Optional

Example prompts to try

  • Use MySQL查询服务器 / MySQL Query Server to Multi.
  • Use MySQL查询服务器 / MySQL Query Server to Cross.
  • Use MySQL查询服务器 / MySQL Query Server to Auto.

Frequently asked questions

DELETE without a WHERE clause is classified as CRITICAL risk. You must allow CRITICAL level in the `ALLOWED_RISK_LEVELS` environment variable.