Skip to main content
Glama

MSSQL MCP Server

by EvilPhatBoi

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
READONLYNoEnable read-only modefalse
SERVER_NAMEYesSQL Server hostname
SQL_PASSWORDYesSQL password
SQL_USERNAMEYesSQL username
DATABASE_NAMEYesDatabase name
CONNECTION_TIMEOUTNoConnection timeout in seconds30
TRUST_SERVER_CERTIFICATENoTrust self-signed certificatesfalse

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
insert_data

Inserts data into an MSSQL Database table. Supports both single record insertion and multiple record insertion using standard SQL INSERT with VALUES clause. FORMAT EXAMPLES: Single Record Insert: { "tableName": "Users", "data": { "name": "John Doe", "email": "john@example.com", "age": 30, "isActive": true, "createdDate": "2023-01-15" } } Multiple Records Insert: { "tableName": "Users", "data": [ { "name": "John Doe", "email": "john@example.com", "age": 30, "isActive": true, "createdDate": "2023-01-15" }, { "name": "Jane Smith", "email": "jane@example.com", "age": 25, "isActive": false, "createdDate": "2023-01-16" } ] } GENERATED SQL FORMAT:

  • Single: INSERT INTO table (col1, col2) VALUES (@param1, @param2)
  • Multiple: INSERT INTO table (col1, col2) VALUES (@param1, @param2), (@param3, @param4), ... IMPORTANT RULES:
  • For single record: Use a single object for the 'data' field
  • For multiple records: Use an array of objects for the 'data' field
  • All objects in array must have identical column names
  • Column names must match the actual database table columns exactly
  • Values should match the expected data types (string, number, boolean, date)
  • Use proper date format for date columns (YYYY-MM-DD or ISO format)
read_data

Executes a SELECT query on an MSSQL Database table. The query must start with SELECT and cannot contain any destructive SQL operations for security reasons.

describe_table

Describes the schema (columns and types) of a specified MSSQL Database table.

update_data

Updates data in an MSSQL Database table using a WHERE clause. The WHERE clause must be provided for security.

create_table

Creates a new table in the MSSQL Database with the specified columns.

create_index

Creates an index on a specified column or columns in an MSSQL Database table

drop_table

Drops a table from the MSSQL Database.

list_table

Lists tables in an MSSQL Database, or list tables in specific schemas

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/EvilPhatBoi/McpSqlServer'

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