MCP Server for MySQL
基于 NodeJS 的 MySQL MCP 服务器

提供对 MySQL 数据库的只读访问的模型上下文协议 (MLM) 服务器。该服务器使 LLM 能够检查数据库架构并执行只读查询。
成分
工具
mysql_query
对连接的数据库执行只读 SQL 查询
输入:
sql(字符串):要执行的 SQL 查询所有查询都在只读事务中执行
资源
服务器为数据库中的每个表提供架构信息:
表模式
每个表的 JSON 架构信息
包括列名和数据类型
从数据库元数据中自动发现
Related MCP server: MCP Server for MySQL
与 Claude Desktop 一起使用
要将此服务器与 Claude Desktop 应用程序一起使用,请将以下配置添加到claude_desktop_config.json的“mcpServers”部分:
{
"mcpServers": {
"mcp_server_mysql": {
"command": "npx",
"args": [
"-y",
"@benborla29/mcp-server-mysql",
],
"env": {
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root",
"MYSQL_PASS": "",
"MYSQL_DB": "db_name"
}
}
}
}将/db_name替换为您的数据库名称或将其留空以检索所有数据库。
故障排除
如果遇到错误“无法连接到 MCP 服务器 mcp-server-mysql”,您可能需要明确设置所有必需二进制文件的路径,例如以下配置:
{
"mcpServers": {
"mcp_server_mysql": {
"command": "/path/to/npx/binary/npx",
"args": [
"-y",
"@benborla29/mcp-server-mysql",
],
"env": {
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root",
"MYSQL_PASS": "",
"MYSQL_DB": "db_name"
"PATH": "/path/to/node/bin:/usr/bin:/bin" <-- Add this
}
}
}
}执照
此 MCP 服务器采用 MIT 许可证。这意味着您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。更多详情,请参阅项目仓库中的 LICENSE 文件。
This server cannot be deployed
Maintenance
Related MCP Connectors
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The HubSpot MCP Server acts as a bridge that enables AI assistants and Large Language Models to securely interact with HubSpot CRM data through natural conversation, without requiring users to understand complex API structures. It provides read-only access to standard CRM objects (contacts, companies, deals, tickets, products, invoices, and more) and their associations, secured via OAuth 2.0, allowing AI agents to perform tasks like summarizing deals, fetching company updates, and looking up record changes.
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.14,187 npm2,157MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server providing read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.6 npm1MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server providing read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.730 npm1MIT
- AlicenseNot gradedqualityDmaintenanceA server that provides LLMs with read-only access to MySQL databases, allowing them to inspect database schemas and execute read-only queries.48 npm16MIT