local-mysql
Provides read-only access to a MySQL database, allowing queries, listing databases, tables, and describing table schemas.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@local-mysql list tables in the product_db database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 installRelated 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:
categoriescustomersordersproductssuppliers
Customer chart
A customer order-count pie chart is available at:
..\customers_pie_chart.svgThe 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 smokeAvailable Tools
4 toolsdescribe_tableDescribe tableC
Show column metadata for a table.
Inputs: table (required), database.
list_databasesList databasesA
List databases visible to the configured MySQL user.
Inputs: no named parameters.
list_tablesList tablesA
List tables in the configured database or in the database argument.
Inputs: database.
queryRun read-only SQLB
Run a single read-only MySQL query. SELECT, SHOW, DESCRIBE, DESC, EXPLAIN, and WITH are allowed.
Inputs: sql (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: describe_table for column metadata, list_databases for databases, list_tables for tables, and query for arbitrary read-only SQL. No overlap.
All tool names follow a consistent verb_noun pattern: describe_table, list_databases, list_tables, query. The pattern is uniform and predictable.
With 4 tools, the set is well-scoped for a read-only MySQL server. It covers the essential operations without unnecessary extras.
The tools cover listing databases and tables, describing table structure, and running arbitrary read queries. Minor omissions like SHOW VARIABLES could be added but are accessible via query.
Maintenance
Related MCP Connectors
Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Read your Iceberg tables hosted in Europe: find tables, run read-only SQL, view photos.
Query your own databases and Data Sets with read-only SQL, and build hosted dashboards.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides 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.462 npm4MIT
- FlicenseNot gradedqualityDmaintenanceEnables 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.1-
- AlicenseAqualityDmaintenanceEnables read-only MySQL database connectivity, allowing execution of SELECT queries, listing tables, and describing table structures via natural language.310 npmMIT
- AlicenseAqualityDmaintenanceEnables read-only MySQL database access, allowing listing databases, tables, describing schemas, and executing SELECT/SHOW/DESCRIBE/EXPLAIN queries.745 npm4MIT