Easy MCP Server

High performance MySQL MCP Server using mysql2

Local serverstdioTypeScript

What is the Easy MCP server?

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.

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

Available tools

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 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

Installation

Installation 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.

Credentials and setup notes

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.

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

Where it fits

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.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Easy.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

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

It connects Easy to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (mysql_manual, mysql_query, mysql_execute, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Easy directly.