MySQL MCP
Enables management of multiple MySQL database connections with support for executing SQL queries, natural language queries, listing databases, and exploring database schemas through a central metadata system.
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 MCPlist all tables in the customers 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 (Management Control Plane)
A system for managing multiple MySQL databases with natural language query support, built with FastMCP framework.
Features
Manage multiple MySQL database connections
Store metadata about all managed databases in a central metadata database
Query data using natural language
Built with FastMCP framework for easy integration with AI assistants
Related MCP server: MySQL MCP Server
Installation
Install Python 3.7+
Install required packages:
pip install -r requirements.txt
Setup
Create a MySQL database for storing metadata:
mysql -u root -p < init_metadata_db.sqlUpdate
config.iniwith your metadata database connection details:[metadata_db] host = localhost port = 3306 user = your_username password = your_password database = metadata_dbAdd your database connections to the metadata database using the provided SQL schema.
Usage
Run the FastMCP server:
python mysql_mcp_server.pyOnce the server is running, you can access the SSE endpoint at:
http://localhost:8000/sseThe server exposes the following tools:
list_databases()- List all registered databasesexecute_query(database_id, query)- Execute a SQL query on a specific databasenatural_language_query(database_id, natural_query)- Execute a natural language query on a specific databaseget_database_tables(database_id)- Get list of tables in a specific database
Configuration
All configuration is stored in config.ini:
metadata_db: Connection details for the metadata databaseapp: Application settings
Architecture
mysql_mcp_server.py: FastMCP server implementationdb_manager.py: Database connection and management logicnlp_processor.py: Natural language processing to convert queries to SQLdatabase_models.py: Data classes representing database entitiesconfig.ini: Configuration fileinit_metadata_db.sql: Schema for the metadata databaserequirements.txt: Python dependencies
Extending the System
To improve natural language processing capabilities:
Enhance the
natural_language_queryfunction inmysql_mcp_server.pyAdd more patterns to recognize different query types
Consider integrating with advanced NLP libraries like spaCy or NLTK
Integration with AI Assistants
This FastMCP server can be integrated with AI assistants that support the Model Context Protocol (MCP), allowing them to:
List available databases
Execute SQL queries
Process natural language queries
Explore database schemas
This server cannot be installed
Maintenance
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
- Flicense-qualityDmaintenanceEnables secure interaction with MySQL databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.Last updated
- AlicenseBqualityDmaintenanceEnables AI assistants to manage MySQL databases through natural language commands. Supports database operations, table management, data queries, and import/export functionality with built-in security features.Last updated15331MIT
- AlicenseAqualityCmaintenanceEnables interaction with MySQL databases (including AWS RDS and cloud instances) through natural language. Supports database connections, query execution, schema inspection, and comprehensive database management operations.Last updated8518MIT
- Alicense-qualityCmaintenanceEnables AI assistants to securely connect to and manage MySQL databases with support for multiple database connections, complete CRUD operations, schema inspection, and dynamic connection management through natural language.Last updated3980MIT
Related MCP Connectors
GibsonAI MCP server: manage your databases with natural language
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Connect to PlanetScale databases, branches, schema, query insights, and execute SQL
Appeared in Searches
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/ideaxy/mysql-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server