local-mysql
Provides read-only access to a MySQL database, allowing queries, listing databases, tables, and describing table schemas.
Click on "Install 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-mysqllist 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.
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| database | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full burden. It only states the purpose without disclosing behavior like error handling, authorization needs, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, concise and front-loaded with the verb, but it omits necessary structure like parameter or result details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no output schema, and low schema coverage, the description is incomplete, lacking information on return values, parameter formats, and edge cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description must explain parameters but does not. The schema has 'table' (required) and 'database' (optional), but no meaning is added.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Show column metadata for a table' clearly states the action (show) and resource (column metadata for a table), distinguishing itself from siblings list_databases, list_tables, and query.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when column details are needed, but lacks explicit guidance on when to use versus alternatives or any prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_databasesList databasesA
List databases visible to the configured MySQL user.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description only mentions visibility to the configured user but does not disclose read-only nature, performance, or any side effects. The minimal description inadequately compensates for the lack of annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with no extraneous information. Front-loads the key action and scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with no parameters and no output schema, the description is somewhat complete. However, it does not specify the output format (e.g., list of names) or any error conditions, which would help the agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist; schema coverage is 100%. Description cannot add further meaning, so baseline score of 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool lists databases and specifies the scope (visible to configured MySQL user). Differentiates from siblings like list_tables and describe_table.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like list_tables or describe_table. Does not state prerequisites or when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_tablesList tablesA
List tables in the configured database or in the database argument.
| Name | Required | Description | Default |
|---|---|---|---|
| database | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only states the basic function without mentioning auth requirements, error behavior, side effects, or data limits. This is insufficient for a tool with no annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that conveys the essential information without any fluff. It is front-loaded with the action and resource, making it efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one optional parameter, no output schema), the description is mostly complete. It covers the main function and the optional argument. However, it could be more complete by briefly noting the return value (e.g., list of table names).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description adds meaning by explaining that the 'database' parameter is optional and defaults to the configured database. However, it does not specify valid values, format, or behavior for invalid inputs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (list) and resource (tables), and distinguishes from sibling tools like describe_table, list_databases, and query. It also mentions an optional database argument, adding precision.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is used to list tables, but does not explicitly state when to use it versus siblings (e.g., for a specific table use describe_table) or any exclusions. No when-not-to guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
queryRun read-only SQLB
Run a single read-only MySQL query. SELECT, SHOW, DESCRIBE, DESC, EXPLAIN, and WITH are allowed.
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the burden. It declares read-only nature and allowed commands, but does not disclose important behaviors such as error handling, result format, pagination, or size limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the main purpose, no unnecessary words. Efficient and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description is incomplete. It does not explain the return format (e.g., rows, affected rows, status), which is critical for a query tool. The context of sibling tools is handled but output behavior is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has only one parameter 'sql' with minLength, and no description in the schema (0% coverage). The description adds that the query must be read-only and lists allowed commands, providing some semantic value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Title and description clearly state it runs a read-only MySQL query, listing specific allowed commands (SELECT, SHOW, etc.). It distinguishes from sibling tools like describe_table by being the general query tool, though not explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description implies use for read-only queries and lists allowed command types, but does not explicitly state when to use this tool vs siblings or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Read-only PostgreSQL, MySQL, SQL Server access via MCP — 24 dialect-aware hosted tools.
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.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
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.4724MIT
- 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.323MIT
- AlicenseAqualityDmaintenanceEnables read-only MySQL database access, allowing listing databases, tables, describing schemas, and executing SELECT/SHOW/DESCRIBE/EXPLAIN queries.7894MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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