Skip to main content
Glama
enemyrr

MCP-MySQL Server

by enemyrr

@enemyrr/mcp-mysql-server

A Model Context Protocol server that provides MySQL database operations. This server enables AI models to interact with MySQL databases through a standardized interface.

Installation & Setup for Cursor IDE

Installing via Smithery

To install MySQL Database Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @enemyrr/mcp-mysql-server --client claude

Installing Manually

  1. Clone and build the project:

git clone https://github.com/enemyrr/mcp-mysql-server.git
cd mcp-mysql-server
npm install
npm run build
  1. Add the server in Cursor IDE settings:

    • Open Command Palette (Cmd/Ctrl + Shift + P)

    • Search for "MCP: Add Server"

    • Fill in the fields:

      • Name: mysql

      • Type: command

      • Command: node /absolute/path/to/mcp-mysql-server/build/index.js

Note: Replace /absolute/path/to/ with the actual path where you cloned and built the project.

Related MCP server: MySQL MCP Server

Database Configuration

You can configure the database connection in three ways:

  1. Database URL in .env (Recommended):

DATABASE_URL=mysql://user:password@host:3306/database
  1. Individual Parameters in .env:

DB_HOST=localhost
DB_USER=your_user
DB_PASSWORD=your_password
DB_DATABASE=your_database
  1. Direct Connection via Tool:

use_mcp_tool({
  server_name: "mysql",
  tool_name: "connect_db",
  arguments: {
    url: "mysql://user:password@host:3306/database"
    // OR
    workspace: "/path/to/your/project" // Will use project's .env
    // OR
    host: "localhost",
    user: "your_user",
    password: "your_password",
    database: "your_database"
  }
});

Available Tools

1. connect_db

Connect to MySQL database using URL, workspace path, or direct credentials.

2. query

Execute SELECT queries with optional prepared statement parameters.

use_mcp_tool({
  server_name: "mysql",
  tool_name: "query",
  arguments: {
    sql: "SELECT * FROM users WHERE id = ?",
    params: [1]
  }
});

3. execute

Execute INSERT, UPDATE, or DELETE queries with optional prepared statement parameters.

use_mcp_tool({
  server_name: "mysql",
  tool_name: "execute",
  arguments: {
    sql: "INSERT INTO users (name, email) VALUES (?, ?)",
    params: ["John Doe", "john@example.com"]
  }
});

4. list_tables

List all tables in the connected database.

use_mcp_tool({
  server_name: "mysql",
  tool_name: "list_tables"
});

5. describe_table

Get the structure of a specific table.

use_mcp_tool({
  server_name: "mysql",
  tool_name: "describe_table",
  arguments: {
    table: "users"
  }
});

6. create_table

Create a new table with specified fields and indexes.

use_mcp_tool({
  server_name: "mysql",
  tool_name: "create_table",
  arguments: {
    table: "users",
    fields: [
      {
        name: "id",
        type: "int",
        autoIncrement: true,
        primary: true
      },
      {
        name: "email",
        type: "varchar",
        length: 255,
        nullable: false
      }
    ],
    indexes: [
      {
        name: "email_idx",
        columns: ["email"],
        unique: true
      }
    ]
  }
});

7. add_column

Add a new column to an existing table.

use_mcp_tool({
  server_name: "mysql",
  tool_name: "add_column",
  arguments: {
    table: "users",
    field: {
      name: "phone",
      type: "varchar",
      length: 20,
      nullable: true
    }
  }
});

8. alter_column

Modify an existing column (type, nullable, default, or rename).

use_mcp_tool({
  server_name: "mysql",
  tool_name: "alter_column",
  arguments: {
    table: "users",
    column: "phone",
    type: "varchar",
    length: 50,
    nullable: false,
    newName: "phone_number" // optional: rename column
  }
});

9. drop_column

Remove a column from a table.

use_mcp_tool({
  server_name: "mysql",
  tool_name: "drop_column",
  arguments: {
    table: "users",
    column: "phone_number"
  }
});

10. drop_table

Delete a table (requires confirmation).

use_mcp_tool({
  server_name: "mysql",
  tool_name: "drop_table",
  arguments: {
    table: "old_table",
    confirm: true
  }
});

11. truncate_table

Remove all rows from a table (requires confirmation).

use_mcp_tool({
  server_name: "mysql",
  tool_name: "truncate_table",
  arguments: {
    table: "logs",
    confirm: true
  }
});

12. list_databases

List all accessible databases on the server.

13. get_indexes

List all indexes on a table.

