SQL Server MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MAX_ROWS | No | Maximum rows returned | 100 |
| MSSQL_HOST | No | SQL Server hostname | localhost |
| MSSQL_PORT | No | SQL Server port | 1433 |
| MSSQL_USER | No | Username | |
| QUERY_TIMEOUT | No | Query timeout (seconds) | 30 |
| MSSQL_DATABASE | No | Default database | master |
| MSSQL_PASSWORD | No | Password | |
| ALLOWED_DATABASES | No | Comma-separated allowlist | |
| BLOCKED_DATABASES | No | Comma-separated blocklist | |
| MSSQL_CONNECTION_STRING | No | Full connection string (overrides above) |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_databasesB | List all accessible databases on the SQL Server |
| list_tablesC | List all tables in a database |
| get_table_definitionB | Get the full CREATE TABLE definition for a table |
| get_table_columnsC | Get detailed column information for a table |
| get_table_indexesC | Get index information for a table |
| get_table_relationshipsA | Get foreign key relationships for a table |
| list_viewsC | List all views in a database |
| get_view_definitionB | Get the CREATE VIEW definition |
| get_view_columnsC | Get column information for a view |
| list_proceduresC | List all stored procedures in a database |
| get_procedure_definitionB | Get the CREATE PROCEDURE definition |
| get_procedure_parametersB | Get parameter information for a stored procedure |
| list_functionsB | List all user-defined functions in a database |
| get_function_definitionC | Get the CREATE FUNCTION definition |
| execute_queryB | Execute a read-only SELECT query |
| get_sample_dataB | Get sample rows from a table |
| search_objectsB | Search for database objects by name across all databases |
| search_definitionsC | Search within object definitions (procedure/function/view source code) |
| list_schemasB | List all schemas in a database with object counts |
| get_schema_overviewC | Get an overview of a database schema (counts of objects, size info) |
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
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/millelog/sql-server-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server