sql-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Port for HTTP mode (e.g., 3000). | |
| PG_SSL | No | Whether to use SSL for PostgreSQL. | false |
| PG_HOST | No | PostgreSQL host. | |
| PG_PORT | No | PostgreSQL port. | 5432 |
| PG_USER | No | PostgreSQL user. | |
| SQL_PORT | No | SQL Server port. | 1433 |
| SQL_USER | No | SQL Server login. | |
| SQL_SERVER | No | SQL Server hostname. | |
| DB_PROVIDER | No | Database provider: 'mssql' (default) or 'postgres'. | mssql |
| PG_DATABASE | No | Default database for PostgreSQL. | |
| PG_PASSWORD | No | PostgreSQL password. | |
| SQL_ENCRYPT | No | Whether to encrypt SQL Server connections. | false |
| SQL_DATABASE | No | Default database for SQL Server. | |
| SQL_MAX_ROWS | No | Hard cap on rows returned. | 5000 |
| SQL_PASSWORD | No | SQL Server password. | |
| AUDIT_DATABASE | No | Database name for audit SQL sink (reusing main connection params). | |
| AUDIT_LOG_PATH | No | Directory for audit log files. | logs/ |
| PG_AZURE_AD_AUTH | No | Set to 'true' for Azure AD authentication (no PG_PASSWORD needed). | |
| SQL_BLOCKED_TABLES | No | Comma-separated schema.table pairs to block. | |
| SQL_MASKED_COLUMNS | No | Comma-separated schema.table.column values to mask. | |
| SQL_ALLOWED_SCHEMAS | No | Comma-separated list of allowed schemas. | |
| SQL_REQUEST_TIMEOUT | No | Query timeout in ms. | 30000 |
| PG_CONNECTION_STRING | No | PostgreSQL connection string. | |
| PG_STATEMENT_TIMEOUT | No | Query timeout in ms. | 30000 |
| SQL_CONNECTION_STRING | No | Full ADO.NET connection string for SQL Server. When set, individual SQL_* parameters are ignored. | |
| AUDIT_CONNECTION_STRING | No | Connection string for audit SQL sink. | |
| SQL_TRUST_SERVER_CERTIFICATE | No | Whether to trust server certificate. | true |
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
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_databasesA | List all online databases on the SQL Server instance |
| list_schemasB | List all schemas in a database |
| list_tablesA | List all tables in a database, optionally filtered by schema |
| describe_tableB | Get column definitions for a table |
| get_table_indexesA | Get all indexes defined on a table |
| get_foreign_keysB | Get all foreign key relationships for a table |
| list_viewsB | List all views in a database, optionally filtered by schema |
| describe_viewA | Get column definitions and the SQL definition for a view |
| list_stored_proceduresA | List all stored procedures in a database, optionally filtered by schema |
| get_stored_procedure_definitionB | Get the full source definition of a stored procedure |
| list_synonymsA | List all synonyms in a database, optionally filtered by schema |
| get_synonym_definitionB | Get the base object a synonym points to |
| list_functionsA | List all user-defined functions in a database (scalar, inline table-valued, and multi-statement table-valued), optionally filtered by schema |
| get_function_definitionA | Get the full source definition of a user-defined function |
| list_triggersA | List all DML triggers in a database, optionally filtered by schema and/or parent table |
| get_trigger_definitionA | Get the full source definition of a DML trigger |
| get_table_constraintsA | Get all constraints on a table: PRIMARY KEY, UNIQUE, CHECK, and DEFAULT |
| get_extended_propertiesA | Get all extended properties (e.g. MS_Description documentation) for a table, view, procedure, or function — includes both the object-level and all column-level properties |
| list_sequencesA | List all sequences in a database, optionally filtered by schema. Shows data type, range, increment, cycling, and current value. |
| get_table_statsA | Get row count and disk space usage (total, used, unused) for a table |
| list_database_usersA | List all users in a database with their type, default schema, and mapped login |
| list_database_rolesA | List all database roles and their members. Uses LEFT JOIN so roles with no members are included. |
| get_object_permissionsA | Get all explicit permissions granted on a specific database object |
| get_server_propertiesA | Get SQL Server instance properties: version, edition, collation, clustering, and HA configuration |
| list_linked_serversA | List all linked servers configured on the SQL Server instance. Requires VIEW ANY DEFINITION or sysadmin — will return an empty result set if the login lacks this permission. |
| list_agent_jobsA | List all SQL Server Agent jobs with their enabled state, category, owner, and last run outcome. Requires membership in SQLAgentUserRole (or higher) in the msdb database. |
| get_job_historyA | Get execution history for a SQL Server Agent job. Requires membership in SQLAgentUserRole (or higher) in the msdb database. |
| list_partition_functionsA | List all partition functions in the current database, including range type, partition count, and boundary values |
| list_partition_schemesA | List all partition schemes in the current database, showing which partition function each uses and the mapped filegroups |
| list_fulltext_catalogsA | List all full-text search catalogs in a database with item count, size, and populate status |
| list_fulltext_indexesA | List all full-text indexes in a database, showing the catalog, indexed columns, and change-tracking state |
| list_service_queuesA | List all Service Broker queues in a database, optionally filtered by schema |
| list_broker_servicesA | List all Service Broker services in a database and the queue each binds to |
| list_user_typesA | List all user-defined types (scalar alias types and table types) in a database, optionally filtered by schema |
| get_table_type_columnsA | Get the column definitions for a user-defined table type |
| list_temporal_tablesA | List all system-versioned temporal tables in a database, showing the linked history table for each |
| execute_queryA | Execute a read-only SELECT query against the SQL Server. Only SELECT statements (and CTEs using WITH) are permitted. Use TOP or FETCH NEXT in your query for large tables to avoid excessive data transfer. Results are capped at 1000 rows by default. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 37 tools
Each tool targets a distinct SQL Server metadata entity or action (e.g., tables, views, procedures, functions, triggers, partitions, fulltext, service broker, agent jobs). There is no meaningful overlap; list_* tools enumerate while get_*/describe_* tools retrieve details, and execute_query handles read-only SQL.
Nearly all tools follow a consistent verb_noun pattern using snake_case, with list_ for enumeration and get_ for definition retrieval, plus a few describe_ and execute_ exceptions that still fit the pattern. No mixed styles or vague verbs.
With 37 tools, the server exceeds the 25+ threshold that typically indicates too many for an agent to easily manage. While each tool covers a specific SQL Server object type, the sheer number may present navigation and context-window challenges.
The tool set provides comprehensive coverage of SQL Server metadata: databases, schemas, tables, views, procedures, functions, triggers, constraints, indexes, foreign keys, permissions, users, roles, sequences, partitions, fulltext, service broker, agent jobs, linked servers, and querying. Minor omissions like DDL triggers are negligible given the scope.