Skip to main content
Glama
burakdirin

mysqldb-mcp-server

by burakdirin

mysqldb-mcp-server MCP サーバー

鍛冶屋のバッジ

MySQL データベース MCP サーバー プロジェクト。

インストール

uvを使用してパッケージをインストールできます。

uv pip install mysqldb-mcp-server

またはpipを使用します:

pip install mysqldb-mcp-server

Related MCP server: MySQL Custom MCP Server

コンポーネント

ツール

サーバーは次の 2 つのツールを提供します。

  • connect_database : 特定のMySQLデータベースに接続する

    • databaseパラメータ: 接続するデータベースの名前(文字列)

    • 接続が成功すると確認メッセージを返します

  • execute_query : MySQLクエリを実行する

    • queryパラメータ: 実行する SQL クエリ (文字列)

    • クエリ結果をJSON形式で返します

    • 複数のクエリはセミコロンで区切って送信できます

構成

サーバーは次の環境変数を使用します。

  • MYSQL_HOST : MySQLサーバーのアドレス(デフォルト: "localhost")

  • MYSQL_USER : MySQLユーザー名(デフォルト: "root")

  • MYSQL_PASSWORD : MySQLパスワード(デフォルト: "")

  • MYSQL_DATABASE : 初期データベース(オプション)

  • MYSQL_READONLY : 読み取り専用モード (有効にするには 1/true に設定、デフォルト: false)

クイックスタート

インストール

クロードデスクトップ

MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json

Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "mysqldb-mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/burakdirin/Projects/mysqldb-mcp-server",
        "run",
        "mysqldb-mcp-server"
      ],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_USER": "root",
        "MYSQL_PASSWORD": "password",
        "MYSQL_DATABASE": "[optional]",
        "MYSQL_READONLY": "true"
      }
    }
  }
}
{
  "mcpServers": {
    "mysqldb-mcp-server": {
      "command": "uvx",
      "args": [
        "mysqldb-mcp-server"
      ],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_USER": "root",
        "MYSQL_PASSWORD": "password",
        "MYSQL_DATABASE": "[optional]",
        "MYSQL_READONLY": "true"
      }
    }
  }
}

Smithery経由でインストール

Smithery経由で Claude Desktop 用の MySQL データベース統合サーバーを自動的にインストールするには:

npx -y @smithery/cli install @burakdirin/mysqldb-mcp-server --client claude

発達

建築と出版

配布用のパッケージを準備するには:

  1. 依存関係を同期し、ロックファイルを更新します。

uv sync
  1. パッケージディストリビューションをビルドします。

uv build

これにより、 dist/ディレクトリにソースとホイールのディストリビューションが作成されます。

  1. PyPI に公開:

uv publish

注: 環境変数またはコマンド フラグを使用して PyPI 資格情報を設定する必要があります。

  • トークン: --tokenまたはUV_PUBLISH_TOKEN

  • またはユーザー名/パスワード: --username / UV_PUBLISH_USERNAMEおよび--password / UV_PUBLISH_PASSWORD

デバッグ

MCPサーバーはstdio経由で実行されるため、デバッグが困難になる場合があります。最適なデバッグ環境を実現するには、 MCP Inspectorの使用を強くお勧めします。

次のコマンドを使用して、 npm経由で MCP Inspector を起動できます。

npx @modelcontextprotocol/inspector uv --directory /Users/burakdirin/Projects/mysqldb-mcp-server run mysqldb-mcp-server

起動すると、ブラウザでアクセスしてデバッグを開始できる URL がインスペクタに表示されます。

Available Tools

2 tools
connect_databaseC

Connect to a specific MySQL database

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYes

TDQS

