Skip to main content
Glama
bymcs

MS SQL Server MCP Server

by bymcs

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DB_PORTNoSQL Server port1433
DB_USERNoUsername
DB_SERVERYesSQL Server hostname
DB_ENCRYPTNoEnable TLS encryption (required for Azure SQL)true
DB_DATABASENoDatabase name
DB_PASSWORDNoPassword
DB_REQUEST_TIMEOUTNoRequest timeout (ms)30000
DB_CONNECTION_TIMEOUTNoConnection timeout (ms)30000
DB_TRUST_SERVER_CERTIFICATENoTrust self-signed certificatesfalse

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

CapabilityDetails
tools
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
mssql_connect_databaseA

Connects to MS SQL Server using environment variables (DB_SERVER, DB_DATABASE, DB_USER, DB_PASSWORD, DB_PORT, DB_ENCRYPT, DB_TRUST_SERVER_CERTIFICATE). No credentials accepted as parameters — all connection settings come from the server environment only. Idempotent: calling again reconnects.

mssql_disconnect_databaseA

Closes the current database connection and releases the connection pool. Safe to call even if not connected. Idempotent.

mssql_connection_statusA

Returns the current connection status, server address, database name, and connection pool metrics. Read-only. Safe to call at any time.

mssql_run_sql_queryA

Executes an arbitrary SQL statement against the connected database. ⚠️ WARNING: This tool can read AND modify data (INSERT, UPDATE, DELETE, DDL). Always prefer parameterized inputs via the 'parameters' field — never embed user-supplied values directly in the query string. Example: query='SELECT * FROM dbo.Users WHERE Id = @id', parameters={id: 42}

mssql_execute_queryA

Deprecated alias for mssql_run_sql_query. Use mssql_run_sql_query instead. ⚠️ This tool can read AND modify data.

mssql_list_schema_objectsA

Lists tables, views, stored procedures, or functions in the connected database. Read-only. Supports filtering by schema name and pagination. Example: objectType='tables', schemaName='dbo', limit=20

mssql_get_schemaA

Deprecated alias for mssql_list_schema_objects. Use mssql_list_schema_objects instead.

mssql_describe_table_columnsA

Returns column definitions for a table: name, data type, length, nullability, default, and ordinal position. Read-only. Uses parameterized queries to prevent injection.

mssql_describe_tableA

Deprecated alias for mssql_describe_table_columns.

mssql_read_table_rowsA

Returns rows from a table with optional column projection, WHERE filtering, ORDER BY, and pagination. Read-only. Table and schema names are validated as safe identifiers. WHERE clause values MUST be passed via 'parameters' using @paramName placeholders. Pagination: limit (1-200, default 20) and offset. Example: tableName='Orders', schemaName='dbo', columns=['OrderId','Total'], limit=50

mssql_get_table_dataA

Deprecated alias for mssql_read_table_rows. Use mssql_read_table_rows instead. ⚠️ whereClause must use @paramName placeholders for all values.

mssql_execute_stored_procedureA

Executes a stored procedure by name. ⚠️ May modify data — use only when an action is intended. Schema and procedure names are validated as safe identifiers. Pass all value parameters via 'parameters'.

mssql_execute_procedureA

Deprecated alias for mssql_execute_stored_procedure.

mssql_list_databasesA

Lists all databases visible on the connected SQL Server instance with state and recovery information. Read-only. Supports pagination.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
connection-infoCurrent MSSQL connection status and configuration (no credentials exposed).
databasesSnapshot list of all databases on the SQL Server instance.
schemasSnapshot list of all schemas in the current database.

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/bymcs/mssql-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server