About MySQL MCP Server
A MySQL MCP server that lets MCP clients inspect database tables and schemas and run read-only SQL queries. It uses connection pooling for database connections.
Key features
- 01List database tables
- 02View table schemas
- 03Run read-only SQL queries
- 04Pool database connections
Use cases
- 01Inspect available tables and schemas
- 02Run read-only queries against MySQL
MCP support
Exposes MySQL table and schema inspection and read-only query capabilities to MCP clients. The server starts when initialized by the MCP system.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMySQL MCP Server
A Model Context Protocol (MCP) server that provides MySQL database access functionality.
Features
- List database tables and their schemas
- Execute read-only SQL queries
- Secure connection handling with connection pooling
Installation
- Clone this repository
- Install dependencies:
npm install
- Build the project:
npm run build
Configuration
Set the following environment variables:
MYSQL_HOST: MySQL server hostMYSQL_PORT: MySQL server portMYSQL_USER: MySQL usernameMYSQL_PASS: MySQL passwordMYSQL_DB: MySQL database nameMYSQL_SOCKET: MySQL socket path (alternative to host/port)MYSQL_POOL_LIMIT: Connection pool limit (default: 10)
Usage
The server will automatically start when the MCP system initializes it. You can then use the provided tools and resources through the MCP interface.
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.