- Home
- MCP servers
- MySQL
MySQL
- javascript
11
GitHub Stars
javascript
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.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"dave-wind-mysql-mcp-server": {
"command": "npx",
"args": [
"-y",
"@davewind/mysql-mcp-server",
"mysql://user:password@localhost:port/database"
]
}
}
}You can grant LLMs read-only access to your MySQL databases through a Model Context Protocol (MCP) server. This server discovers database schemas, validates and runs only read-only queries, and exposes a safe surface for schema inspection and SELECT-based queries, making it easier for AI systems to reason about data without modifying it.
How to use
Connect to the MySQL MCP Server from your MCP client to inspect schemas and run read-only queries. You can explore each table’s structure, see column data types, and execute SELECT statements within a READ ONLY transaction. All queries are restricted to read-only operations, so you can safely let LLMs explore data without risking modification.
How to install
Prerequisites you need before installing:
- Node.js v18 or newer should be installed on your system.
Install the MCP server package globally so you can run it from anywhere on your machine.
Configure your MCP client to point to the server using the provided MCP command and database URL.
Configuration and startup example
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": ["-y", "@davewind/mysql-mcp-server", "mysql://user:password@localhost:port/database"]
}
}
}
Additional steps
- Ensure your MySQL instance is reachable at the provided host/port and that the credentials in the URL have read-only access. 2) If you want to test integration, you can use a separate inspector tool or MCP client to verify that schema information and SELECT-enabled queries are returned correctly. 3) Review security settings to confirm that only SELECT statements are allowed and that read-only transactions are used for all queries.
Installation notes
The server supports a simple configuration approach. You can specify a single MCP server that runs via a local command (npx) and points at your MySQL database URL. This setup enables rapid experimentation and safe, read-only access for LLMs.
Security and compliance
Access is strictly read-only. The server validates SQL to allow only SELECT statements, executes all queries inside READ ONLY transactions, and does not support data modifications or schema mutations. This keeps data safe while enabling model-context-driven analysis.
Integration with LLMs
The MCP server is designed to work with any LLM system that supports the Model Context Protocol. It communicates through JSON-RPC over stdio and exposes the database schema and read-only query capabilities to the LLM for reasoning and data retrieval.
License
MIT
Available tools
query
Execute read-only SQL queries against the connected database. Each query runs inside a READ ONLY transaction and accepts a single input parameter: sql (the SQL query string).