Skip to main content
Glama
rlembo06

mysql-mcp

by rlembo06

mysql-mcp

MySQL 데이터베이스에 대한 안전한 읽기 전용 액세스를 제공하는 경량 MCP 서버입니다.

기능

  • 다중 데이터베이스 — 여러 MySQL 인스턴스에 연결하고 즉시 전환 가능

  • 읽기 전용 — 쓰기 작업(INSERT, UPDATE, DELETE, DROP 등) 차단

  • 지연 연결 — 시작 시점이 아닌 첫 사용 시점에 풀 생성

  • MCP 네이티브@modelcontextprotocol/sdk 기반으로 구축되어 모든 MCP 클라이언트와 호환

설정

  1. 데이터베이스 연결 정보가 포함된 JSON 설정 파일을 생성합니다:

{
  "my-db": {
    "host": "db.example.com",
    "port": 3306,
    "user": "readonly",
    "password": "secret",
    "database": "mydb",
    "environment": "production",
    "ssl": false
  }
}
  1. 해당 파일을 가리키는 MYSQL_DATABASES_CONFIG 환경 변수를 설정합니다.

  2. 서버를 실행합니다:

npx tsx index.ts

도구

도구

설명

list_connections

구성된 모든 데이터베이스와 활성 데이터베이스 나열

use_connection

활성 데이터베이스 연결 전환

query

읽기 전용 SQL 쿼리 실행

MCP 클라이언트 구성

{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": ["tsx", "/path/to/mysql-mcp/index.ts"],
      "env": {
        "MYSQL_DATABASES_CONFIG": "/path/to/databases.json"
      }
    }
  }
}

라이선스

MIT

-
security - not tested
A
license - permissive license
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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

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