mysql-server MCP Server
by xianzong85
This is a TypeScript-based MCP server that provides tools for querying MySQL databases. It demonstrates core MCP concepts by providing tools for executing SQL queries and connecting to MySQL databases via environment variables.
Last updated: N/A
What is mysql-server MCP Server?
A Model Context Protocol (MCP) server for accessing MySQL databases. It allows executing SQL queries against a MySQL database using the MCP protocol.
How to use mysql-server MCP Server?
- Install dependencies using
npm install
. 2. Build the server usingnpm run build
. 3. Configure the server by setting the environment variables (MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE). 4. Add the server configuration to Claude Desktop's config file (claude_desktop_config.json). 5. Use thequery
tool to execute SQL queries.
Key features of mysql-server MCP Server
Execute SQL queries
Connect to MySQL databases via environment variables
TypeScript-based implementation
MCP protocol support
Use cases of mysql-server MCP Server
Querying data from MySQL databases
Integrating MySQL databases with applications that support MCP
Building custom database access tools
Automating database tasks
FAQ from mysql-server MCP Server
What is MCP?
What is MCP?
Model Context Protocol is a protocol for communication between applications.
What environment variables are required?
What environment variables are required?
MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, and MYSQL_DATABASE are required.
How do I debug the server?
How do I debug the server?
Use the MCP Inspector by running npm run inspector
.
Where is the Claude Desktop config file located?
Where is the Claude Desktop config file located?
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
. On Windows: %APPDATA%/Claude/claude_desktop_config.json
What tool is available?
What tool is available?
The query
tool is available to execute SQL queries.