Skip to main content
Glama
mysqldb-mcp-server

mysqldb-mcp-server

by burakdirin

mysqldb-mcp-server MCP 서버

대장간 배지

MySQL 데이터베이스 MCP 서버 프로젝트.

설치

uv 사용하여 패키지를 설치할 수 있습니다:

지엑스피1

또는 pip 사용하면:

pip install mysqldb-mcp-server

Related MCP server: MySQL Custom MCP Server

구성 요소

도구

서버는 두 가지 도구를 제공합니다.

  • 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

윈도우: %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

Inspector를 실행하면 브라우저에서 접근하여 디버깅을 시작할 수 있는 URL이 표시됩니다.

Available Tools

2 tools
connect_databaseC

Connect to a specific MySQL database

Inputs: database (required).

execute_queryC

Execute MySQL queries

Inputs: query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    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
    ResponsivenessOutdated data

    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
      4
      ISC
    • 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
      D
      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.
      78 npm
      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
      144 PyPI
      MIT