Skip to main content
Glama
yuru-sha

MCP MySQL Server

by yuru-sha

mcp-服务器-mysql

CI 状态 铁匠徽章

MySQL 数据库的模型上下文协议服务器。该服务器使 LLM 能够检查数据库模式并执行只读查询。

特征

  • 对 MySQL 数据库的只读访问

  • 模式检查功能

  • 只读事务内的安全查询执行

  • Docker 支持

  • NPM 包可用

Related MCP server: MySQL MCP Server

安装

使用 Docker

# Build the Docker image
make docker

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

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 MySQL 数据库服务器:

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

用法

使用 Claude Desktop

将以下配置添加到您的claude_desktop_config.json

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

注意:在 macOS 上使用 Docker 时,如果 MySQL 服务器在主机网络上运行,请使用host.docker.internal

连接 URL 格式

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

/database替换为您的数据库名称。

发展

# Initial setup
make setup

# Build the project
make build

# Format code
make format

# Run linter
make lint

执照

该项目根据MIT 许可证发布。

安全

此服务器强制执行只读访问以保护您的数据库。所有查询均在只读事务中执行。

为了增强安全性,我们建议创建只读用户。

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables read-only access to MySQL databases through natural language queries. Provides automatic table schema discovery and executes SELECT, SHOW, DESCRIBE, and EXPLAIN statements within secure read-only transactions.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables safe interaction with MySQL databases through SELECT queries, table structure inspection, and database schema exploration. Provides read-only access to query data and examine database metadata.
    1
    -
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to inspect and query a MySQL database through safe, structured tools, including schema discovery and read-only queries.
    9
    89
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to securely interact with MySQL databases, including listing tables, viewing schemas, and executing read-only SQL queries through natural language.
    6
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yuru-sha/mcp-server-mysql'

If you have feedback or need assistance with the MCP directory API, please join our Discord server