MySQL Database Access MCP Server

by allizwellai

207 downloads
Not rated
GitHub

About

<a href="https://glama.ai/mcp/servers/@dpflucas/mysql-mcp-server"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@dpflucas/mysql-mcp-server/badge" alt="mysql-mcp-server MCP server" /> </a> [![npm…

Details

Author
allizwellai
Downloads
207
Categories
Database

- Read‑only access: only SELECT, SHOW, DESCRIBE, and EXPLAIN allowed
- Query validation prevents SQL injection and data modification
- Query timeout prevents long‑running resource consumption
- Row limit prevents excessive data return
- Lists accessible databases, tables, and table schemas

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MySQL Database Access MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install globally via npm (npm install -g mysql-mcp-server) or build from source, then configure environment variables (MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE) and add the server configuration to your MCP settings file. Use the provided tools: list_databases, list_tables, describe_table, and execute_query.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mysql database access mcp server": {
            "mysql": {
                "command": "npx",
                "args": [
                    "mysql-mcp-server"
                ],
                "env": {
                    "MYSQL_HOST": "",
                    "MYSQL_PORT": "",
                    "MYSQL_USER": "",
                    "MYSQL_PASSWORD": "",
                    "MYSQL_DATABASE": ""
                }
            }
        }
    }
}

McpServers

{
    "mysql": {
        "command": "npx",
        "args": [
            "mysql-mcp-server"
        ],
        "env": {
            "MYSQL_HOST": "",
            "MYSQL_PORT": "",
            "MYSQL_USER": "",
            "MYSQL_PASSWORD": "",
            "MYSQL_DATABASE": ""
        }
    }
}

MySQL Database Access MCP Server

This MCP server provides read-only access to MySQL databases. It allows you to:

- List available databases
- List tables in a database
- Describe table schemas
- Execute read-only SQL queries

Security Features

- Read-only access: Only SELECT, SHOW, DESCRIBE, and EXPLAIN statements are allowed
- Query validation: Prevents SQL injection and blocks any data modification attempts
- Query timeout: Prevents long-running queries from consuming resources
- Row limit: Prevents excessive data return

Installation

1. Install using one of these methods:

Install from NPM

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.