MySQL Database Access MCP Server
@dpflucas
About MySQL Database Access MCP Server
An MCP server provides read-only access to MySQL databases.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mysql-mcp-server": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@dpflucas/mysql-mcp-server",
"--client",
"claude"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MySQL Database Access MCP Server?
This MCP server provides read-only access to MySQL databases, allowing users to list databases, list tables, describe schemas, and execute safe SQL queries. It is designed for AI assistants and tools that need to inspect or query MySQL data without modification.
How to use MySQL Database Access MCP Server?
Install via npm (npm install -g mysql-mcp-server), build from source, or use Smithery. Configure environment variables (MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE) and add the server to your MCP settings file. Once connected, invoke the tools list_databases, list_tables, describe_table, or execute_query with the required parameters.
Key features of MySQL Database Access MCP Server
- Read-only access to MySQL databases
- Query validation against injection and modification
- Query timeout and row limit protection
- Tools: list databases, list tables, describe schema
- Execute SELECT, SHOW, DESCRIBE, EXPLAIN queries
- Advanced connection pool configuration
Use cases of MySQL Database Access MCP Server
- Exploring database structure (tables, schemas) via an AI assistant
- Retrieving read-only data for analysis or reporting
- Inspecting table schemas before integration or migration
- Debugging queries without risk of accidental writes
FAQ from MySQL Database Access MCP Server
What types of queries are allowed?
Only SELECT, SHOW, DESCRIBE, and EXPLAIN statements are permitted. All other statements are blocked for safety.
What environment variables are required?
MYSQL_HOST, MYSQL_PORT, MYSQL_USER are required. MYSQL_PASSWORD and MYSQL_DATABASE are optional but recommended.
How do I install the server?
Install globally from npm (npm install -g mysql-mcp-server), locally in a project, build from source, or use the Smithery CLI.
Are there any limits on queries?
Yes: a query timeout prevents long-running queries, and a row limit prevents excessive data return. The connection pool is also configurable.
Can I write or modify data?
No. The server enforces read-only access; any attempt to execute INSERT, UPDATE, DELETE, or DDL statements is rejected.
Frequently asked questions
What types of queries are allowed?
Only SELECT, SHOW, DESCRIBE, and EXPLAIN statements are permitted. All other statements are blocked for safety.
What environment variables are required?
`MYSQL_HOST`, `MYSQL_PORT`, `MYSQL_USER` are required. `MYSQL_PASSWORD` and `MYSQL_DATABASE` are optional but recommended.
How do I install the server?
Install globally from npm (`npm install -g mysql-mcp-server`), locally in a project, build from source, or use the Smithery CLI.
Are there any limits on queries?
Yes: a query timeout prevents long-running queries, and a row limit prevents excessive data return. The connection pool is also configurable.
Can I write or modify data?
No. The server enforces read-only access; any attempt to execute INSERT, UPDATE, DELETE, or DDL statements is rejected.
Basic information
More Databases MCP servers
MCP Alchemy
runekaagaardA MCP (model context protocol) server that gives the LLM access to and knowledge about relational databases like SQLite, Postgresql, MySQL & MariaDB, Oracle, and MS-SQL.
Neon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases

nuzur
nuzur is a model-first database platform for MySQL and PostgreSQL. The MCP server lets any AI assistant or agent (Claude, Cursor, Gemini, or anything else that speaks MCP) design your schema, query your data, generate mi
MCP MongoDB Server
kiliczshA Model Context Protocol Server for MongoDB
MySQL MCP Server
designcomputerA Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
Comments