C2.8/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. It states the action but doesn't disclose behavioral traits like whether this establishes a persistent connection, requires authentication, has rate limits, or what happens on failure. For a connection tool with zero annotation coverage, this leaves critical operational details unspecified.

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 no wasted words, making it easy to parse and front-loaded with essential information. Every word earns its place by specifying the action and target.

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 (establishing a database connection), lack of annotations, no output schema, and low schema coverage, the description is insufficient. It doesn't cover what the tool returns, error conditions, or dependencies with the sibling 'execute_query' tool, leaving too many gaps for 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%, and the description adds no parameter information beyond implying a 'database' parameter exists. It doesn't explain what the 'database' parameter represents (e.g., database name, connection string), valid values, or format, failing to compensate for the schema's lack of descriptions.

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') and target resource ('a specific MySQL database'), making the purpose immediately understandable. It doesn't explicitly distinguish from the sibling 'execute_query' tool, but the verb 'connect' versus 'execute' implies different 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, prerequisites, or contextual constraints. With a sibling tool 'execute_query' available, there's no indication of whether connection must precede query execution or if they can be used independently.

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

execute_queryC

Execute MySQL queries

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

TDQS

C2.1/5.0
Behavior1/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 but fails to do so. It doesn't mention whether this is a read-only or destructive operation, authentication requirements, error handling, rate limits, or what the response looks like. For a database query tool with zero annotation coverage, this is a critical 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 with just three words, front-loaded and free of unnecessary information. Every word ('Execute MySQL queries') directly contributes to the core purpose, making it efficient in structure, though this brevity contributes to gaps in other dimensions.

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

Completeness1/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 query tool, lack of annotations, no output schema, and 0% schema description coverage, the description is completely inadequate. It fails to address key aspects like behavioral traits, parameter details, return values, or usage context, making it insufficient for effective agent tool invocation.

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

Parameters1/5

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

The schema description coverage is 0%, meaning the input schema provides no descriptions for the 'query' parameter. The description 'Execute MySQL queries' adds no meaningful semantics beyond the parameter name—it doesn't explain the expected format, syntax, constraints, or examples for the query. This leaves the parameter entirely undocumented.

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 'Execute MySQL queries' clearly states the verb ('execute') and resource ('MySQL queries'), making the purpose understandable. However, it lacks specificity about what types of queries are supported (e.g., SELECT, INSERT, UPDATE) and doesn't distinguish from the sibling tool 'connect_database', which appears to be a different operation. This makes it vague but not tautological.

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 the sibling 'connect_database' or other alternatives. It doesn't mention prerequisites (e.g., whether a database connection must be established first), use cases, or exclusions. This leaves the agent with no contextual direction for tool selection.

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. 2 tool updatesv1.0.0
    • First observedconnect_database
    • First observedexecute_query

TDQS

C2.7/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: connect_database handles database connections, while execute_query handles query execution. There is no overlap or ambiguity between these functions, making it easy for an agent to select the correct tool based on the task.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern (connect_database and execute_query), using snake_case throughout. This predictable naming scheme enhances readability and reduces confusion for agents interacting with the server.

Tool Count2/5

With only 2 tools, the server feels under-scoped for a MySQL database management system. Core operations like creating tables, inserting data, or managing schemas are missing, which limits its utility for typical database workflows. This count is too low for the apparent domain.

Completeness2/5

The tool surface is severely incomplete for MySQL database operations. While connecting and executing queries are foundational, there are significant gaps in CRUD operations (e.g., no create, read, update, or delete tools), schema management, or data manipulation, which will likely cause agent failures in real-world scenarios.

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
    MCP server that allows Claude AI to interact directly with MySQL databases, enabling query execution and table information retrieval through natural language.
    1
    15
    4
    MIT
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    An MCP server that enables interaction with MySQL databases through the Model Context Protocol, allowing execution of SQL queries and database table listing operations from Cline AI.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    MySQL MCP Server enables Claude Desktop and Claude Code to execute SQL queries, explore databases, Webview to add or enable Databases, Connections, and interact with your MySQL data - all through a secure, permission-controlled interface.
    18
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    MCP server for Claude that connects to MySQL, MariaDB, and SQLite databases. Query your databases using natural language.
    3
    MIT

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/burakdirin/mysqldb-mcp-server'

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