SQLServer MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SQLSERVER_PORT | No | SQL Server端口 | |
| SQLSERVER_USER | No | SQL登录名 | |
| SQLSERVER_SERVER | No | SQL Server服务器地址 | |
| SQLSERVER_DATABASE | No | 默认数据库 | |
| SQLSERVER_PASSWORD | No | SQL登录密码 | |
| SQLSERVER_WINDOWS_AUTH | No | 是否使用Windows集成认证 |
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 |
|---|---|
| test_connectionA | 测试与 SQL Server 的连接,返回服务器版本、当前数据库、当前连接配置(密码已脱敏)。无参数。 |
| configure_connectionA | 修改 SQL Server 连接配置(server/port/instanceName/database/user/password 等)。设置后立即生效,下次数据库操作使用新配置;persist=true 时写入 config.json 永久保存。 |
| list_databasesA | 列出 SQL Server 实例上的所有数据库。 |
| list_tablesA | 列出指定数据库中的表(可含视图)。 |
| describe_tableA | 查看表结构:列名、类型、是否可空、默认值、是否主键。 |
| execute_queryA | 执行任意 SQL 语句(SELECT/INSERT/UPDATE/DELETE/DDL 等)。支持命名参数:SQL 中写 @name,params 传 { name: value }(键不需要 @ 前缀)。SELECT 返回行数据,非查询语句返回受影响行数。 |
| execute_scriptA | 批量执行一段 SQL 脚本,支持多条语句与 GO 分隔符(按顺序执行,任一批次失败即停止并报告)。适合建表、初始化数据等场景。 |
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 7 tools
Each tool targets a unique aspect: database listing, table listing, schema details, ad-hoc queries, batch scripts, connection testing, and configuration changes. The two execute tools are clearly distinguished by single vs multi-statement batch execution.
All tools follow a consistent verb_noun pattern using lowercase snake_case, making the API predictable and easy to learn. No mixed conventions or vague verbs.
With 7 tools, the set is well-scoped for a SQL Server integration, covering essential operations without redundancy or bloat. It fits squarely in the ideal 3-15 range.
The tool set provides complete coverage for a SQL Server MCP: connection management, database/table discovery, schema inspection, and arbitrary SQL execution (both single statements and batch scripts). There are no obvious gaps that would cause agent failures.