Easy MCP Server

High performance MySQL MCP Server using mysql2

Local serverstdioTypeScript

What is the Easy MCP Server?

High performance MySQL MCP Server using mysql2

What the server does

A lightweight Model Context Protocol (MCP) server that lets AI assistants inspect and query a MySQL database through a safe, structured tool interface.

  • MySQL connection pooling powered by mysql2/promise
  • Read-only query tool for data retrieval
  • Execute tool for data modification statements
  • Batch execution and CSV import/export helpers
  • Schema discovery tools for tables, views, indexes, and triggers
  • Query plan inspection with EXPLAIN

Credentials and setup notes

  • Node.js 20 or newer - npm - A reachable MySQL-compatible database

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
mysql_manualReturn the built-in manual. Use this first when you are unsure how to use MySQL tools or need help diagnosing an operation error
mysql_queryExecute a SQL query intended for data retrieval, such as SELECT
mysql_executeExecute a data modification statement, such as INSERT, UPDATE, or DELETE
mysql_schema_executeExecute schema modification statements in advanced mode, such as CREATE TABLE, ALTER TABLE, CREATE VIEW, CREATE TRIGGER, and CREATE INDEX
mysql_batch_executeExecute one data modification statement repeatedly with multiple parameter sets
mysql_import_csvImport a UTF-8 CSV file into a table using the header row as column names
mysql_export_csvExport all rows from a table to a UTF-8 CSV file
explain_queryRun EXPLAIN for a SQL query and return the execution plan
list_tablesList base tables in the current database, including approximate row counts and comments
list_viewsList views in the current database
describe_tableShow column information for one or more tables
describe_indexShow indexes for a table
list_triggersList triggers in the current database
get_current_privilegesShow the current MySQL user and grants

How to install the Easy MCP Server

{
  "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.

Configuration

  • Node.js 20 or newer - npm - A reachable MySQL-compatible database
VariableDescriptionRequired
MYSQL_HOSTEndpoint or connection string the server talks to.Optional
MYSQL_PORTConfiguration value read at startup.Optional
MYSQL_USERConfiguration value read at startup.Optional
MYSQL_PASSWORDConfiguration value read at startup.Optional
MYSQL_DATABASEConfiguration value read at startup.Optional
MYSQL_LOG_PATHFilesystem location the server is allowed to use.Optional
TEST_HOSTEndpoint or connection string the server talks to.Optional

Example prompts to try

  • “Use Easy to mysql manual.”
  • “Use Easy to mysql query.”
  • “Use Easy to mysql execute.”

Frequently asked questions

High performance MySQL MCP Server using mysql2 Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.