db-query-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_connectionsA | 등록된 DB 연결 목록(번호와 별칭)을 조회한다. 어떤 DB를 쓸지 모호하면 이 목록을 사용자에게 보여주고 번호를 선택받는다. |
| run_select_queryA | 읽기 전용 쿼리(SELECT, SHOW, DESC, EXPLAIN)를 실행하고 결과를 반환한다. 데이터를 변경하는 쿼리는 거부된다. |
| run_write_queryA | 데이터를 변경하는 쿼리(INSERT/UPDATE/DELETE/DDL 등)를 실행한다. 반드시 실행 전에 사용자에게 쿼리 내용을 보여주고 승인을 받아야 하며, Claude Code 권한 설정(ask)에 의해 실행 직전 화면에서 한 번 더 확인된다. 읽기 전용(read-only)으로 등록된 연결에서는 서버가 강제로 거부한다. |
| get_management_commandsA | 사용자가 DB 연결을 추가/삭제하거나, 접속 정보(ID·PW·host 등)를 변경하거나, 별칭을 수정하려고 할 때 호출한다. 이런 작업은 보안상 AI(MCP)가 직접 수행할 수 없고 사용자가 터미널에서 직접 실행해야 한다. 이 도구가 반환한 명령어를 사용자에게 그대로 안내하라. 임의로 명령어를 지어내지 말 것. |
| test_connectionA | 지정한 번호의 DB에 실제로 접속되는지 확인한다(SELECT 1). 접속 정보나 데이터는 노출하지 않고 성공/실패만 반환한다. |
| get_recent_queriesA | 최근 실행한 쿼리(select/write) 최대 10개를 최신순으로 반환한다. 사용자가 '방금/최근에 무슨 쿼리 실행했어?'처럼 물으면 호출한다. 쿼리 결과나 접속 정보는 보관/반환하지 않는다. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Each tool has a distinctly different purpose: listing connections, testing connections, running read-only queries, running write queries, fetching management commands, and retrieving recent queries. There is no meaningful overlap that would confuse an agent's tool selection.
All tool names follow a consistent snake_case verb_noun pattern (list_connections, run_select_query, test_connection, run_write_query, get_management_commands, get_recent_queries). The naming clearly signals the action and target of each tool.
Six tools is well-scoped for a DB query MCP server. Each tool covers a necessary part of the workflow—connection discovery, connectivity checks, read/write query execution, management guidance, and query history—without unnecessary bloat.
The tool surface covers the core DB interaction lifecycle: list connections, test availability, run read queries, run write queries, and review recent queries. Connection management is intentionally delegated to terminal commands, and the provided tool properly guides users through that process, so there are no obvious dead ends.