use_mcp_tool({
  server_name: "mysql",
  tool_name: "get_indexes",
  arguments: {
    table: "users"
  }
});

14. get_foreign_keys

List all foreign key relationships for a table.

use_mcp_tool({
  server_name: "mysql",
  tool_name: "get_foreign_keys",
  arguments: {
    table: "orders"
  }
});

MCP Resources

Browse database schema as resources:

URI

Description

mysql://schema

Database overview (table count, size)

mysql://tables

List all tables with metadata

mysql://tables/{name}

Table details (columns, indexes, FKs)

mysql://tables/{name}/columns

Column definitions

mysql://tables/{name}/indexes

Index definitions

mysql://tables/{name}/sample

Sample 5 rows from table

MCP Prompts

Pre-built prompts for common operations:

Prompt

Description

generate-select

Build SELECT query for a table

generate-insert

Generate INSERT template

generate-update

Generate UPDATE template

explain-schema

Natural language schema explanation

suggest-indexes

Index recommendations for a table

Features

  • 14 database tools for queries, schema management, and more

  • MCP Resources for browsing database schema

  • MCP Prompts for generating SQL queries

  • Multiple connection methods (URL, workspace, direct)

  • Secure connection handling with automatic cleanup

  • Prepared statement support for query parameters

  • Comprehensive error handling and validation

  • TypeScript support

Security

  • Uses prepared statements to prevent SQL injection

  • Supports secure password handling through environment variables

  • Validates queries before execution

  • Automatically closes connections when done

Error Handling

The server provides detailed error messages for:

  • Connection failures

  • Invalid queries or parameters

  • Missing configuration

  • Database errors

  • Schema validation errors

Contributing

Contributions are welcome! Please feel free to submit a Pull Request to https://github.com/enemyrr/mcp-mysql-server

License

MIT

Available Tools

7 tools
add_columnC

Add a new column to existing table

ParametersJSON Schema
NameRequiredDescriptionDefault
fieldYes
tableYes

TDQS

C2.8/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. It states this is a mutation operation ('Add'), implying it modifies the database schema, but doesn't mention permissions required, whether it's reversible, potential side effects on existing data, or error conditions. This leaves significant gaps for a tool that alters database structure.

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 no wasted words. It's appropriately sized for a simple tool and front-loads the core action 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 (database schema mutation with nested parameters), lack of annotations, and no output schema, the description is inadequate. It doesn't cover behavioral aspects like permissions or side effects, parameter details, or what to expect upon success/failure. For a tool that modifies database structure, this leaves too many unknowns for safe and effective use.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate but fails to do so. It doesn't explain what 'table' and 'field' parameters represent, their expected formats, or the nested structure of 'field' with properties like 'name', 'type', 'nullable', etc. The description adds no meaningful parameter context beyond what's minimally implied by the tool name.

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 ('Add') and the target resource ('new column to existing table'), making the purpose immediately understandable. It doesn't distinguish from siblings like 'create_table' or 'describe_table', but it's specific enough to avoid confusion with other database operations.

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 'create_table' for new tables or 'execute' for general SQL commands. There's no mention of prerequisites, such as needing an existing table, or any context about when this operation is appropriate versus other schema modifications.

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

connect_dbC

