Skip to main content
Glama
sajithrw

MCP MySQL Server

by sajithrw

MCP MySQL Server

A Model Context Protocol (MCP) server for MySQL databases, including support for AWS RDS and other cloud MySQL instances. This server provides comprehensive database management capabilities through a standardized MCP interface.

📋 Quick Start for VS Code Users: See VSCODE_SETUP.md for step-by-step VS Code and GitHub Copilot integration instructions.

Features

  • ✅ Database Connection Management: Connect to local MySQL or cloud instances (AWS RDS, Google Cloud SQL, etc.)

  • ✅ Query Execution: Execute SQL queries with prepared statement support

  • ✅ Schema Inspection: List databases, tables, and describe table structures

  • ✅ Index Management: View table indexes and statistics

  • ✅ Security: Secure connection handling with SSL support

  • ✅ Error Handling: Comprehensive error reporting and connection management

Related MCP server: MySQL MCP Server

Installation

npm install -g @sajithrw/mcp-mysql@1.0.0

Or run ad‑hoc without global install using npx (shown later in config).

From Source

git clone https://github.com/sajithrw/mcp-mysql.git
cd mcp-mysql
npm install
npm run build

Configuration

Create (or update) .vscode/mcp.json in your project or in your global VS Code user settings folder. Use the published package via npx so you always invoke the correct version.

{
  "servers": {
    "mcp-mysql": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "@sajithrw/mcp-mysql@1.0.0"
      ],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "your_username",
        "MYSQL_PASSWORD": "your_password",
        "MYSQL_DATABASE": "your_database"
      }
    }
  }
}

Then:

  1. Reload VS Code window (Command Palette: "Developer: Reload Window").

  2. Open Command Palette and run: "MCP: Start Server" (pick mcp-mysql).

  3. Use Copilot / MCP clients to call tools (e.g., ask to list tables).

Previous settings.json based github.copilot.advanced.mcp configuration is deprecated in favor of mcp.json discovery.

Alternative: Local Build Path

If working from a local clone/build instead of the published package:

{
  "servers": {
    "mcp-mysql": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/mcp-mysql/build/index.js"],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_USER": "your_username",
        "MYSQL_PASSWORD": "your_password"
      }
    }
  }
}

Using with Claude Desktop

Add the server to your Claude Desktop configuration:

{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": ["@sajithrw/mcp-mysql@1.0.0"],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_USER": "your_username",
        "MYSQL_PASSWORD": "your_password"
      }
    }
  }
}

Using with MCP Inspector

For testing and development:

npx @modelcontextprotocol/inspector npx @sajithrw/mcp-mysql@1.0.0

Using with VS Code and GitHub Copilot

Once configured, you can use the MySQL MCP server with GitHub Copilot in VS Code to interact with your databases using natural language.

Example Interactions

  1. Database Exploration:

    • "Show me all tables in the database"

    • "Describe the structure of the users table"

    • "What indexes are on the products table?"

  2. Data Analysis:

    • "Show me the top 10 customers by order count"

    • "Find all users created in the last 30 days"

    • "Get statistics about the orders table"

  3. Schema Management:

    • "List all databases on this server"

    • "Show me table sizes and row counts"

    • "Find tables with specific column names"

Step-by-Step (Recap)

  1. Create .vscode/mcp.json with config above.

  2. Reload VS Code window.

  3. Run "MCP: Start Server".

  4. Use Copilot Chat / MCP-aware client to issue requests.

Troubleshooting Quick Tips

  • Ensure the package version (1.0.0) matches what you intend to use.

  • If the server won't start, run it manually: npx @sajithrw/mcp-mysql@1.0.0 to see logs.

  • Verify environment variables are present (you can also place them in a .env if your shell loads them before launching VS Code).

Available Tools

1. mysql_connect

Connect to a MySQL database.

Parameters:

  • host (required): MySQL server hostname or IP address

  • port (optional): MySQL server port (default: 3306)

  • user (required): Database username

  • password (required): Database password

  • database (optional): Database name to connect to

  • ssl (optional): Use SSL connection (default: false)

Example:

{
  "host": "localhost",
  "port": 3306,
  "user": "myuser",
  "password": "mypassword",
  "database": "mydb",
  "ssl": false
}

2. mysql_query

Execute a SQL query on the connected database.

Parameters:

  • query (required): SQL query to execute

  • parameters (optional): Array of parameters for prepared statements

Examples:

Simple query:

{
  "query": "SELECT * FROM users LIMIT 10"
}

Prepared statement:

{
  "query": "SELECT * FROM users WHERE age > ? AND city = ?",
  "parameters": ["25", "New York"]
}

