MCP.so
登录

MySQL Database Access MCP Server

@allizwellai

基本信息

分类

数据库

最近更新

许可证

MIT license

传输方式

stdio

作者

allizwellai

关于 MySQL Database Access MCP Server

暂无概览

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?

MySQL Database Access MCP Server provides read-only access to MySQL databases via the Model Context Protocol. It lets you list databases, list tables, describe table schemas, and execute read-only SQL queries. This server is designed for developers and AI agents who need to inspect MySQL schemas and query data without risk of modification.

How to use MySQL Database Access MCP Server?

Install globally via npm (npm install -g mysql-mcp-server) or build from source, then configure environment variables (MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE) and add the server configuration to your MCP settings file. Use the provided tools: list_databases, list_tables, describe_table, and execute_query.

Key features of MySQL Database Access MCP Server

  • Read‑only access: only SELECT, SHOW, DESCRIBE, and EXPLAIN allowed
  • Query validation prevents SQL injection and data modification
  • Query timeout prevents long‑running resource consumption
  • Row limit prevents excessive data return
  • Lists accessible databases, tables, and table schemas

Use cases of MySQL Database Access MCP Server

  • Exploring database structure without direct SQL access
  • Running analytical SELECT queries through an AI assistant
  • Verifying table schemas and column definitions
  • Auditing read‑only access for security‑sensitive environments

常见问题

1

What operations does MySQL Database Access MCP Server support?

It supports listing databases, listing tables, describing table schemas, and executing read‑only SQL queries (SELECT, SHOW, DESCRIBE, EXPLAIN).

2

How do I install and configure the server?

Install from npm (`npm install -g mysql-mcp-server`) or build from source. Set environment variables for your MySQL connection (host, port, user, password, database) and add the server to your MCP settings file.

3

Can I modify data with this server?

No. The server enforces read‑only access; only SELECT, SHOW, DESCRIBE, and EXPLAIN statements are allowed. Data modification attempts are blocked.

4

What environment variables are required?

`MYSQL_HOST`, `MYSQL_PORT`, and `MYSQL_USER` are required. `MYSQL_PASSWORD` is optional but recommended. `MYSQL_DATABASE` is optional.

5

What happens if a query takes too long or returns too many rows?

The server has a query timeout to prevent long‑running queries from consuming resources and a row limit to prevent excessive data return.

评论

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