MSSQL MCP Server
This server provides a high-performance MSSQL database management interface through the Model Context Protocol (MCP), leveraging Bun runtime for exceptional speed and offering secure, permission-controlled database operations.
Core Database Operations:
Connect to MSSQL databases with configurable connection parameters (server, port, credentials, encryption)
List available user databases and switch between different databases on the same server
Discover and list tables within the current database
Inspect database schema by describing table structures, fields, and column information
Execute SQL queries with optional result limits (default 100 rows)
Monitor connection status and explicitly disconnect when needed
Security & Permissions:
Granular permission control via environment variables with four modes: read-only (default), write, full (insert/update/delete), and danger mode
Secure connection options including encryption and authentication controls
Performance & Integration:
High-performance Bun runtime delivering faster startup and lower memory footprint compared to traditional Node.js
Seamless Claude Code integration through
.mcp.jsonconfiguration for simplified setupMultiple deployment methods including direct TypeScript execution, Bunx auto-install, or compiled standalone binaries
Uses .env files to manage environment variables for database connection configurations, supporting flexible deployment across different environments.
Leverages npm for package management, installation of dependencies, and running build and development scripts for the MCP server.
Utilizes TypeScript for type definitions and project structure, with the codebase organized into TypeScript modules for database management and type definitions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MSSQL MCP Servershow me the top 10 customers by total purchase amount"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MSSQL MCP Server - Bunx Edition 🚀
使用 Bun 和 Bunx 驅動的高效能 MSSQL MCP 伺服器,比傳統 Node.js 快 100 倍!
🎯 核心優勢
⚡ 極速啟動: 利用 Bun 的快速啟動時間,比 npx 快約 100 倍
📦 原生 TypeScript: 無需編譯,直接執行 TypeScript 程式碼
🔄 自動安裝: Bunx 自動管理依賴套件
💾 全域快取: 智慧快取機制,避免重複下載
🏗️ 獨立執行檔: 可編譯為單一執行檔,無需安裝 runtime
Related MCP server: Python MSSQL MCP Server
📋 先決條件
# 安裝 Bun (Windows/Linux/macOS)
curl -fsSL https://bun.sh/install | bash
# 或使用 npm
npm install -g bun🚀 快速開始
方法 1: 使用 Bunx (推薦 - 無需安裝)
# 從 npm 自動安裝並執行(最新版本)
bunx --bun @yuuzu/mssql-mcp
# 或執行本地套件
bunx --bun mssql-mcp方法 2: 使用 npm/npx
# 全域安裝
npm install -g @yuuzu/mssql-mcp
mssql-mcp
# 或使用 npx(無需安裝)
npx @yuuzu/mssql-mcp方法 3: 開發模式
# 克隆專案
git clone https://github.com/nakiriyuuzu/mssql-mcp.git
cd mssql-mcp
# 安裝依賴
bun install
# 直接執行 TypeScript
bun run start
# 或
bun run src/index.ts方法 4: 編譯獨立執行檔
# 編譯為跨平台執行檔
bun run build
# 編譯為 Windows 執行檔
bun run build:exe
# 執行編譯後的檔案
./dist/mssql-mcp🔒 安全性與權限控制
環境變數權限設定
MSSQL MCP Server 預設為唯讀模式,只允許執行 SELECT 查詢。你可以透過環境變數啟用不同的權限層級:
環境變數 | 說明 | 預設值 |
| 允許 INSERT 操作 |
|
| 允許 UPDATE 操作 |
|
| 允許 DELETE 操作 |
|
| Danger 模式) |
|
預設啟動模式
# 🟢 安全模式(預設)- 只允許 SELECT
bun run start
bunx --bun @yuuzu/mssql-mcp
# 🟡 唯讀模式 - 明確禁止所有寫入
bun run start:safe
MSSQL_ALLOW_INSERT=false MSSQL_ALLOW_UPDATE=false MSSQL_ALLOW_DELETE=false bunx --bun @yuuzu/mssql-mcp
# 🟠 寫入模式 - 允許 INSERT 和 UPDATE
bun run start:write
MSSQL_ALLOW_INSERT=true MSSQL_ALLOW_UPDATE=true bunx --bun @yuuzu/mssql-mcp
# 🔴 完整模式 - 允許 INSERT、UPDATE 和 DELETE
bun run start:full
MSSQL_ALLOW_INSERT=true MSSQL_ALLOW_UPDATE=true MSSQL_ALLOW_DELETE=true bunx --bun @yuuzu/mssql-mcp
# 🔥 Danger 模式 - 允許所有
bun run start:danger
MSSQL_DANGER_MODE=true bunx --bun @yuuzu/mssql-mcpWindows 環境設定
# PowerShell
$env:MSSQL_DANGER_MODE="true"
bunx --bun @yuuzu/mssql-mcp
# CMD
set MSSQL_DANGER_MODE=true && bunx --bun @yuuzu/mssql-mcp🔧 Claude Code 整合
1. 自動設定 (使用 .mcp.json)
專案已包含 .mcp.json 設定檔,Claude Code 會自動偵測:
{
"mcpServers": {
"mssql": {
"command": "bunx",
"args": ["--bun", "mssql-mcp"]
}
}
}2. 手動設定選項
編輯 mcp-config-bun.json 選擇不同的執行模式:
{
"mcpServers": {
"mssql-local": {
"comment": "使用本地安裝的套件 (最快)",
"command": "bunx",
"args": ["--bun", "mssql-mcp"]
},
"mssql-npm": {
"comment": "從 npm 自動安裝並執行",
"command": "bunx",
"args": ["--bun", "@yuuzu/mssql-mcp"]
},
"mssql-dev": {
"comment": "開發模式 - 直接執行 TypeScript",
"command": "bun",
"args": ["run", "./src/index.ts"]
},
"mssql-compiled": {
"comment": "執行編譯後的獨立執行檔",
"command": "./dist/mssql-mcp",
"args": []
}
}
}3. 帶權限設定的 MCP 配置
在 Claude Code 的 MCP 配置中加入環境變數來控制權限:
{
"mcpServers": {
"mssql-readonly": {
"comment": "唯讀模式 - 只允許 SELECT",
"command": "bunx",
"args": ["--bun", "@yuuzu/mssql-mcp"],
"env": {
"MSSQL_ALLOW_INSERT": "false",
"MSSQL_ALLOW_UPDATE": "false",
"MSSQL_ALLOW_DELETE": "false"
}
},
"mssql-write": {
"comment": "寫入模式 - 允許 INSERT 和 UPDATE",
"command": "bunx",
"args": ["--bun", "@yuuzu/mssql-mcp"],
"env": {
"MSSQL_ALLOW_INSERT": "true",
"MSSQL_ALLOW_UPDATE": "true",
"MSSQL_ALLOW_DELETE": "false"
}
},
"mssql-full": {
"comment": "完整模式 - 允許 INSERT、UPDATE 和 DELETE",
"command": "bunx",
"args": ["--bun", "@yuuzu/mssql-mcp"],
"env": {
"MSSQL_ALLOW_INSERT": "true",
"MSSQL_ALLOW_UPDATE": "true",
"MSSQL_ALLOW_DELETE": "true"
}
},
"mssql-danger": {
"comment": "⚠️ DANGER 模式 - 允許大部分操作(慎用!)",
"command": "bunx",
"args": ["--bun", "@yuuzu/mssql-mcp"],
"env": {
"MSSQL_DANGER_MODE": "true"
}
}
}
}💡 提示:你可以在 Claude Code 中同時配置多個不同權限等級的 MSSQL 伺服器,根據需求選擇使用。
📊 效能比較
執行方式 | 啟動時間 | 記憶體使用 | 特點 |
| ~10ms | 低 | 最快,自動管理依賴 |
| ~8ms | 最低 | 開發模式,即時執行 |
| ~1000ms | 高 | 傳統方式,較慢 |
獨立執行檔 | ~5ms | 中 | 無需 runtime,部署簡單 |
🛠️ 開發指令
# 開發模式 (熱重載)
bun run dev
# 執行測試
bun test
# 執行 Bunx 相容性測試
bun run test-bunx.js
# 建置獨立執行檔
bun run build
# 清理建置檔案
bun run clean🐛 故障排除
Bunx 找不到套件
# 確保套件已正確安裝
bun install
# 或使用完整套件名稱
bunx --bun @yuuzu/mssql-mcp權限問題
# Unix/Linux/macOS
chmod +x src/index.ts
# Windows - 使用 bun run
bun run startClaude Code 無法連接
確認 Bun 已正確安裝:
bun --version檢查
.mcp.json設定重新載入 Claude Code 視窗
🔍 測試執行
# 執行完整測試套件
bun test
# 測試 Bunx 相容性
bun run test-bunx.js
# 手動測試伺服器啟動
echo "" | bun run src/index.ts📦 發布到 npm
# 使用 Bun 發布
bun publish
# 或使用 npm
npm publish🎯 最佳實踐
開發階段: 使用
bun run dev快速迭代測試階段: 使用
bunx --bun mssql-mcp測試套件執行生產部署: 編譯為獨立執行檔,無需安裝 runtime
Claude Code: 使用
.mcp.json自動設定
🚄 為什麼選擇 Bun?
速度: 啟動時間比 Node.js 快 100 倍
原生 TypeScript: 無需 ts-node 或編譯步驟
內建工具: 包含套件管理、測試、打包等功能
相容性: 高度相容 Node.js 生態系統
效能: 更低的記憶體使用和 CPU 消耗
📚 相關資源
Available Tools
8 toolsconnect-databaseC
連接到 MSSQL 資料庫伺服器
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | 資料庫名稱 (可選) | |
| encrypt | No | 是否加密連接 (預設: true) | |
| password | Yes | 密碼 | |
| port | No | 連接埠號 (預設: 1433) | |
| server | Yes | MSSQL 伺服器位址 | |
| trustServerCertificate | No | 是否信任伺服器憑證 (預設: false) | |
| user | Yes | 使用者名稱 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('connect') but reveals nothing about what happens after connection: whether it establishes a persistent session, returns a connection object, handles authentication errors, or has rate limits. For a critical operation like database connection, this lack of behavioral context is a significant gap.
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 a single, efficient sentence in Chinese that directly states the tool's function without any fluff or redundancy. It's appropriately sized for a straightforward connection tool and gets straight to the point.
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 database connection tool with 7 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the connection enables (e.g., subsequent queries), what format the connection takes, or error handling. Given the complexity and lack of structured data, more context about the connection lifecycle and behavioral outcomes is needed.
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 has 100% description coverage, providing detailed documentation for all 7 parameters including defaults and requirements. The description adds no parameter-specific information beyond implying MSSQL as the database type, which is already evident from the schema. This meets the baseline of 3 for high schema coverage.
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 '連接到 MSSQL 資料庫伺服器' clearly states the verb ('連接' meaning 'connect') and resource ('MSSQL 資料庫伺服器'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'switch-database' or 'connection-status', which would require more specific language about establishing a new connection versus managing existing ones.
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 provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing server credentials), when not to use it (e.g., if already connected), or how it relates to siblings like 'disconnect' or 'switch-database'. This leaves the agent with minimal context for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
connection-statusB
檢查目前的資料庫連接狀態
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool checks connection status, implying a read-only operation, but doesn't specify what information is returned (e.g., success/failure, latency, error details), whether it requires authentication, or if it has side effects. This leaves significant gaps in understanding the tool's behavior.
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 a single, clear sentence in Chinese that directly states the tool's purpose without any unnecessary words or structural fluff. It is front-loaded and efficiently communicates the core function, making it highly concise and well-structured.
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 (0 parameters, no output schema, no annotations), the description is minimal but adequate for basic understanding. However, it lacks details on what the check entails (e.g., returns a boolean, detailed status, or error), making it incomplete for an agent to fully anticipate the tool's behavior without additional context.
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 input schema has 0 parameters with 100% coverage, meaning no parameters are documented. The description doesn't mention any parameters, which is appropriate since none exist. It earns a baseline 4 because it doesn't need to compensate for missing parameter info, but loses a point for not explicitly noting the lack of inputs.
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 action ('檢查' meaning 'check' or 'inspect') and the target ('資料庫連接狀態' meaning 'database connection status'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'connect-database' or 'disconnect', which also relate to connection management, so it doesn't reach the highest clarity level.
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 provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether a connection must be established first), exclusions, or comparisons to siblings like 'connect-database' for establishing connections or 'disconnect' for terminating them, leaving the agent with minimal context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
describe-tableC
查看指定資料表的欄位結構
| Name | Required | Description | Default |
|---|---|---|---|
| schemaName | No | 結構描述名稱 (預設: dbo) | dbo |
| tableName | Yes | 資料表名稱 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('查看' - view), implying it's non-destructive, but doesn't mention authentication requirements, rate limits, error conditions, or what the output contains (e.g., column names, types, constraints). For a metadata tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.
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 a single, efficient sentence in Chinese that directly states the tool's purpose without any fluff. It's appropriately sized and front-loaded, with every word contributing to understanding what the tool does. No wasted space or unnecessary elaboration.
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 moderate complexity (metadata inspection with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what '欄位結構' (field structure) includes, potential output format, error handling, or dependencies on other tools like 'connect-database'. For a tool that likely returns detailed schema information, more context is needed to use it effectively.
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%, with both parameters ('schemaName' and 'tableName') clearly documented in the schema. The description adds no additional parameter information beyond implying a 'tableName' is required. Since the schema does the heavy lifting, the baseline score of 3 is appropriate—the description doesn't compensate but doesn't need to given the comprehensive schema documentation.
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 '查看指定資料表的欄位結構' (View the field structure of a specified table) clearly states the tool's purpose with a specific verb ('查看' - view) and resource ('資料表的欄位結構' - table's field structure). It distinguishes this as a metadata inspection tool rather than a data query or connection management tool, though it doesn't explicitly differentiate from potential sibling tools like 'list-tables' beyond the obvious scope difference.
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 provides no guidance on when to use this tool versus alternatives. While the purpose is clear, there's no mention of prerequisites (e.g., needing an active database connection), when this tool is appropriate versus 'list-tables' or 'execute-query', or any constraints on its use. The agent must infer usage from context alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
disconnectB
斷開資料庫連接
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. '斷開資料庫連接' implies a destructive operation that terminates a connection, but it doesn't specify whether this requires an active connection first, what happens to pending queries, or if the operation is reversible. For a potentially destructive tool with zero annotation coverage, this is insufficient.
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 a single, efficient phrase ('斷開資料庫連接') that directly states the tool's purpose with zero wasted words. It's appropriately sized and front-loaded for a simple, parameterless operation.
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 (0 parameters, no output schema), the description is minimally adequate. However, as a potentially destructive operation with no annotations, it should ideally mention prerequisites (e.g., requires an active connection) or effects. The absence of output schema isn't critical here since the action is straightforward.
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 tool has 0 parameters with 100% schema description coverage, so the schema fully documents the absence of parameters. The description doesn't need to add parameter information, and the baseline for 0 parameters is 4. No additional semantic value is required or provided.
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 '斷開資料庫連接' (Disconnect database connection) clearly states the action (disconnect) and target (database connection), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'connect-database' or 'connection-status', which would require a 5.
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 provides no guidance on when to use this tool versus alternatives. There are no explicit when/when-not instructions or references to sibling tools like 'connect-database' or 'connection-status' that handle related database connection operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute-queryC
執行 SQL 查詢語句
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | 結果筆數限制 (預設: 100) | |
| query | Yes | 要執行的 SQL 查詢語句 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions execution but doesn't specify whether this is read-only or can modify data, what permissions are required, potential rate limits, error handling, or output format. For a tool that executes arbitrary SQL queries, this lack of transparency is a significant gap.
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 extremely concise at just four Chinese characters, with zero wasted words. It's front-loaded with the core action and resource. While potentially too brief for completeness, it earns full marks for conciseness and structure.
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 complexity of executing arbitrary SQL queries, no annotations, no output schema, and sibling tools that suggest database operations, the description is inadequate. It doesn't address critical context like connection requirements, safety considerations, or what happens when queries fail. The description should do more to help an agent use this tool correctly.
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%, with clear documentation for both parameters ('query' and 'limit'). The description doesn't add any meaningful semantic information beyond what the schema already provides, such as query syntax examples or limit implications. Baseline 3 is appropriate when the schema does the heavy lifting.
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 '執行 SQL 查詢語句' (Execute SQL query statement) clearly states the tool's action (execute) and resource (SQL query), but it's vague about scope and doesn't distinguish from siblings like 'describe-table' or 'list-tables' which also involve database operations. It provides basic purpose but lacks specificity about what kind of queries or databases it works with.
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 provides no guidance on when to use this tool versus alternatives like 'describe-table' or 'list-tables', nor does it mention prerequisites such as needing an active database connection. It simply states what the tool does without context about appropriate use cases or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list-databasesB
列出伺服器上的所有使用者資料庫
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states what the tool does but lacks behavioral details such as whether it requires authentication, how results are formatted (e.g., list of names, JSON), if there are rate limits, or if it's a read-only operation. The description is minimal and doesn't compensate for the lack of 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 a single, clear sentence that directly states the tool's purpose with zero waste. It's appropriately sized and front-loaded, making it easy to understand at a glance.
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 (0 parameters, no output schema, no annotations), the description is adequate but has gaps. It covers the basic purpose but lacks context on usage, behavioral traits, or output format. For a list operation with no structured data, more guidance would be helpful, but it meets the minimum viable threshold.
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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate here. A baseline of 4 is applied since there are no parameters to document, and the description doesn't introduce confusion.
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 action (list) and target (user databases on the server). It's specific enough to understand the tool's function, though it doesn't explicitly differentiate from sibling tools like 'list-tables' or 'describe-table' beyond the scope of databases vs. tables.
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?
No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a connection first), exclusions, or comparisons to siblings like 'list-tables' (which lists tables within a database) or 'describe-table' (which describes table structure).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list-tablesB
列出目前資料庫中的所有資料表
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists tables but doesn't describe what 'current database' means, whether it requires an active connection, how results are formatted, or if there are limitations (e.g., pagination). For a tool with zero annotation coverage, this is a significant gap in transparency.
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 a single, efficient sentence in Chinese: '列出目前資料庫中的所有資料表'. It is front-loaded with the core action and resource, with zero wasted words or redundancy, making it highly concise and well-structured.
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 complexity (a read operation with no parameters) and the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'current database' refers to, whether a connection is required, or what the output looks like (e.g., a list of table names). For a tool with no structured support, more context is needed to be fully helpful.
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 tool has 0 parameters, and the schema description coverage is 100% (since there are no parameters to describe). The description doesn't need to add parameter details, so it meets the baseline of 4 for tools with no parameters, as it doesn't have to compensate for any schema gaps.
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's purpose: '列出目前資料庫中的所有資料表' (List all tables in the current database). It specifies the verb '列出' (list) and the resource '資料表' (tables), making the action clear. However, it doesn't explicitly differentiate from sibling tools like 'list-databases' or 'describe-table', which would require a 5.
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 provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a database connection), exclusions, or comparisons to siblings like 'list-databases' (which lists databases) or 'describe-table' (which describes a specific table). This leaves usage context ambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
switch-databaseC
切換到指定的資料庫
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | 要切換到的資料庫名稱 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states the action ('switch') but doesn't disclose behavioral traits such as whether this requires authentication, if it's destructive (e.g., closes previous connections), error conditions, or what happens on success. This leaves critical operational details unspecified for a mutation tool.
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 a single, efficient sentence in Chinese ('切換到指定的資料庫'), which is appropriately sized and front-loaded with the core action. There is no wasted verbiage or structural issues.
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 complexity (a mutation with no annotations and no output schema), the description is incomplete. It lacks details on behavior, side effects, prerequisites, and expected outcomes, making it inadequate for safe and effective use by an AI agent in this context.
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 description adds minimal meaning beyond the input schema, which has 100% coverage and documents the single parameter 'database' as '要切換到的資料庫名稱' (the database name to switch to). With zero parameters undocumented, the baseline is 4, as the description doesn't need to compensate but also doesn't enhance parameter understanding significantly.
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 '切換到指定的資料庫' (switch to the specified database) states a clear verb ('switch') and resource ('database'), but it's vague about what 'switch' means operationally. It doesn't distinguish from siblings like 'connect-database' or 'list-databases', leaving ambiguity about whether this establishes a new connection or changes an active session.
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?
There is no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing connection), exclusions, or relationships to siblings like 'connect-database' for initial setup or 'disconnect' for cleanup. The agent must infer usage from context alone.
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.
8 tool updates
v1.0.0- First observed
connect-database - First observed
connection-status - First observed
describe-table - First observed
disconnect - First observed
execute-query - First observed
list-databases - First observed
list-tables - First observed
switch-database
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose with no ambiguity. Tools like connect-database, disconnect, and connection-status handle connection management separately from data operations like execute-query, list-tables, and describe-table. The separation between list-databases and list-tables is also well-defined, preventing misselection.
All tools follow a consistent verb_noun naming pattern with hyphens (e.g., connect-database, execute-query, list-tables). There are no deviations in style or convention, making the tool set predictable and easy to understand at a glance.
With 8 tools, the server is well-scoped for database operations. Each tool earns its place by covering essential functions like connection management, database navigation, and query execution without being overly complex or sparse. This count aligns well with typical MCP server ranges.
The tool set provides strong coverage for core MSSQL operations, including connection lifecycle, database listing, table exploration, and query execution. A minor gap exists in lacking explicit CRUD operations (e.g., insert, update, delete), but agents can work around this using execute-query for custom SQL, keeping the surface functional for most workflows.
Maintenance
Related MCP Connectors
Model Context Protocol server for Studex tools, notifications, and profile integrations
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
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.
A Model Context Protocol (MCP) server for Selise Blocks Cloud integration
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables execution of SQL queries and management of Microsoft SQL Server database connections through the Model Context Protocol.331,77415MIT
- FlicenseNot gradedqualityDmaintenanceEnables Language Models to interact with Microsoft SQL Server databases by inspecting table schemas, executing SQL queries, and reading table data through a standardized Model Context Protocol interface.27-
- FlicenseAqualityDmaintenanceEnables AI assistants to query, analyze, and manage SQL Server databases through natural language via the Model Context Protocol.61-
- FlicenseAqualityBmaintenanceEnables AI assistants to connect to SQL Server databases and execute arbitrary SQL operations, including queries, updates, table management, and script execution, through the Model Context Protocol.7-