3. mysql_list_databases

List all databases on the MySQL server.

Parameters: None

4. mysql_list_tables

List all tables in the current or specified database.

Parameters:

  • database (optional): Database name (uses current database if not specified)

5. mysql_describe_table

Get the structure/schema of a specific table.

Parameters:

  • table (required): Table name to describe

  • database (optional): Database name (uses current database if not specified)

6. mysql_show_indexes

Show indexes for a specific table.

Parameters:

  • table (required): Table name to show indexes for

  • database (optional): Database name (uses current database if not specified)

7. mysql_get_table_stats

Get statistics about a table (row count, size, etc.).

Parameters:

  • table (required): Table name to get statistics for

  • database (optional): Database name (uses current database if not specified)

8. mysql_disconnect

Disconnect from the MySQL database.

Parameters: None

Common Use Cases

1. Connecting to AWS RDS

{
  "host": "mydb.abc123.us-west-2.rds.amazonaws.com",
  "port": 3306,
  "user": "admin",
  "password": "mypassword",
  "database": "production",
  "ssl": true
}

2. Exploring Database Schema

  1. Connect to database using mysql_connect

  2. List all databases with mysql_list_databases

  3. List tables with mysql_list_tables

  4. Describe specific tables with mysql_describe_table

  5. Check indexes with mysql_show_indexes

3. Data Analysis

  1. Connect to database

  2. Execute analytical queries with mysql_query

  3. Get table statistics with mysql_get_table_stats

Security Considerations

  • Credentials: Never hardcode database credentials. Use environment variables or secure configuration management.

  • SSL/TLS: Always use SSL when connecting to production databases or cloud instances.

  • Permissions: Use database users with minimal required permissions.

  • Query Validation: The server uses prepared statements to prevent SQL injection.

Environment Variables

You can set default connection parameters using environment variables:

export MYSQL_HOST=localhost
export MYSQL_PORT=3306
export MYSQL_USER=myuser
export MYSQL_PASSWORD=mypassword
export MYSQL_DATABASE=mydb
export MYSQL_SSL=true

Development

Building

npm run build

Testing

npm run test

Development Mode

npm run dev

Troubleshooting

Connection Issues

  1. Connection Refused: Check that MySQL server is running and accessible

  2. Authentication Failed: Verify username and password

  3. SSL Errors: Ensure SSL is properly configured on both client and server

  4. Timeout: Check network connectivity and firewall settings

Common Error Messages

  • "Not connected to MySQL": Use mysql_connect before executing other commands

  • "Query execution failed": Check SQL syntax and table/column names

  • "Connection failed": Verify connection parameters and network connectivity

Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Add tests

  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

Available Tools

8 tools
mysql_connectC

Connect to a MySQL database with provided connection parameters

ParametersJSON Schema
NameRequiredDescriptionDefault
hostYesMySQL server hostname or IP address
portNoMySQL server port (default: 3306)
userYesDatabase username
passwordYesDatabase password
databaseNoDatabase name (optional)
sslNoUse SSL connection (default: false)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It mentions 'connection parameters' but doesn't describe what happens after connection (e.g., establishes a session, returns a connection handle, may have timeout/error behavior, or requires subsequent disconnect). For a tool that likely creates persistent state, this is inadequate behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a connection tool and front-loads the essential information without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a database connection tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns (e.g., a connection object, status code), how errors are handled, whether the connection persists, or how it integrates with sibling tools. For a foundational tool in a database suite, this leaves critical gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents all 6 parameters. The description adds no additional parameter semantics beyond what's in the schema (it just says 'with provided connection parameters'). This meets the baseline of 3 when the schema does the heavy lifting, but earns no extra credit for adding value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Connect') and resource ('MySQL database'), making the purpose immediately understandable. However, it doesn't distinguish this tool from its siblings like mysql_disconnect or explain how it relates to other database operations, missing the differentiation that would earn a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., that this must be called before other mysql_* tools), when not to use it (e.g., if already connected), or how it relates to sibling tools like mysql_disconnect. This leaves the agent with insufficient context for proper tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mysql_describe_tableB

Get the structure/schema of a specific table

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesTable name to describe
databaseNoDatabase name (uses current database if not specified)

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves structure/schema, implying a read-only operation, but doesn't clarify if it requires specific permissions, returns detailed column info, or handles errors. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and appropriately sized for a simple tool, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavior, usage context, and output format. For a read-only metadata tool, this is acceptable but leaves room for improvement in guiding the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema fully documents the two parameters (table and database). The description adds no additional meaning beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Get the structure/schema of a specific table,' which is a specific verb+resource combination. It distinguishes from siblings like mysql_list_tables (lists tables) and mysql_query (executes queries), but doesn't explicitly contrast with mysql_show_indexes (which might overlap in showing table metadata).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose mysql_describe_table over mysql_show_indexes or mysql_get_table_stats, nor does it specify prerequisites like needing an active connection. Usage is implied by the purpose but not explicitly defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mysql_disconnectB

