- Home
- MCP servers
- MySQL
MySQL
- typescript
18
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can run the MySQL MCP Server to let AI agents interact with MySQL databases through a structured, protocol-driven interface. It supports both a local stdio execution mode and a remote HTTP-enabled server, enabling safe querying, schema inspection, and database navigation from AI prompts or automation pipelines.
How to use
Connect an MCP client to the server to perform common database operations. You can run the server locally and point your client to the stdio command, or use the published remote server to access a hosted MCP endpoint. Once connected, you can query data, inspect table structures, list databases and tables, switch databases, and monitor connection status in real time.
How to install
# Global installation
npm install -g mysql-mcp
# Local installation
npm install mysql-mcp
Additional sections
Configuration, security, and usage notes help you run the server safely and efficiently. You will set up connection details for your MySQL instance, choose a transport mode, and manage authentication for your MCP client integrations.
Configuration details to copy into your client or deployment environment include the MySQL connection parameters and any access controls you wish to enforce, such as read-only mode for safe data exploration.
Available tools
status
Check the current MySQL connection status, including host, port, database, and user if connected.
connect
Establish a connection to a MySQL database with optional host, port, user, password, and database parameters.
disconnect
Close the active MySQL connection and release resources.
query
Execute an SQL query against the connected database and return results or an error.
list_tables
Retrieve a list of all tables in the current database.
describe_table
Return the structure of a specified table, including columns and types.
list_databases
List all databases accessible from the connected server.
use_database
Switch the active database context to a different one.