KM

kevinwatt/mysql-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

18 stars 10 forks 품질 61 트렌드 22MIT

MCP 서버 구현은 MySQL 데이터베이스와 통합되어 LLM에 대한 안전한 데이터베이스 액세스 기능을 제공합니다.

개요

MCP 서버 구현은 MySQL 데이터베이스와 통합되어 LLM에 대한 안전한 데이터베이스 액세스 기능을 제공합니다. * 읽음만 SELECT 쿼리를 실행 * 모든 데이터베이스 테이블을 나열 * 테이블 구조를 표시 *보기 스키마 정보 * * 트랜잭션 지원으로 INSERT / UPDATE / DELETE 실행 * 데이터 안전에 대한 매개 변수화 쿼리 * 영향을 줄 및 삽입 ID * * * * SELECT 쿼리에 대한 읽기 전용 거래 모드 * 쿼리 길이 및 결과 크기 제한 * 성능 모니터링 및 로깅 * 자동 거래 처리 1. Dive Desktop 2. 복사 및 붙여넣기에서 "+ MCP Server 추가"를 클릭하십시오. 3. 명세.

개요(AI 번역)

MCP 서버 구현은 MySQL 데이터베이스와 통합되어 LLM에 대한 안전한 데이터베이스 액세스 기능을 제공합니다.

특징

  • **저장 운영 **
  • 읽기 전용 SELECT 쿼리 실행
  • 모든 데이터베이스 테이블 목록
  • 테이블 구조 표시
  • 스키마 정보보기 *Write 운영
  • 거래 지원으로 INSERT/UPDATE/DELETE 실행
  • 데이터 안전에 대한 매개 변수화된 쿼리
  • 영향을받는 행 및 삽입 ID 반환
  • 보안
  • SELECT 쿼리에 대한 읽기 전용 거래 모드
  • Query 길이 및 결과 크기 제한
  • 성능 모니터링 및 로깅
  • 자동 거래 처리

설치

Dive Desktop 사용

  1. Dive Desktop에서 "+ MCP Server 추가"를 클릭하십시오.

  2. 복사하고 이 윤곽을 풀기:

  3. MCP 서버를 설치하려면 "Save"를 클릭하십시오

도구 문서

  • ** mysql query **

  • 읽기 전용 SELECT 쿼리 실행

  • 입력:

  • sql (string): SQL SELECT 쿼리를 실행

  • 한계:

  • 최대 쿼리 길이 : 4096 문자

  • 최대 결과 행: 1000년

  • Query 타임 아웃 : 30 초

  • ** mysql execute **

  • 데이터 수정 작업을 실행

  • 입력:

  • sql (string): SQL 문 (INSERT/UPDATE/DELETE)

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

MySQL MCP Server

An MCP server implementation that integrates with MySQL databases, providing secure database access capabilities for LLMs.

Features

  • Read Operations
    • Execute read-only SELECT queries
    • List all database tables
    • Show table structures
    • View schema information
  • Write Operations
    • Execute INSERT/UPDATE/DELETE with transaction support
    • Parameterized queries for data safety
    • Returns affected rows and insert IDs
  • Security
    • Read-only transaction mode for SELECT queries
    • Query length and result size limits
    • Performance monitoring and logging
    • Automatic transaction handling

Installation

npm install -g @kevinwatt/mysql-mcp

Usage with Dive Desktop

  1. Click “+ Add MCP Server” in Dive Desktop
  2. Copy and paste this configuration:
{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": [
        "-y",
        "@kevinwatt/mysql-mcp"
      ],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASS": "",
        "MYSQL_DB": "your_database"
      }
    }
  }
}
  1. Click “Save” to install the MCP server

Tool Documentation

  • mysql_query

    • Execute read-only SELECT queries
    • Inputs:
      • sql (string): SQL SELECT query to execute
    • Limits:
      • Maximum query length: 4096 characters
      • Maximum result rows: 1000
      • Query timeout: 30 seconds
  • mysql_execute

    • Execute data modification operations
    • Inputs:
      • sql (string): SQL statement (INSERT/UPDATE/DELETE)
      • params (array, optional): Parameters for the SQL statement
    • Features:
      • Returns affected rows count
      • Returns last insert ID
      • Automatic transaction handling
  • list_tables

    • List all tables in current database
    • No inputs required
  • describe_table

    • Show table structure
    • Inputs:
      • table (string): Table name to describe

Usage Examples

Ask your LLM to:

"Show me all tables in the database"
"Describe the structure of users table"
"Select all active users from the database"
"Insert a new record into orders table"

Manual Start

If needed, start the server manually:

npx @kevinwatt/mysql-mcp

Requirements

  • Node.js 18+
  • MySQL Server
  • MCP-compatible LLM service

License

MIT

Author

Dewei Yen

Keywords

  • mcp
  • mysql
  • database
  • dive
  • llm
  • ai
GitHub에서 전체 README 보기

설치

npx -y @kevinwatt/mysql-mcp
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "mysql": { "command": "npx", "args": [ "-y", "@kevinwatt/mysql-mcp" ], "env": { "MYSQL_HOST": "127.0.0.1", "MYSQL_PORT": "3306", "MYSQL_USER": "root", "MYSQL_PASS": "", "MYSQL_DB": "your_database" } } } }