Disconnect from the MySQL database

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Disconnect') but doesn't describe what happens upon invocation—e.g., whether it closes all connections, releases resources, or affects subsequent operations. For a tool with potential side effects and no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero waste—it directly states the tool's action without unnecessary words. It's appropriately sized for a simple tool and front-loaded with the essential information, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate but lacks completeness. It doesn't explain the behavioral impact of disconnecting, such as whether it's irreversible or affects other tools, which is important for a mutation-like operation. With no annotations to fill gaps, the description should do more to guide usage in context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description doesn't need to add parameter details, and it correctly implies no parameters are required. This meets the baseline for tools with no parameters, as there's nothing to compensate for.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Disconnect') and target resource ('from the MySQL database'), making the tool's purpose immediately understandable. It distinguishes from siblings like mysql_connect (connection) and mysql_query (querying), though it doesn't explicitly contrast with them. The description avoids tautology by not just restating the name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives or prerequisites for its use. It doesn't mention that it should be used after mysql_connect or when ending a session, nor does it clarify if it's optional or required for cleanup. Without such context, the agent lacks explicit usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mysql_get_table_statsC

Get statistics about a table (row count, size, etc.)

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesTable name to get statistics for
databaseNoDatabase name (uses current database if not specified)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves statistics, implying a read-only operation, but doesn't specify whether it requires specific permissions, has performance implications (e.g., for large tables), or what the return format looks like (e.g., structured data vs. raw text). For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded, consisting of a single sentence that directly states the tool's purpose with no wasted words. Every part of the sentence ('Get statistics about a table' and the parenthetical examples) contributes essential information, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a database statistics tool with no annotations and no output schema, the description is insufficiently complete. It doesn't cover behavioral aspects like permissions, performance, or error handling, and with no output schema, it fails to describe what the return values look like (e.g., JSON structure, units for size). For a tool that could involve significant data retrieval, more context is needed to ensure proper usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with both parameters (table and database) fully documented in the input schema. The description adds no additional parameter semantics beyond what the schema provides—it doesn't explain format requirements, valid table/database names, or default behaviors. Given the high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('statistics about a table'), including examples of what statistics are retrieved ('row count, size, etc.'). It distinguishes itself from siblings like mysql_describe_table or mysql_show_indexes by focusing on statistical metrics rather than schema or index details. However, it doesn't explicitly differentiate from all siblings (e.g., mysql_query could potentially retrieve similar data), keeping it at a 4 rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer mysql_get_table_stats over other tools like mysql_describe_table for structural info or mysql_query for custom statistical queries. There's also no indication of prerequisites (e.g., needing a connection established via mysql_connect) or exclusions, leaving usage context entirely implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mysql_list_databasesB

List all databases on the MySQL server

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('List all databases') but doesn't describe behavioral traits such as whether this requires specific permissions, how results are formatted (e.g., as a list or structured data), or if there are rate limits. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without any wasted words. It's appropriately sized for a simple listing tool with no parameters, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally complete. It states what the tool does but lacks context on prerequisites (e.g., connection state), result format, or error handling. For a listing tool in a database context, more guidance would be helpful, but it's adequate for basic use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description correctly implies no parameters are required ('List all databases'), aligning with the schema. This meets the baseline for tools with no parameters, as it doesn't mislead about inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all databases on the MySQL server'), making the purpose immediately understandable. It distinguishes from siblings like mysql_list_tables (which lists tables) and mysql_query (which executes queries). However, it doesn't explicitly differentiate from mysql_connect or mysql_disconnect, which are connection management tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., requiring a connection via mysql_connect), exclusions, or comparisons to other listing tools like mysql_list_tables. The agent must infer usage from the tool name and context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mysql_list_tablesB

