SQL Server MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SQLSERVER_HOST | No | 数据库主机地址。环境变量自动连接方式下必填;手动连接方式下可不设置。 | |
| SQLSERVER_PORT | No | 数据库端口,默认 1433。 | 1433 |
| SQLSERVER_USER | No | 数据库用户名。环境变量自动连接方式下必填;手动连接方式下可不设置。 | |
| SQLSERVER_ENCRYPT | No | 是否加密连接,默认 true。 | true |
| SQLSERVER_DATABASE | No | 数据库名称。环境变量自动连接方式下必填;手动连接方式下可不设置。 | |
| SQLSERVER_PASSWORD | No | 数据库密码。环境变量自动连接方式下必填;手动连接方式下可不设置。 | |
| SQLSERVER_TRUST_CERTIFICATE | No | 是否信任服务器证书,默认 false。 | false |
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 |
|---|---|
| connect_dbC | Connect to a SQL Server database |
| queryC | Execute a SELECT query and return results |
| executeC | Execute an INSERT, UPDATE, or DELETE query |
| list_tablesB | List all tables in the database |
| describe_tableC | Get the structure of a specific table |
| explainB | Analyze SQL query performance using execution plan |
| show_statementC | Execute system stored procedures or SHOW-like statements |
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
The core split between read (query), write (execute), and metadata (list_tables, describe_table) is clear, and explain is distinctly performance-focused. The only fuzzy boundary is execute vs. show_statement, since both run arbitrary SQL against the server and only the description distinguishes DML from stored procedures/SHOW statements.
Four tools follow a verb_noun pattern (describe_table, show_statement, connect_db, list_tables) while three are bare verbs (execute, explain, query), producing a mixed but still readable convention. 'query' is especially weak as a name since it is both a verb and a noun and doesn't pair with the others.
Seven tools is well-scoped for a database access server: one connection tool, two metadata tools, three execution tools, and one diagnostics tool. Each tool covers a distinct slice of the workflow and none feels redundant or padded.
The read/execute/metadata/explain loop is covered, but there is no DDL support (CREATE/ALTER/DROP TABLE) since execute is limited to INSERT/UPDATE/DELETE, no transaction control, no disconnect or list_databases to pair with connect_db. Agents can handle typical data workflows but will hit dead ends on schema changes and connection management.