MySQL MCP Server
Provides tools for executing SQL queries with prepared statements, listing tables, describing table schemas, and retrieving table statistics including row counts and sizes.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MySQL MCP Server
Model Context Protocol server for MySQL database access.
Features
Execute SQL queries with prepared statements
List database tables
Describe table schemas
Get table statistics (row counts, sizes)
Connection pooling for performance
Installation
npm install
npm run buildConfiguration
Configure via environment variables:
MYSQL_HOST- MySQL server hostname (default: localhost)MYSQL_PORT- MySQL server port (default: 3306)MYSQL_USER- MySQL username (default: root)MYSQL_PASS- MySQL password (default: empty)MYSQL_DB- MySQL database name (default: empty)
Usage with Claude Code
Add to .claude/.mcp.json:
{
"mcpServers": {
"mysql": {
"command": "node",
"args": [
"/path/to/mysql-mcp-server/dist/server.js"
],
"env": {
"MYSQL_HOST": "your-host",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your-user",
"MYSQL_PASS": "your-password",
"MYSQL_DB": "your-database"
}
}
}
}Available Tools
mysql_query
Execute any SQL query with optional prepared statement parameters.
Example:
SELECT * FROM users WHERE id = ?mysql_show_tables
List all tables in the current database.
mysql_describe_table
Get the schema/structure of a specific table.
mysql_table_info
Get detailed table information including row counts and sizes.
License
MIT
This server cannot be deployed
Related MCP Connectors
Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.
PostgreSQL, MySQL, OpenAPI/Swagger, and shared Agent Memory with scoped access.
Connect to PlanetScale databases, branches, schema, query insights, and execute SQL
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.