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集成认证 |
Capabilities
Features and capabilities supported by this server
| 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 | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/huang-develop/SQLServer-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server