MySQL MCP Server
@davewind/mysql-mcp-服务器
提供对 Mysql 数据库的只读访问的模型上下文协议 (MCP) 服务器。该服务器使 LLM 能够检查数据库模式并执行只读查询。
主要特点
1.只读数据库访问:通过 SQL 验证和只读事务强制执行只读操作
2.Schema Discovery:自动识别并公开数据库表结构
3.SQL查询执行:提供接受并执行SELECT语句的查询工具
4.模型上下文协议合规性:实现 MCP 规范,与兼容的 LLM 无缝集成
5.配置简单:只需极少的配置即可轻松设置
工具
询问
对连接的数据库执行只读 SQL 查询
输入:
sql(字符串):要执行的 SQL 查询所有查询都在只读事务中执行
资源
服务器为数据库中的每个表提供架构信息:
表模式(
mysql://user:password@localhost:3306/database)每个表的 JSON 架构信息
包括列名和数据类型
从数据库元数据中自动发现
安装
npm install @davewind/mysql-mcp-server -g配置
MCP设置配置文件:
建议使用
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": ["-y", "@davewind/mysql-mcp-server", "mysql://user:password@localhost:port/database"],
}
}
}测试
替换 mysql://user:password@localhost:port/ 和 npm run inspector
"scripts": {
"inspector": "npx @modelcontextprotocol/inspector@0.10.2 build/index.js mysql://user:password@localhost:port/database
}环境
node v18 +
系统架构
MySQL MCP 服务器充当 LLM 和 MySQL 数据库之间的中介,根据模型上下文协议处理请求。
组件交互
组件交互
安全模型
MySQL MCP 服务器实现了严格的安全模型,以确保数据库访问是只读的。
安全措施包括:
1.SQL 查询验证仅允许 SELECT 语句 2.在 READ ONLY 事务中执行所有查询 3.不支持数据修改操作(INSERT、UPDATE、DELETE 等) 4.不支持数据库模式修改(CREATE、ALTER、DROP 等)
与法学硕士 (LLM) 的整合
MySQL MCP 服务器旨在与任何支持模型上下文协议 (MCP) 的 LLM 系统兼容。它遵循 MCP 规范,通过 stdio 上的 JSON-RPC 进行通信。
Related MCP server: MCP Server for MySQL
执照
麻省理工学院
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.
This server cannot be installed
Maintenance
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
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
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.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA Model Context Protocol server that provides read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.15,0852,091MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server providing read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.191MIT
- 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.15,085MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server providing read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.4541MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/dave-wind/mysql-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server