MySQL Database Bridge
STDIOMCP server enabling AI models to interact with MySQL databases through structured interface.
MCP server enabling AI models to interact with MySQL databases through structured interface.
A Model Context Protocol (MCP) server for MySQL databases that enables AI models to interact with MySQL databases through a structured interface.
The MySQL MCP Server provides a bridge between AI models and MySQL databases, allowing AI agents to query and analyze MySQL data. This implementation follows the Model Context Protocol specification and offers both web server and CLI modes of operation.
# Global installation npm install -g mysql-mcp # Local installation npm install mysql-mcp
The MySQL MCP Server is published on Smithery.ai and can be easily used with various AI assistants:
Access the server: Visit https://smithery.ai/server/@sussa3007/mysql-mcp
Configure the server:
Connect with supported AI platforms:
Authentication: Login to Smithery.ai to save your configuration and generate authentication tokens.
Use in AI prompts: Once connected, you can utilize MySQL tools in your AI conversations by asking the assistant to perform database operations.
To use a locally developed version:
npm link
in your project directory{ "mcpServers": { "mysql": { "command": "node", "args": ["mysql-mcp"], "env": { "MYSQL_HOST": "localhost", "MYSQL_PORT": "3306", "MYSQL_USER": "root", "MYSQL_PASSWORD": "your_password", "MYSQL_DATABASE": "your_database", "MYSQL_READONLY": "true" } } } }
Check the current database connection status.
Connect to a MySQL database.
Close the current MySQL database connection.
Execute an SQL query on the connected database.
Get a list of tables in the current database.
Get the structure of a specific table.
Get a list of all accessible databases on the server.
Switch to a different database.
mysql, mcp, database, ai, model context protocol
MIT