High performance MySQL MCP Server using mysql2
If you already use Easy, the easy mcp server is the piece that lets your assistant work with it directly. High performance MySQL MCP Server using mysql2.
A lightweight Model Context Protocol (MCP) server that lets AI assistants inspect and query a MySQL database through a safe, structured tool interface.
The toolset is worth reading before you wire it up, because it tells you what the integration is really for:
mysql_manual — Return the built-in manual. Use this first when you are unsure how to use MySQL tools or need help diagnosing an operation errormysql_query — Execute a SQL query intended for data retrieval, such as SELECTmysql_execute — Execute a data modification statement, such as INSERT, UPDATE, or DELETEmysql_schema_execute — Execute schema modification statements in advanced mode, such as CREATE TABLE, ALTER TABLE, CREATE VIEW, CREATE TRIGGER, and CREATE INDEXmysql_batch_execute — Execute one data modification statement repeatedly with multiple parameter setsmysql_import_csv — Import a UTF-8 CSV file into a table using the header row as column namesmysql_export_csv — Export all rows from a table to a UTF-8 CSV fileexplain_query — Run EXPLAIN for a SQL query and return the execution planlist_tables — List base tables in the current database, including approximate row counts and commentslist_views — List views in the current databasedescribe_table — Show column information for one or more tablesdescribe_index — Show indexes for a tableInstallation goes through your MCP client rather than a global install: point it at easy-mysql-mcp on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
Configuration is passed through the environment: MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE, MYSQL_LOG_PATH, TEST_HOST. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
Among the database access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Easy's toolset — mysql_manual, mysql_query, mysql_execute and 11 more — is a fair guide to whether it matches your workflow. It is maintained by chenkumi; worth a glance at recent repository activity before you build anything load-bearing on it.
SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.
| Tool | What it does |
|---|---|
| mysql_manual | Return the built-in manual. Use this first when you are unsure how to use MySQL tools or need help diagnosing an operation error |
| mysql_query | Execute a SQL query intended for data retrieval, such as SELECT |
| mysql_execute | Execute a data modification statement, such as INSERT, UPDATE, or DELETE |
| mysql_schema_execute | Execute schema modification statements in advanced mode, such as CREATE TABLE, ALTER TABLE, CREATE VIEW, CREATE TRIGGER, and CREATE INDEX |
| mysql_batch_execute | Execute one data modification statement repeatedly with multiple parameter sets |
| mysql_import_csv | Import a UTF-8 CSV file into a table using the header row as column names |
| mysql_export_csv | Export all rows from a table to a UTF-8 CSV file |
| explain_query | Run EXPLAIN for a SQL query and return the execution plan |
| list_tables | List base tables in the current database, including approximate row counts and comments |
| list_views | List views in the current database |
| describe_table | Show column information for one or more tables |
| describe_index | Show indexes for a table |
| list_triggers | List triggers in the current database |
| get_current_privileges | Show the current MySQL user and grants |
{
"mcpServers": {
"easy-mysql-mcp": {
"command": "npx",
"args": ["-y", "easy-mysql-mcp"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "YOUR USERNAME",
"MYSQL_PASSWORD": "YOUR PASSWORD",
"MYSQL_DATABASE": "YOUR DB NAME"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| MYSQL_HOST | Endpoint or connection string the server talks to. | Optional |
| MYSQL_PORT | Configuration value read at startup. | Optional |
| MYSQL_USER | Configuration value read at startup. | Optional |
| MYSQL_PASSWORD | Configuration value read at startup. | Optional |
| MYSQL_DATABASE | Configuration value read at startup. | Optional |
| MYSQL_LOG_PATH | Filesystem location the server is allowed to use. | Optional |
| TEST_HOST | Endpoint or connection string the server talks to. | Optional |
Read-only SQL access to Postgres — let your assistant inspect schemas and answer questions from real data.
Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Metabase ships its own MCP endpoint — search your BI content, build and run queries, and save questions and dashboards without leaving the chat.
Official MongoDB server covering data, schemas and Atlas management — from find queries to spinning up clusters.
Serverless Postgres with database branching — point your assistant at Neon and let it work on disposable copies.