MySQL MCP Server
Description
# MySQL MCP Server A MySQL Model Context Protocol (MCP) server implemented with FastMCP 2.0 and Python. ## Features - Execute SQL queries via MCP functions - Get database schema information - Fully containerized with Docker and docker-compose - Packaged with Poetry for…
About
# MySQL MCP Server A MySQL Model Context Protocol (MCP) server implemented with FastMCP 2.0 and Python. ## Features - Execute SQL queries via MCP functions - Get database schema information - Fully containerized with Docker and docker-compose - Packaged with Poetry for dependency management ## MCP Tools The server…
Details
- Author
- ganganbiz1
- GitHub stars
- 1
- Downloads
- 225
- Categories
- Database
Jump to
- Execute SQL queries and return results via MCP
- Get schema information for tables and entire database
- Fully containerized with Docker and docker-compose
- Packaged with Poetry for dependency management
- Provides five ready-to-use MCP tools
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MySQL MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Deploy using Docker (recommended) or run locally with Poetry. Set environment variables (MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE) to connect to a MySQL instance. For Cursor integration, add the provided configuration to ~/.cursor/mcp.json. The server exposes five MCP tools: execute_query, execute_update, get_tables, get_table_schema, and describe_database.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mysql mcp server": {
"mysql-mcp-server-ganganbiz1": {
"command": "docker",
"args": [
"build",
"-t",
"mysql-mcp-server",
"."
]
}
}
}
}
McpServers
{
"mysql-mcp-server-ganganbiz1": {
"command": "docker",
"args": [
"build",
"-t",
"mysql-mcp-server",
"."
]
}
}
MySQL MCP Server
A MySQL Model Context Protocol (MCP) server implemented with FastMCP 2.0 and Python.
Features
- Execute SQL queries via MCP functions
- Get database schema information
- Fully containerized with Docker and docker-compose
- Packaged with Poetry for dependency management
MCP Tools
The server provides the following MCP tools:
- execute_query: Execute a SQL query and return results
- execute_update: Execute an update/insert SQL query
- get_tables: Get a list of tables in the database
- get_table_schema: Get schema information for a specific table
- describe_database: Get comprehensive database structure information
Setup
Prerequisites
- Docker and docker-compose
- Poetry (for local development)
- Python 3.13+
Cursor Integration
To integrate with Cursor, add the following to your ~/.cursor/mcp.json file:
{
"mcpServers": {
"mysqlMcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MYSQL_HOST",
"-e",
"MYSQL_PORT",
"-e",
"MYSQL_USER",
"-e",
"MYSQL_PASSWORD",
"-e",
"MYSQL_DATABASE",
"mysql-mcp-server"
],
"env": {
"MYSQL_HOST": "host.docker.internal",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root",
"MYSQL_PASSWORD": "password",
"MYSQL_DATABASE": "mcpdb"
}
}
}
}
Docker Build
To build the Docker image separately:
docker build -t mysql-mcp-server .
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



