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.

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Provides secure, read-only access to MariaDB/MySQL databases, allowing users to list databases, explore table schemas, and execute SQL queries with built-in security measures.
    Last updated
    4
    88
    4
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Provides read-only access to MySQL databases with automatic schema discovery and secure query execution. Enables users to explore database structure and execute SELECT queries through natural language interactions.
    Last updated
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    Enables safe interaction with MySQL databases through SELECT queries, table structure inspection, and database schema exploration. Provides read-only access to query data and examine database metadata.
    Last updated
    1
  • A
    license
    A
    quality
    C
    maintenance
    Enables read-only MySQL database connectivity, allowing execution of SELECT queries, listing tables, and describing table structures via natural language.
    Last updated
    3
    33
    MIT

View all related MCP servers

Related MCP Connectors

  • Explore your Messages SQLite database to browse tables and inspect schemas with ease. Run flexible…

  • Read-only MCP server for Muovi, Argentina's trust-first local services marketplace (6 tools).

  • Run SOQL queries to explore and retrieve Salesforce data. Inspect records, fields, and relationshi…

View all MCP Connectors

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