MCP.so
登录

MySQL Database Access MCP Server

@MCP-Mirror

基本信息

分类

数据库

许可证

MIT license

传输方式

stdio

作者

MCP-Mirror

关于 MySQL Database Access MCP Server

Mirror of

MySQL Database Access MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": [
        "mysql-mcp-server"
      ],
      "env": {
        "MYSQL_HOST": "",
        "MYSQL_PORT": "",
        "MYSQL_USER": "",
        "MYSQL_PASSWORD": "",
        "MYSQL_DATABASE": ""
      }
    }
  }
}

MySQL Database Access MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

点击上方按钮,在临时沙箱中运行此服务器并实时获取工具列表。

概览

What is MySQL Database Access MCP Server?

This MCP server provides read-only access to MySQL databases. It allows listing databases, listing tables, describing table schemas, and executing read-only SQL queries. It is designed for developers who need safe, read-only database exploration and querying via the Model Context Protocol.

How to use MySQL Database Access MCP Server?

Install globally via npm install -g mysql-mcp-server or locally. Configure environment variables (MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE). Add the server to your MCP settings file using either npx mysql-mcp-server (npm install) or node /path/to/build/index.js (build from source).

Key features of MySQL Database Access MCP Server

  • Read-only access: only SELECT, SHOW, DESCRIBE, EXPLAIN allowed
  • Query validation prevents SQL injection and data modification
  • Query timeout prevents long-running queries
  • Row limit prevents excessive data return
  • Tools: list_databases, list_tables, describe_table, execute_query

Use cases of MySQL Database Access MCP Server

  • Exploring database structure (list tables, describe schemas)
  • Running safe, read-only analytics queries
  • Integrating MySQL data with AI assistants via MCP
  • Checking database content without write risk

常见问题

1

What dependencies does this server require?

Node.js and npm. A MySQL database server accessible via the provided credentials is also required.

2

How is authentication handled?

Authentication uses environment variables: `MYSQL_USER`, `MYSQL_PASSWORD`, and optionally `MYSQL_HOST` and `MYSQL_PORT`.

3

What security restrictions are in place?

Only SELECT, SHOW, DESCRIBE, and EXPLAIN statements are allowed. Query validation blocks injection and data modification attempts. A query timeout and row limit protect resources.

4

Do I need to set up a MySQL user with specific permissions?

Yes. Your MySQL user must have appropriate permissions to list databases, list tables, describe schemas, and execute read-only queries on the target databases.

5

Can I modify data through this server?

No. The server enforces strict read-only access; any attempt to execute INSERT, UPDATE, DELETE, or other modification statements will be rejected.

评论

数据库 分类下的更多 MCP 服务器