MySQL MCP Server
MySQL MCP Server
MySQL 데이터베이스와의 안전한 상호작용을 지원하는 Model Context Protocol(MCP) 구현체입니다. 이 서버 구성 요소는 AI 애플리케이션(호스트/클라이언트)과 MySQL 데이터베이스 간의 통신을 구축하며, 제어된 인터페이스를 통해 데이터베이스 탐색과 분석을 더 안전하고 구조화된 방식으로 수행합니다.
참고: MySQL MCP Server는 STDIO(표준 입출력)와 Streamable HTTP(SSE) 두 가지 전송 모드를 모두 지원합니다. 원격/자체 호스팅 배포에는 SSE 모드를 권장합니다.
배포 방식
관리형 — Fronteir AI가 서버를 대신 실행하므로 로컬 설정이 필요 없습니다.
로컬 — Smithery가 사용자 컴퓨터에 서버를 설치하고 실행합니다.
Related MCP server: mysql-mcp-server
기능
리소스 형태로 사용 가능한 MySQL 테이블 나열
테이블 내용 읽기
완벽한 오류 처리를 갖춘 SQL 쿼리 실행
다중 데이터베이스 모드(선택적
MYSQL_DATABASE)SSE/HTTP 전송 지원(
MCP_TRANSPORT=sse)SSH 터널 지원
전체 테이블 구조 정보
테이블 데이터 샘플링
환경 변수를 통한 안전한 데이터베이스 접근
완벽한 로깅
설치
수동 설치
pip install mysql-mcp-serverSmithery를 통한 설치
Smithery를 사용하여 Claude Desktop용 MySQL MCP Server를 자동으로 설치합니다:
npx -y @smithery/cli install designcomputer/mysql-mcp-server --client claudeClaude Code CLI를 통한 설치
claude mcp add --transport stdio designcomputer-mysql_mcp_server uvx mysql_mcp_serverAutohand Code CLI를 통한 설치
autohand mcp add mysql env MYSQL_HOST=localhost MYSQL_PORT=3306 MYSQL_USER=your_username MYSQL_PASSWORD=your_password MYSQL_DATABASE=your_database uvx mysql_mcp_servermcp add 뒤에 --scope project를 추가하면 등록 정보가 현재 작업 공간에 유지됩니다. 현재 CLI에 대한 자세한 내용은 Autohand Code를 참조하세요.
구성
다음 환경 변수를 설정합니다:
MYSQL_HOST=localhost # 数据库主机
MYSQL_PORT=3306 # 可选:数据库端口(不指定时默认 3306)
MYSQL_USER=your_username
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=your_database # 可选:留空则进入多数据库模式
# 高级配置
MYSQL_SSL_MODE=DISABLED # DISABLED、REQUIRED、VERIFY_CA、VERIFY_IDENTITY
MYSQL_CONNECT_TIMEOUT=10 # 超时时间(秒)
# 连接行为(可选)
MYSQL_SQL_MODE=TRADITIONAL # 连接所应用的 SQL mode(默认:TRADITIONAL)
# 兼容性(可选)
MYSQL_CHARSET=utf8mb4
MYSQL_COLLATION=utf8mb4_unicode_ci
MYSQL_AUTH_PLUGIN= # 例如旧版 MySQL 使用 mysql_native_password
MYSQL_USE_PURE=false # 强制使用纯 Python 连接器(默认:false)
MYSQL_RAISE_ON_WARNINGS=false # 出现 SQL 警告时抛出异常(默认:false)
# SSE 传输(可选)
MCP_TRANSPORT=stdio # stdio 或 sse
MCP_SSE_HOST=0.0.0.0 # 监听所有网卡(Docker/托管部署需要)
PORT=8000 # HTTP 端口(MCP_SSE_PORT 的回退值)
MCP_SSE_ALLOWED_HOSTS= # 逗号分隔的允许 Host 头(默认:localhost:{port},127.0.0.1:{port})
# SSH 隧道(可选)
MYSQL_SSH_ENABLE=false # 设为 true 启用
MYSQL_SSH_HOST= # SSH 跳板机
MYSQL_SSH_PORT=22 # SSH 端口
MYSQL_SSH_USER= # SSH 用户名
MYSQL_SSH_KEY_PATH= # SSH 私钥路径
MYSQL_SSH_REMOTE_HOST=localhost # 从跳板机视角看的目标主机
MYSQL_SSH_REMOTE_PORT=3306
MYSQL_LOCAL_PORT=3330.env 파일 로드
서버 시작 시 python-dotenv를 통해 .env 파일이 자동으로 로드되므로, 로컬 사용은 다음과 같이 하면 됩니다:
cp .env.example .env # 然后填入你的凭据이 파일은 프로세스 작업 디렉터리(및 상위 디렉터리)에서 읽히므로, 프로젝트 디렉터리에서 서버를 직접 시작하면 정상적으로 작동합니다.
⚠️ Claude Code / Claude Desktop: 이러한 호스트는 자체 작업 디렉터리에서 서버를 시작하므로 프로젝트의
.env를 찾을 수 없으며,Missing required database configuration오류가 표시됩니다.MYSQL_*값을 MCP 구성의env블록(아래 "사용 방법" 참조)에 직접 넣고.env에 의존하지 마세요.
다중 데이터베이스 모드
MYSQL_DATABASE가 설정되지 않은 경우 서버는 다중 데이터베이스 모드로 진입합니다:
list_resources는 모든 사용자 데이터베이스를 반환합니다(시스템 데이터베이스는 필터링됨).SQL 쿼리에서
mydb.mytable과 같은 정규화된 테이블 이름을 사용합니다.참고: 단일 SQL 문만 지원하며, 다중 문 쿼리(예:
USE db; SELECT ...)는 지원하지 않습니다.
관리 페이지 및 다중 데이터베이스 별칭(SSE 모드)
SSE 모드로 서버를 시작하고 내장 관리 페이지를 열면 여러 데이터베이스 연결을 관리할 수 있으며, 각 연결에 별도의 읽기/쓰기 계정을 구성할 수 있습니다:
# Windows PowerShell
$env:MCP_TRANSPORT="sse"; $env:MCP_SSE_PORT="8000"; python -m mysql_mcp_server
# Linux/macOS
MCP_TRANSPORT=sse MCP_SSE_PORT=8000 python -m mysql_mcp_server관리 페이지: http://127.0.0.1:8000/admin/(루프백 전용 — 관리 API와 페이지는 비루프백 클라이언트와 알 수 없는 Host 헤더를 거부합니다. 리버스 프록시 뒤에 두지 마세요).
각 별칭은 다음을 구성할 수 있습니다:
필드 | 용도 |
연결(host/port/database) | 연결 대상. database를 비워두면 다중 데이터베이스 모드입니다. |
쿼리 사용자(read_user) | SELECT / SHOW / DESCRIBE / EXPLAIN에 사용 |
작업 사용자(write_user) | 확인 후 DML/DDL에 사용 |
write_policy |
|
allow_delete | DELETE / TRUNCATE / DROP의 총 스위치(기본값 꺼짐) |
클라이언트는 별칭으로 연결합니다: http://127.0.0.1:8000/sse?alias=db1
(alias를 생략하면 기본 별칭 사용). config/databases.json에 항목이 없으면 기존 MYSQL_* 환경 변수가 이전 버전과의 호환성을 위한 단일 데이터베이스 폴백으로 계속 작동합니다(이 모드에서는 읽기/쓰기가 동일한 계정을 공유).
위의 다중 데이터베이스 모드와의 차이점에 유의하세요: 그 모드는 단일 연결에서 여러 스키마를 노출하는 반면, 별칭 관리는 여러 연결을 관리하며 각 연결에 독립적인 계정과 쓰기 정책이 있습니다.
쓰기 작업 확인 방법: 서버는 각 문장에 대해 3단계 판정(읽기/쓰기/삭제)을 수행합니다. 읽기 작업은 쿼리 계정으로 직접 실행하고, 쓰기 작업과 삭제 작업은 MCP elicitation 팝업을 통해 전체 SQL을 표시합니다 — 수락하면 작업 계정으로 실행하고, 거부하면 중단합니다. 클라이언트가 elicitation을 지원하지 않는 경우 별칭의 write_policy에 따라 폴백 동작이 결정됩니다(위 표 참조). 모든 쓰기 작업 시도는 관리 페이지의 감사 목록에 기록됩니다(디스크에는 logs/audit.log).
사용 가능한 도구
execute_sql
임의의 표준 SQL 쿼리를 실행합니다.
매개변수:
query(문자열)기능:
SELECT,SHOW,DESCRIBE및 DML(INSERT,UPDATE,DELETE)을 지원합니다. DML 작업에는 파괴적 작업 경고 표시가 있습니다.제한: 단일 문만 지원하며, 다중 문 쿼리는 지원하지 않습니다.
크로스 데이터베이스:
MYSQL_DATABASE설정과 관계없이database.table표기법으로 모든 데이터베이스를 쿼리할 수 있습니다.
get_schema_info
데이터베이스 구조에 대한 상세 메타데이터를 제공합니다.
매개변수:
table_name(선택적 문자열)출력: 열 이름, 유형, null 허용 여부, 기본값 및 주석.
크로스 데이터베이스:
database.table을 전달하면MYSQL_DATABASE외부의 데이터베이스를 쿼리할 수 있습니다. 테이블 이름만 전달하면 구성된 데이터베이스를 사용합니다.식별자 규칙: 이름은 영숫자, 밑줄 및
$만 포함할 수 있습니다(점 하나는database.table구분자로 허용).
get_table_sample
대표적인 데이터 샘플을 가져옵니다.
매개변수:
table_name(문자열),limit(선택적 정수, 최대 20)용도: 큰 결과 집합을 가져오지 않고도 데이터 형식과 내용을 빠르게 파악할 수 있습니다.
크로스 데이터베이스:
database.table을 전달하면MYSQL_DATABASE외부의 데이터베이스에서 샘플링할 수 있습니다. 테이블 이름만 전달하면 구성된 데이터베이스를 사용합니다.식별자 규칙: 이름은 영숫자, 밑줄 및
$만 포함할 수 있습니다(점 하나는database.table구분자로 허용).
사용 가능한 프롬프트(Prompts)
도구 외에도 서버는 MCP 프롬프트를 제공합니다 — 클라이언트가 필요에 따라 시작할 수 있는 안내형 다단계 워크플로우입니다. Claude Code에서는 슬래시 명령(/mcp__<server>__<prompt>)으로 나타나고, Claude Desktop에서는 프롬프트(+) 메뉴에 있습니다.
Prompt | 매개변수 | 설명 |
| (없음) | 데이터베이스 체계적 탐색: 사용 가능한 테이블 발견, 테이블 구조 확인, 데이터 샘플링 및 내용 요약. |
|
| 지정된 테이블 심층 분석: 테이블 구조 가져오기, 데이터 샘플링 및 실용적인 쿼리 제안. |
예시(Claude Code):
/mcp__mysql__explore_database
/mcp__mysql__analyze_table customers두 프롬프트 모두 기존 get_schema_info 및 get_table_sample 도구를 오케스트레이션합니다. explore_database는 또한 리소스 목록을 사용하여 테이블을 열거합니다.
사용 방법
Claude Desktop과 함께 사용
claude_desktop_config.json에 다음 내용을 추가합니다:
{
"mcpServers": {
"mysql": {
"command": "uv",
"args": [
"--directory",
"path/to/mysql_mcp_server",
"run",
"mysql_mcp_server"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your_username",
"MYSQL_PASSWORD": "your_password",
"MYSQL_DATABASE": "your_database"
}
}
}
}더 자세한 예시와 각 에이전트별 안내는 MCP_USECASES.md를 참조하세요.
Visual Studio Code와 함께 사용
mcp.json에 다음 내용을 추가합니다:
{
"mcpServers": {
"mysql": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"mysql-mcp-server",
"mysql_mcp_server"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your_username",
"MYSQL_PASSWORD": "your_password",
"MYSQL_DATABASE": "your_database"
}
}
}
}참고: uv를 먼저 설치해야 합니다.
MCP Inspector로 디버깅
MySQL MCP Server는 독립 실행형 또는 Python 명령줄로 직접 시작하도록 설계된 프로그램이 아니지만, MCP Inspector를 사용하여 디버깅할 수 있습니다.
MCP Inspector는 MCP 구현을 테스트하고 디버깅하는 편리한 방법을 제공합니다:
# 安装依赖
pip install -r requirements.txt
# 使用 MCP Inspector 调试(不要直接用 Python 运行)MySQL MCP Server는 Claude Desktop과 같은 AI 애플리케이션에 통합되도록 설계되었으며, 독립 실행형 Python 프로그램으로 직접 실행해서는 안 됩니다.
개발
# 克隆仓库
git clone https://github.com/designcomputer/mysql_mcp_server.git
cd mysql_mcp_server
# 创建虚拟环境
python -m venv venv
source venv/bin/activate # Windows 上用 `venv\Scripts\activate`
# 安装开发依赖
pip install -r requirements-dev.txt
# 复制示例配置并填入你的凭据
cp .env.example .env
# 编辑 .env,填入 MySQL 连接信息
# 运行测试
pytest보안 주의사항
식별자 검증:
get_schema_info및get_table_sample에 전달되는 테이블 이름과 데이터베이스 이름은 엄격한 화이트리스트 검증을 거칩니다(영숫자, 밑줄 및$만 허용, 점 하나는database.table구분자로 허용). SQL 주입을 방지하기 위해 다른 특수 문자는 모두 거부됩니다.암호화 접근: 원격 연결 보안을 위해 SSL/TLS 및 SSH 터널을 완전히 지원합니다.
로그 개인정보 보호: 비밀번호와 SSH 개인 키는 서버 로그에서 자동으로 마스킹됩니다.
최소 권한: 항상 최소 권한의 전용 MySQL 사용자를 사용하세요.
SSE 전송에는 내장 인증이 없습니다. SSE 서버는 기본적으로
0.0.0.0에 바인딩되고 자격 증명 없이 연결을 수락합니다. localhost 외부에 노출하는 경우 강제 인증이 있는 리버스 프록시(nginx, Caddy, Traefik) 뒤에 두세요. nginx + HTTP Basic Auth 예시:location /sse { auth_basic "MCP"; auth_basic_user_file /etc/nginx/.htpasswd; proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_buffering off; } location /messages/ { auth_basic "MCP"; auth_basic_user_file /etc/nginx/.htpasswd; proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; }MCP_SSE_HOST=127.0.0.1을 설정하면 서버가 루프백 주소만 수신하므로 프록시가 유일한 공개 진입점이 됩니다.MCP_SSE_ALLOWED_HOSTS를 프록시가 전달하는 공개 호스트 이름으로 설정하세요(예:MCP_SSE_ALLOWED_HOSTS=myserver.example.com:443).
배포 보안 전체 가이드는 SECURITY.md를 참조하세요.
보안 모범 사례
이 MCP 구현은 작동을 위해 데이터베이스 접근 권한이 필요합니다. 보안을 위해:
전용 MySQL 사용자를 생성하고 최소 권한을 부여하세요.
절대 root 자격 증명이나 관리자 계정을 사용하지 마세요.
데이터베이스 접근을 필요한 작업으로 제한하세요.
감사를 위해 로깅을 활성화하세요.
데이터베이스 접근에 대한 정기적인 보안 검토를 수행하세요.
자세한 운영 지침은 MySQL 보안 구성 가이드를 참조하세요. 다음을 포함합니다:
제한된 MySQL 사용자 생성
적절한 권한 설정
데이터베이스 접근 모니터링
보안 모범 사례
⚠️ 중요: 데이터베이스 접근을 구성할 때 반드시 최소 권한 원칙을 따르세요.
라이선스
MIT License - 자세한 내용은 LICENSE 파일을 참조하세요.
기여하기
이 저장소를 Fork하세요.
기능 브랜치를 생성하세요(
git checkout -b feature/amazing-feature).변경 사항을 커밋하세요(
git commit -m 'Add some amazing feature').브랜치를 푸시하세요(
git push origin feature/amazing-feature).Pull Request를 생성하세요.
Available Tools
3 toolsexecute_sqlADestructive
Execute a SQL statement against the MySQL server. Use for SELECT, DML (INSERT/UPDATE/DELETE), SHOW, DESCRIBE, and ad-hoc queries. Supports cross-database queries using database.table notation. Single statements only — use fully qualified names instead of USE statements. Write/delete statements require user confirmation: depending on the client, either a confirmation prompt appears, or the first call returns a confirm_token — show the SQL to the user, and after explicit consent re-call with the same query plus confirm_token. Use the optional alias parameter to target a different configured database within a single connection.
| Name | Required | Description | Default |
|---|---|---|---|
| alias | No | 数据库别名,或管理页面 /admin 中为该库配置的项目名称(项目文件夹名)。在单个 SSE 连接内通过此参数切换不同库;省略时用连接 URL ?alias 指定的别名或默认别名。建议优先传当前项目文件夹名自动匹配对应数据库。 | |
| query | Yes | The SQL statement to execute. Single statements only. | |
| confirm_token | No | One-time confirmation token returned by a previous write attempt. Pass it with the SAME query after the user explicitly approved the SQL. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations mark this as destructive, and the description substantially expands on this by detailing the confirmation workflow: a prompt appears, or a confirm_token is returned and must be re-sent with the same query after explicit user consent. It also discloses single-statement-only behavior and cross-database support, going well beyond the annotation flags.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is dense but well-structured, front-loading the main purpose, then constraints, confirmation flow, and alias behavior. Every clause contributes essential information without redundancy, and its length is justified by the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive SQL tool with no output schema, this description covers all critical operational aspects: statement types, single-statement enforcement, cross-db notation, the confirmation protocol, and alias usage. The only gap is return-format details, but that is standard SQL client behavior and not essential for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already covers all parameters, so the baseline is 3. The description adds meaningful semantics for confirm_token (one-time token from a prior write attempt, pass with the same query after approval) and alias (switch database within a single connection), enriching the raw schema definitions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool as executing SQL statements against a MySQL server and enumerates supported statement types (SELECT, DML, SHOW, DESCRIBE, ad-hoc queries). It is distinct from sibling inspection tools by its general-purpose scope, though it does not explicitly name or contrast them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides direct usage guidance by enumerating applicable statement types and imposing constraints: single statements only, fully qualified names instead of USE statements, and confirmation for writes/deletes. It does not explicitly discuss when to prefer sibling tools like get_schema_info, but the implied distinction is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_schema_infoARead-only
Get column metadata for a table or all tables in the configured database: column names, data types, nullability, default values, and comments. Call this before querying an unfamiliar table. Omit table_name to see all tables at once. Accepts bare table names (uses MYSQL_DATABASE) or database.table for cross-database lookups. Use alias to target a different configured database.
| Name | Required | Description | Default |
|---|---|---|---|
| alias | No | 数据库别名,或管理页面 /admin 中为该库配置的项目名称(项目文件夹名)。在单个 SSE 连接内通过此参数切换不同库;省略时用连接 URL ?alias 指定的别名或默认别名。建议优先传当前项目文件夹名自动匹配对应数据库。 | |
| table_name | No | Optional: bare table name, or database.table for a cross-database lookup. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already mark readOnlyHint=true and destructiveHint=false, so the safety profile is known. The description adds behavioral context: it can return metadata for all tables when table_name is omitted, accepts database.table for cross-database lookups, and uses bare names with MYSQL_DATABASE, plus alias switching behavior. This goes beyond the annotations without contradicting them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded with the core purpose, then provides usage details in logical order. Every sentence contributes useful information without excessive verbosity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity, annotations, and full schema coverage, the description is complete enough for an agent to select and invoke it. It covers scoping, naming, and alias switching. Minor gaps like return format are acceptable since no output schema exists and the tool is a read-only metadata lookup.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema documents both parameters. The description still adds meaning by explaining the semantic effects of omitting table_name, the database.table format, bare-name resolution via MYSQL_DATABASE, and alias behavior.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves column metadata (names, data types, nullability, defaults, comments) for a table or all tables, with a specific resource and verb. It also distinguishes itself from sibling tools by positioning it as the pre-query metadata lookup.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says to call this before querying an unfamiliar table, explains how to list all tables, and notes cross-database usage and alias-based targeting. This provides clear contextual guidance on when and how to use the tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_table_sampleARead-only
Fetch a small sample of rows from a table to understand its data format and content. Use alongside get_schema_info before writing complex queries. Accepts bare table names (uses MYSQL_DATABASE) or database.table for cross-database lookups. Use alias to target a different configured database.
| Name | Required | Description | Default |
|---|---|---|---|
| alias | No | 数据库别名,或管理页面 /admin 中为该库配置的项目名称(项目文件夹名)。在单个 SSE 连接内通过此参数切换不同库;省略时用连接 URL ?alias 指定的别名或默认别名。建议优先传当前项目文件夹名自动匹配对应数据库。 | |
| limit | No | Number of rows to return (default 5, max 20). | |
| table_name | Yes | Table to sample. Use database.table notation for cross-database queries. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds valuable behavioral context: bare table names use MYSQL_DATABASE, database.table enables cross-database lookups, and alias switches the configured database target. It does not describe return shape or sampling order, but these are less critical given the read-only annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is four sentences with no filler: purpose, usage timing, table-name syntax, and alias behavior each get one focused sentence. It is front-loaded with the core action and reads efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only sampler with no output schema, the description covers what the tool does, when to use it, how to name tables, and how to override the database target. An agent has enough information to invoke it correctly without needing to infer anything beyond the schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description goes beyond the schema by specifying that bare table names resolve to MYSQL_DATABASE and reinforcing how alias targets a different configured database. The limit parameter needs no extra explanation because the schema already documents default and maximum.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states a specific action and resource: 'Fetch a small sample of rows from a table to understand its data format and content.' It also names a companion tool (get_schema_info) and clearly frames this as an exploration tool, which distinguishes it from execute_sql even without an explicit contrast.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context: 'Use alongside get_schema_info before writing complex queries,' indicating when this tool is appropriate. It does not explicitly state when to prefer execute_sql instead, but the phrase 'before writing complex queries' implies the alternative, so it falls just short of fully explicit exclusion guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.4.4- First observed
execute_sql - First observed
get_schema_info - First observed
get_table_sample
TDQS
Scored across 3 tools
Each tool has a clear, distinct role: execute_sql for arbitrary SQL, get_schema_info for metadata, and get_table_sample for row previews. Although execute_sql can also run SHOW/SELECT statements, the specialized helper tools are explicitly framed as complementary, not competing.
All tool names follow a consistent verb_noun pattern in snake_case: execute_sql, get_schema_info, get_table_sample. This makes the action and target of each tool predictable.
Three tools is a compact but appropriate scope for a SQL database server: one general execution path plus two focused inspection helpers. Each tool serves a distinct need without redundancy.
The surface covers the core workflow: inspect schema, preview data, and execute arbitrary SQL for reads and writes. Cross-database behavior and user confirmation are handled, and remaining database-level operations can be reached via execute_sql.
Maintenance
Related MCP Connectors
Guard AI agents' PostgreSQL/MySQL access via MCP: SQL audit, auth, masking, write approval
- dataOAuthco.thinair
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Draxlr's remote MCP server connects AI assistants to your SQL databases and dashboards. Explore schemas, run read-only queries, manage saved queries and dashboards, and export results, all with row-level security so each user sees only their own data.
Paid remote MCP for governed database query review, SQL simulation, approvals, and audits.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables read-only interaction with SQL databases through MCP, providing database metadata exploration, sample data retrieval, and secure query execution. Supports MySQL with multiple transport options and built-in security features including SQL injection protection and data sanitization.16 npm5MIT
- AlicenseNot gradedqualityDmaintenanceEnables MySQL database operations through MCP, including executing SQL queries, listing databases and tables, and describing table structures.959 npm5MIT
- AlicenseNot gradedqualityCmaintenanceEnables safe querying and optional writing to MySQL databases via MCP tools, with support for schema inspection, connection management, and read-only mode.28 npm3MIT
- FlicenseAqualityCmaintenanceEnables interaction with MariaDB/MySQL databases via MCP, supporting read-only mode, SQL execution, and schema inspection.6-