Cover image
Try Now
2025-03-27

MESQL数据库的MCP服务器

3 years

Works with Finder

1

Github Watches

0

Github Forks

5

Github Stars

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

Using NPM

npm install @modelcontextprotocol/server-mysql

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.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Andris Teikmanis
  • Latvian GPT assistant for developing GPT applications

  • https://hubeiqiao.com
  • IT problem solver with clear, step-by-step guidance.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Navid RezaeiSarchoghaei
  • Professional Flask/SQLAlchemy code guide. Follow: https://x.com/navid_re

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • https://cantaspinar.com
  • Summarizes videos and answers related questions.

  • Khalid kalib
  • Write professional emails

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • oatpp
  • Anthropic的模型上下文协议实现了燕麦++

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • zhaoyunxing92
  • MCP(消息连接器协议)服务

    Reviews

    4 (1)
    Avatar
    user_ELP5AykN
    2025-04-15

    As a dedicated user of the mcp app, I am highly impressed with the Huoshan Test product. It seamlessly integrates with my existing setup and provides exceptional performance. The ease of use and intuitive design make it a must-have for anyone needing reliable testing solutions. Kudos to the mcp team for developing such a robust and efficient tool! You can check it out here: https://mcp.so/server/server/mcp