Integrations
Uses environment variables stored in .env files for configuration management, particularly for sensitive database connection credentials.
Runs as a containerized service with special configurations for host connectivity, allowing MySQL database access from Docker environments with proper networking setup.
Enables interaction with MySQL databases through read-only queries, schema exploration, and safe testing of write operations (with rollback). Provides tools for executing queries, listing tables, and describing table structures.
MySQL MCP 서버
MySQL 데이터베이스와 상호작용하기 위한 MCP 서버.
이 서버는 읽기 전용 쿼리(query) 실행과 최종적으로 롤백되는 쓰기 쿼리(test_execute) 실행을 지원합니다.
설정
환경 변수
~/.mcp/.env
에 다음 환경 변수를 추가합니다.
지엑스피1
참고 :
host.docker.internal
은 Docker 컨테이너에서 호스트 머신 서비스에 액세스하기 위한 특수 DNS 이름입니다. 호스트 머신에서 실행 중인 MySQL 서버에 연결할 때 이 설정을 사용하세요. 다른 MySQL 서버에 연결하는 경우 적절한 호스트 이름으로 변경하세요.
mcp.json 구성
용법
서버 시작
참고 : OrbStack을 사용하는 경우
host.docker.internal
자동으로 지원되므로--add-host
옵션을 생략할 수 있습니다. Docker Desktop도 일반적으로 이 옵션을 자동으로 지원하지만, 안정성 향상을 위해--add-host
옵션을 추가하는 것이 좋습니다.
사용 가능한 명령
1. 읽기 전용 쿼리 실행
응답:
2. 테스트 쿼리 실행
응답:
3. 테이블 나열
응답:
4. 테이블 설명
응답:
구현 세부 사항
- TypeScript로 구현됨
- mysql2 패키지를 사용합니다
- Docker 컨테이너로 실행됩니다
- 표준 입력을 통해 JSON 명령을 수락합니다.
- 표준 출력을 통해 JSON 응답을 반환합니다.
host.docker.internal
사용하여 호스트 MySQL에 연결합니다(OrbStack 및 Docker Desktop과 호환).
보안 고려 사항
- 민감한 정보 관리를 위해 환경 변수를 사용합니다.
- SQL 주입 방지는 구현자의 책임입니다.
- 프로덕션 사용에 적합한 네트워크 구성이 필요합니다.
- 호스트 머신 서비스에 연결할 때 적절한 방화벽 설정이 필요합니다.
You must be authenticated.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
JSON 명령을 통해 MySQL 데이터베이스와 상호 작용하고, 읽기 전용 쿼리, 쓰기 쿼리의 테스트 실행, Docker를 통한 테이블 정보 검색을 지원합니다.
Related Resources
Related MCP Servers
- -securityFlicense-qualityFacilitates interaction with a local MySQL database via a RESTful API, supporting database queries and real-time updates with integration for Cursor MCP services.Last updated -2JavaScript
- -securityAlicense-qualityA Model Context Protocol server that provides read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.Last updated -1,857328TypeScriptMIT License
- -securityFlicense-qualityEnables secure interaction with MySQL databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.Last updated -Python
- -security-license-qualityAn MCP server that allows working with MySQL databases by providing tools for executing read-only SQL queries, getting table schemas, and listing database tables.Last updated -1JavaScript