MySQL MCP Server
A read-only MCP server that enables Claude Code to access MySQL databases, allowing safe querying with SELECT, SHOW, DESCRIBE, and EXPLAIN.
README
MySQL MCP Server
Claude Code에서 MySQL 데이터베이스에 접근하기 위한 읽기 전용 MCP(Model Context Protocol) 서버입니다.
특징
- 읽기 전용:
SELECT,SHOW,DESCRIBE,EXPLAIN쿼리만 허용 - 안전한 연결: Connection Pool 사용 (최대 5개 연결)
- 6가지 도구 제공: 쿼리 실행, 테이블 목록, 스키마 조회, 인덱스 확인, DDL 조회, 실행 계획 분석
설치
npm install @ahngbeom/mysql-mcp-server
Claude Code 설정
~/.claude.json 또는 프로젝트의 .mcp.json에 추가:
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": ["@ahngbeom/mysql-mcp-server"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your_user",
"MYSQL_PASS": "your_password",
"MYSQL_DB": "your_database"
}
}
}
}
환경 변수
| 변수 | 설명 | 기본값 |
|---|---|---|
MYSQL_HOST |
MySQL 호스트 | localhost |
MYSQL_PORT |
MySQL 포트 | 3306 |
MYSQL_USER |
사용자 이름 | root |
MYSQL_PASS |
비밀번호 | (없음) |
MYSQL_DB |
데이터베이스 이름 | mysql |
제공 도구
| 도구 | 설명 | 예시 |
|---|---|---|
query |
읽기 전용 SQL 쿼리 실행 | SELECT * FROM users LIMIT 10 |
list_tables |
데이터베이스의 모든 테이블 조회 | - |
describe_table |
테이블 구조 (컬럼, 타입, 키) 확인 | users |
show_indexes |
테이블의 인덱스 정보 조회 | users |
show_create_table |
CREATE TABLE 문 확인 | users |
explain |
쿼리 실행 계획 분석 | SELECT * FROM users WHERE id = 1 |
보안
INSERT,UPDATE,DELETE,DROP등 쓰기 쿼리는 차단됩니다- 프로덕션 환경에서는 읽기 전용 DB 계정 사용을 권장합니다
라이선스
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.