List all tables in the current or specified database

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseNoDatabase name (uses current database if not specified)

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. It states the tool lists tables, which implies a read-only operation, but doesn't disclose any behavioral traits such as whether it requires authentication, potential rate limits, error handling, or the format of returned data. The description is minimal and lacks essential context for safe and effective use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently conveys the core functionality without any wasted words. It is front-loaded with the main action ('List all tables') and appropriately sized for a simple tool. Every part of the sentence earns its place by specifying scope.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 optional parameter, no output schema, no annotations), the description is incomplete. It doesn't explain what the output looks like (e.g., list of table names, metadata), any dependencies like requiring a connection, or error scenarios. For a tool with no annotations or output schema, more context is needed to ensure the agent can use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'database' fully documented in the schema as 'Database name (uses current database if not specified).' The description adds no additional meaning beyond this, as it only repeats the same information about current or specified database. With high schema coverage, the baseline is 3, and the description doesn't compensate with extra details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List all tables') and resource ('in the current or specified database'), making the purpose immediately understandable. It distinguishes from siblings like mysql_list_databases (which lists databases) and mysql_describe_table (which describes a specific table), though it doesn't explicitly mention these alternatives. The description is specific but lacks explicit sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by mentioning 'current or specified database,' which suggests when to specify the database parameter. However, it provides no explicit guidance on when to use this tool versus alternatives like mysql_list_databases or mysql_query, nor does it mention prerequisites such as needing an active connection. The guidance is implied but incomplete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mysql_queryC

Execute a SQL query on the connected MySQL database

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSQL query to execute
parametersNoParameters for prepared statement (optional)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action but lacks critical details: it does not specify whether queries are read-only or mutating, potential side effects (e.g., data modification), error handling, or performance implications (e.g., rate limits). This is inadequate for a tool that could perform destructive operations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It is front-loaded with the core purpose and appropriately sized, making it easy for an agent to parse quickly without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of SQL execution (potential for mutations, errors, and varied outputs) and the absence of annotations and output schema, the description is incomplete. It fails to address key contextual aspects like return formats, safety warnings, or connection requirements, leaving significant gaps for agent understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (query and parameters). The description adds no additional meaning beyond what the schema provides, such as query syntax examples or parameter usage details. The baseline score of 3 reflects adequate but minimal value addition from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Execute a SQL query') and target resource ('on the connected MySQL database'), providing a specific verb+resource combination. However, it does not differentiate from sibling tools like mysql_describe_table or mysql_list_tables, which also involve database operations but with different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., requiring a connection via mysql_connect), exclusions (e.g., avoiding certain query types), or comparisons to siblings like mysql_list_tables for specific tasks, leaving the agent with minimal context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mysql_show_indexesC

Show indexes for a specific table

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesTable name to show indexes for
databaseNoDatabase name (uses current database if not specified)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe the return format (e.g., structure of index information), potential errors, or any operational constraints like performance impact. This leaves significant gaps for an AI agent to understand the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool that likely returns structured data about indexes. It doesn't explain what information is returned (e.g., index names, columns, types) or how to interpret the results, which is crucial for an AI agent to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with clear descriptions for both parameters in the input schema. The description adds no additional meaning beyond what the schema provides, such as examples or edge cases. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Show') and resource ('indexes for a specific table'), making the purpose immediately understandable. It doesn't differentiate from sibling tools like mysql_describe_table or mysql_get_table_stats, which might also provide index-related information, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like mysql_describe_table or mysql_get_table_stats, which could potentially overlap in functionality. It lacks any mention of prerequisites, exclusions, or specific contexts for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no ambiguity. Tools like mysql_describe_table, mysql_get_table_stats, and mysql_show_indexes all target different aspects of table metadata without overlap, while mysql_query handles general SQL execution separately from specific operations.

Naming Consistency5/5

All tools follow a perfect mysql_verb_noun pattern with consistent snake_case throughout. The naming is highly predictable, making it easy for agents to understand and locate tools (e.g., mysql_list_databases, mysql_list_tables, mysql_describe_table).

Tool Count5/5

With 8 tools, this server is well-scoped for MySQL database operations. Each tool earns its place by covering essential functions like connection management, metadata inspection, and query execution without being overly sparse or bloated.

Completeness4/5

The toolset provides strong coverage for core MySQL operations, including connection lifecycle, database/table listing, schema inspection, and query execution. A minor gap exists in lacking explicit CRUD operations (e.g., insert, update, delete), but agents can work around this using mysql_query for such tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables AI assistants to manage MySQL databases through natural language commands. Supports database operations, table management, data queries, and import/export functionality with built-in security features.
    15
    23
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables comprehensive MySQL database management including CRUD operations, schema queries, and natural language to SQL conversion support through complete database structure analysis.
    454
    2
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables management and querying of multiple MySQL databases through natural language, allowing AI assistants to list databases, execute SQL queries, and explore database schemas.
    1
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables direct interaction with MySQL databases through SQL queries, table exploration, and schema inspection with support for prepared statements and connection pooling.

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/sajithrw/mcp-mysql'

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