Connect to MySQL database using URL or config

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseNo
hostNo
passwordNo
urlNoDatabase URL (mysql://user:pass@host:port/db)
userNo
workspaceNoProject workspace path

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 tool connects to a database, implying it establishes a session or handle, but doesn't describe what happens after connection (e.g., persistence, timeout, error handling), authentication needs beyond parameters, or side effects. 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 extremely concise—a single sentence that directly states the tool's purpose and method without any fluff. It's front-loaded and wastes no words, making it easy for an agent to parse quickly. Every part of the sentence earns its place by conveying essential information.

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 complexity (database connection with 6 parameters), lack of annotations, no output schema, and low schema description coverage, the description is incomplete. It doesn't cover behavioral aspects like connection lifecycle, error cases, or output format, leaving critical gaps for the agent to infer. This is inadequate for a tool that likely has significant operational implications.

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 33% (only 'url' and 'workspace' have descriptions), so the description must compensate but adds minimal value. It mentions 'URL or config', hinting at parameters like 'url' and possibly 'host', 'user', etc., but doesn't explain their semantics, relationships (e.g., mutual exclusivity), or defaults. The description provides some context but doesn't fully bridge the coverage gap, warranting a baseline score.

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 ('Connect to MySQL database') and the resource ('MySQL database'), making the purpose evident. It specifies the connection method ('using URL or config'), which helps distinguish it from other database operations. However, it doesn't explicitly differentiate from sibling tools like 'execute' or 'query', which might also involve database interactions, so it's not a perfect 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 prerequisites (e.g., needing this connection before using other tools like 'query'), exclusions, or contextual cues. With sibling tools like 'execute' and 'query' available, the lack of usage guidelines leaves the agent uncertain about proper sequencing or selection.

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

create_tableC

Create a new table in the database

ParametersJSON Schema
NameRequiredDescriptionDefault
fieldsYes
indexesNo
tableYesTable name

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 'Create' which implies a write/mutation operation, but doesn't cover critical aspects like required permissions, whether the operation is idempotent, error handling, or what happens on conflicts (e.g., if the table already exists). This leaves significant gaps for a tool that modifies database state.

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 unnecessary words. It's front-loaded and wastes no space, 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.

Completeness2/5

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

For a tool with 3 parameters, low schema description coverage (33%), no annotations, and no output schema, the description is inadequate. It doesn't compensate for the missing behavioral context (e.g., mutation effects, error cases) or parameter details, leaving the agent poorly equipped to use this tool correctly in a database environment.

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 low at 33%, with only the 'table' parameter documented. The description adds no parameter semantics beyond what the schema provides—it doesn't explain the purpose of 'fields' or 'indexes', their structure, or constraints. However, the schema itself defines these parameters with detailed properties, providing some baseline understanding despite the coverage gap.

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 ('Create') and resource ('new table in the database'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'add_column' or 'execute', which might also involve database modifications, leaving room for ambiguity.

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?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't mention prerequisites like needing an existing database connection (which 'connect_db' might handle) or when to use 'execute' for other SQL operations, leaving the agent without contextual usage cues.

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

describe_tableC

Get table structure

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesTable name

TDQS

C2.7/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. 'Get table structure' implies a read-only operation but doesn't specify if it requires database permissions, returns error conditions, or details the output format. This leaves significant behavioral gaps for a tool that interacts with database structures.

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 with just three words, front-loading the core purpose without any wasted text. This efficiency makes it easy to parse, though it may sacrifice detail for brevity.

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. It doesn't explain what 'table structure' entails (e.g., columns, types, constraints) or handle potential complexities like non-existent tables, making it inadequate for a tool that likely returns detailed metadata.

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 'table' clearly documented as 'Table name' in the schema. The description adds no additional meaning beyond this, such as format examples or constraints, so it meets the baseline for high schema coverage without enhancing parameter understanding.

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

Purpose3/5

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

The description 'Get table structure' clearly states the action (get) and resource (table structure), making the purpose understandable. However, it doesn't distinguish this from potential sibling tools like 'list_tables' or 'query' that might also provide table-related information, keeping it at a basic level of clarity.

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. With siblings like 'list_tables' and 'query' available, there's no indication of whether this is for metadata retrieval, schema inspection, or other contexts, leaving usage ambiguous.

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

executeC

Execute an INSERT, UPDATE, or DELETE query

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsNoAn optional array of parameters (as strings) to bind to the SQL query placeholders (e.g., ?).
sqlYesThe SQL query string (INSERT, UPDATE, DELETE) to execute.

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 executes SQL queries but fails to mention critical traits like authentication requirements, transaction handling, error behavior, or potential side effects (e.g., data modification risks). This leaves significant gaps in understanding 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 extremely concise and front-loaded, consisting of a single, direct sentence that states the tool's purpose without any unnecessary words. Every part of the sentence earns its place by clearly conveying the core functionality.

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 executing SQL queries (a potentially destructive operation), the lack of annotations, and no output schema, the description is incomplete. It does not address safety considerations, return values, or error handling, making it inadequate for informed tool selection and invocation.

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%, so the input schema already documents both parameters ('sql' and 'params') thoroughly. The description adds no additional semantic meaning beyond what the schema provides, such as examples or constraints, resulting in a baseline score of 3.

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') and the type of operations ('INSERT, UPDATE, or DELETE query'), making the purpose specific and understandable. However, it does not explicitly distinguish this tool from sibling tools like 'query' (which might handle SELECT queries), leaving room for ambiguity in differentiation.

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, such as 'query' for SELECT operations or other siblings for schema modifications. It lacks explicit instructions on prerequisites, context, or exclusions, offering minimal usage direction.

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

list_tablesB

List all tables in the database

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/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. It states what the tool does but doesn't reveal any behavioral traits: no information about permissions needed, whether it's read-only or has side effects, rate limits, output format, or pagination. For a tool with zero annotation coverage, this is a significant gap.

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 communicates the core functionality without any wasted words. It's appropriately sized for a simple tool and front-loads the essential information ('List all tables').

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 (0 parameters) but lack of annotations and output schema, the description is incomplete. It doesn't address what the output looks like (e.g., table names, metadata, format), potential limitations, or how it differs from sibling tools. For a tool in a database context with multiple related tools, more context would be helpful.

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 zero parameters, and schema description coverage is 100% (though empty). The description doesn't need to compensate for missing parameter documentation since there are none. A baseline of 4 is appropriate as the description accurately reflects the parameterless nature of the tool.

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') and resource ('all tables in the database'), making the tool's purpose immediately understandable. It doesn't explicitly differentiate from siblings like 'describe_table' or 'query', but the verb+resource combination is specific enough for basic understanding.

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 'describe_table' (for table details) or 'query' (for data retrieval). There's no mention of prerequisites, context, or exclusions, leaving the agent to infer usage from the tool name alone.

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

queryC

Execute a SELECT query

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsNoAn optional array of parameters (as strings) to bind to the SQL query placeholders (e.g., ?).
sqlYesThe SQL SELECT query string to execute.

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. 'Execute a SELECT query' implies a read-only operation, but it doesn't specify critical behaviors: whether it requires an active connection, handles errors, returns results in a specific format, has rate limits, or affects database state. 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 with zero waste—'Execute a SELECT query' is front-loaded and precisely conveys the core action. Every word earns its place, making it highly concise and well-structured for quick comprehension.

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 (requires connection, error handling, result formatting) and the lack of annotations and output schema, the description is incomplete. It doesn't address prerequisites, behavioral traits, or return values, leaving the agent with insufficient context to use the tool effectively beyond basic parameter passing.

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 fully documents both parameters ('sql' and 'params'). The description adds no additional meaning beyond what's in the schema—it doesn't explain parameter interactions, syntax examples, or constraints. Baseline 3 is appropriate when the schema does all the work.

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 'Execute a SELECT query' clearly states the verb ('Execute') and resource ('SELECT query'), making the purpose unambiguous. It distinguishes from siblings like 'execute' (which might handle other SQL types) by specifying SELECT queries only. However, it doesn't explicitly differentiate from all siblings (e.g., 'describe_table' also reads data), so it's not a perfect 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 like 'execute', 'list_tables', or 'describe_table'. It doesn't mention prerequisites (e.g., database connection), exclusions (e.g., non-SELECT queries), or contextual cues. This leaves the agent to infer usage from the name and schema alone.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 7 tool updatesv1.0.0
    • First observedadd_column
    • First observedconnect_db
    • First observedcreate_table
    • First observeddescribe_table
    • First observedexecute
    • First observedlist_tables
    • First observedquery

TDQS

B3.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no ambiguity. For example, 'execute' handles INSERT/UPDATE/DELETE while 'query' handles SELECT, and 'describe_table' provides structure while 'list_tables' enumerates tables. The separation between schema operations (add_column, create_table) and data operations (execute, query) is well-defined.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with clear, descriptive names. The naming convention is uniform throughout (e.g., add_column, create_table, describe_table, list_tables), making it easy to predict functionality. There are no deviations in style or formatting.

Tool Count5/5

With 7 tools, this server is well-scoped for MySQL database operations. Each tool serves a specific, necessary function in the database management workflow, from connection (connect_db) to schema manipulation (create_table, add_column) and data querying (query, execute). The count avoids both bloat and insufficiency.

Completeness4/5

The tool set covers core MySQL operations effectively, including connection, schema management, and data querying. Minor gaps exist, such as the lack of tools for updating or deleting tables, which could limit full lifecycle management. However, agents can work around this using existing tools like 'execute' for DROP TABLE queries.

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
    Not graded
    quality
    C
    maintenance
    Enables AI models to interact with MySQL databases through a standardized interface, supporting queries, data manipulation, table inspection, and query performance analysis with secure prepared statements.
    36
    22
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI models to interact with MySQL databases through standardized operations including querying, executing commands, listing tables, and describing table structures with secure prepared statement support.
    342
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to securely connect to and manage MySQL databases with support for multiple database connections, complete CRUD operations, schema inspection, and dynamic connection management through natural language.
    35
    80
    MIT
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables AI assistants to securely interact with MySQL databases through tools for query execution, schema inspection, and transaction management. It features built-in safety controls like row limits and query validation to ensure safe and standardized database access.
    454
    -

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

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