Skip to main content
Glama
myexperimenthub

local-mysql

Local MySQL MCP Server

This is a small read-only MCP server for a MySQL database running on your machine.

1. Install dependencies

cd C:\Users\ADMIN\Documents\1st\mysql-mcp
npm.cmd install

Related MCP server: MySQL MCP Server

2. Create a restricted MySQL user

Run this in MySQL, replacing the database name and password:

CREATE USER 'mcp_reader'@'localhost' IDENTIFIED BY 'strong_password_here';
GRANT SELECT, SHOW VIEW ON your_database.* TO 'mcp_reader'@'localhost';
FLUSH PRIVILEGES;

Avoid using root for MCP access.

3. Configure your MCP client

Use this server command in your MCP client configuration:

{
  "mcpServers": {
    "local-mysql": {
      "command": "node",
      "args": [
        "C:\\Users\\ADMIN\\Documents\\1st\\mysql-mcp\\src\\index.js"
      ],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "mcp_reader",
        "MYSQL_PASSWORD": "strong_password_here",
        "MYSQL_DATABASE": "your_database",
        "MYSQL_MAX_ROWS": "200"
      }
    }
  }
}

Tools

  • query: runs one read-only SQL statement.

  • list_databases: lists databases visible to the MySQL user.

  • list_tables: lists tables in the configured database or a named database.

  • describe_table: shows column metadata for a table.

Current database snapshot

The configured product_db database currently includes these tables:

  • categories

  • customers

  • orders

  • products

  • suppliers

Customer chart

A customer order-count pie chart is available at:

..\customers_pie_chart.svg

The chart shows 5 customers with 1 order each, so every customer represents 20% of the total order count.

Safety

The server rejects non-read-only statements and should still be paired with a restricted MySQL user. Database permissions are the final safety boundary.

Smoke test

This verifies that the MCP server starts and exposes tools. It does not query MySQL.

cd C:\Users\ADMIN\Documents\1st\mysql-mcp
npm.cmd run smoke
Install Server
F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/myexperimenthub/Day12'

If you have feedback or need assistance with the MCP directory API, please join our Discord server