mcpField
M
MySQL MCP Server

MySQL MCP Server

Local
github.com/vitalyDVDatabases3Updated 81w ago

About MySQL MCP Server

MySQL MCP Server exposes MySQL database access to MCP clients, for developers querying databases through clients such as Cursor. It offers read-only SQL tools, schema and table listing, plus table data resources capped at 100 rows.

Key features

  1. 01Run restricted read-only SQL queries
  2. 02Retrieve table schemas
  3. 03List database tables
  4. 04Read table data resources

Use cases

  1. 01Query MySQL from an MCP client
  2. 02Inspect a database table schema
  3. 03List tables in a database
  4. 04Read a subset of a specified table

MCP support

The MCP server provides the query, table-schema, and list-tables tools, plus a table://{name} resource. The query tool accepts only SELECT, SHOW, EXPLAIN, and DESCRIBE.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MySQL MCP Server

This project implements an MCP (Model Context Protocol) server for working with MySQL database.

Repository

This project is available on GitHub: https://github.com/vitalyDV/mysql-mcp

Clone the repository
git clone https://github.com/vitalyDV/mysql-mcp.git
cd mysql-mcp
npm install

add config to mcp.json

{
  "mcpServers": {
    "mysql_mcp_readonly": {
      "command": "node",
      "args": [
        "./mysql-mcp/index.js"
      ],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASS": "",
        "MYSQL_DB": "db",
      }
    }
  }
}

Environment Variables

  • MYSQL_HOST - MySQL server host
  • MYSQL_PORT - MySQL server port
  • MYSQL_USER - MySQL username
  • MYSQL_PASS - MySQL password
  • MYSQL_DB - MySQL database name

Available MCP tools

  • query - execute SQL queries (only SELECT, SHOW, EXPLAIN, DESCRIBE)
  • table-schema - get table structure
  • list-tables - get list of all tables in the database

Available MCP resources

  • table://{name} - get data from the specified table (up to 100 rows)

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.