Skip to main content
Glama
huang-develop

SQLServer MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SQLSERVER_PORTNoSQL Server端口
SQLSERVER_USERNoSQL登录名
SQLSERVER_SERVERNoSQL Server服务器地址
SQLSERVER_DATABASENo默认数据库
SQLSERVER_PASSWORDNoSQL登录密码
SQLSERVER_WINDOWS_AUTHNo是否使用Windows集成认证

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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