MySQL MCP Server
This server provides tools to interact with a MySQL database, allowing you to inspect its structure and execute both read-only and write queries.
Check MySQL version (
select_mysql_version): Returns the version of the connected MySQL server.List tables (
list_tables): Lists all tables in the connected database.Describe table (
describe_table): Shows columns, data types, and constraints for a given table.Execute read-only queries (
query): RunsSELECTstatements with support for optional parameterized inputs (?placeholders).Execute write queries (
mutate): RunsINSERT,UPDATE, orDELETEstatements with optional parameterized inputs. Note:SELECTstatements are explicitly rejected by this tool.
Allows connecting to a MySQL database to inspect schema, list tables, describe columns, and run read/write queries.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MySQL MCP Serverlist all tables in the database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MySQL MCP Server
A Model Context Protocol (MCP) server that connects Claude (or any MCP-compatible client) to a MySQL database. It exposes tools for schema inspection and running read/write queries over a stdio transport.
Tools
Tool | Description |
| Returns the connected MySQL server version |
| Lists all tables in the connected database |
| Shows columns, types, and constraints for a given table |
| Runs a read-only |
| Runs an |
Note:
mutaterejectsSELECTstatements — usequeryfor reads.
Related MCP server: mcp-mysql-server
Requirements
Node.js 18+
A running MySQL instance
Quick Install (Recommended)
1. Download the plugin
Go to the Releases page and download the latest .mcpb file (e.g. mysql-mcp-server-v1.0.1.mcpb).
2. Install the plugin
Via Claude Code CLI:
claude plugin install mysql-mcp-server-v1.0.1.mcpbVia Claude Desktop:
Double-click the .mcpb file — Claude Desktop will prompt you to install it.
3. Configure your database connection
After installation, Claude will prompt you to fill in your connection details:
Field | Default | Description |
Database Host |
| MySQL hostname or IP |
Database Port |
| MySQL port |
Database User |
| MySQL username |
Database Password | (empty) | MySQL password |
Database Name | (required) | Database to connect to |
Connection Pool Limit |
| Max concurrent connections |
You can update these settings at any time in Claude's plugin settings under MySQL MCP Server.
Manual Setup (from source)
1. Clone and install dependencies
git clone https://github.com/iamdylanngo/mysql-mcp-server
cd mcp
npm install2. Configure environment
Copy the sample env file and fill in your database credentials:
cp .env.sample .envDB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=root
DB_PASSWORD=root
DB_NAME=mydb
DB_POOL_LIMIT=103. Build
npm run buildUsage
Run directly
node --env-file=.env build/index.jsInspect with MCP Inspector
npm run mcpConnect to Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"mysql": {
"command": "node",
"args": ["/[absolute-path]/mysql-mcp-server/build/index.js"],
"env": {
"DB_HOST": "127.0.0.1",
"DB_PORT": "3306",
"DB_USER": "root",
"DB_PASSWORD": "your_password",
"DB_NAME": "your_database",
"DB_POOL_LIMIT": "10"
}
}
}
}Environment Variables
Variable | Default | Description |
|
| MySQL host |
|
| MySQL port |
|
| MySQL user |
| (empty) | MySQL password |
|
| Database name |
|
| Connection pool size |
Tech Stack
MCP SDK — MCP server framework
mysql2 — MySQL client with promise support
Zod — Input schema validation
TypeScript
License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/iamdylanngo/mysql-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server