MySQL Server MCP Server
mysql-server MCP 服务器
用于 MySQL 数据库访问的模型上下文协议服务器
这是一个基于 TypeScript 的 MCP 服务器,提供查询 MySQL 数据库的工具。它通过以下方式演示了 MCP 的核心概念:
执行 SQL 查询的工具
通过环境变量连接到 MySQL 数据库
特征
工具
query——执行 SQL 查询将 SQL 查询字符串作为必需参数
返回查询结果
Related MCP server: Angular Bootstrap MCP Server
配置
在 MCP 服务器配置中设置以下环境变量:
MYSQL_HOST:MySQL 服务器主机
MYSQL_USER:MySQL 用户名
MYSQL_PASSWORD:MySQL 密码
MYSQL_DATABASE:MySQL 数据库名称
发展
安装依赖项:
npm install构建服务器:
npm run build对于使用自动重建的开发:
npm run watch安装
要与 Claude Desktop 一起使用,请添加服务器配置:
在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"mysql": {
"command": "/path/to/mysql-server/build/index.js",
"env": {
"MYSQL_HOST": "your-mysql-host",
"MYSQL_USER": "your-mysql-user",
"MYSQL_PASSWORD": "your-mysql-password",
"MYSQL_DATABASE": "your-mysql-database"
}
}
}
}调试
由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:
npm run inspector检查器将提供一个 URL 来访问浏览器中的调试工具。
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityFmaintenanceA TypeScript-based MCP server that enables testing of REST APIs through Cline. This tool allows you to test and interact with any REST API endpoints directly from your development environment.110099MIT
- AlicenseNot gradedqualityDmaintenanceA TypeScript-based MCP server that provides backend API handling and facilitates communication between microservices. Features an organized structure with controllers, routes, and models for easy extensibility and maintenance.3811MIT
- AlicenseNot gradedqualityBmaintenanceA TypeScript/Node.js MCP server that wraps the Metabase REST API, enabling AI agents to execute queries, explore schemas, and build dashboards through structured tool calls.61MIT
- AlicenseNot gradedqualityAmaintenanceA simple MCP server that executes SQL queries on a MariaDB database using a YAML config file.1MIT
Related MCP Connectors
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
MCP server for managing Prisma Postgres.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Appeared in Searches
- Best free MCP for React app with MySQL/MariaDB database
- Information about MySQL database management system
- A service or tool for downloading and installing SDKs for development
- Developing and redeveloping web frontend and Python backend projects, including frontend-backend integration and debugging
- Free PostgreSQL Database Solutions
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/xianzong85/mysql-server-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server