SQL Query Tools MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MAX_ROWS | No | Maximum rows returned per query. | 200 |
| SQL_USER | Yes | The database user. | |
| AUDIT_LOG | No | Set to true to enable audit logging. | false |
| SQL_SERVER | Yes | The SQL Server hostname or IP address. | |
| SQL_ENCRYPT | No | Set to true for Azure SQL or cloud servers. | false |
| SQL_DATABASE | Yes | The database name. | |
| SQL_INSTANCE | No | Named instance of SQL Server (leave empty if default). | |
| SQL_PASSWORD | Yes | The database password. | |
| AUDIT_LOG_DIR | No | Directory for audit log files. | ./logs |
| ALLOWED_TABLES | No | Comma-separated list of allowed tables/views (supports wildcards). Leave empty for all. | |
| SQL_QUERY_TIMEOUT | No | Query timeout in milliseconds. | 30000 |
| SQL_TRUST_SERVER_CERT | No | Set to true to trust server certificate. | true |
| SCHEMA_CACHE_TTL_MINUTES | No | Cache duration for schema in minutes. | 5 |
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 |
|---|---|
| db_test_connectionA | Tests the connection to SQL Server and returns basic server information. Use this first to verify the server is reachable before running other tools. |
| db_describe_schemaA | Returns all available tables and views with their column count. Use this first to understand what data is available before writing queries. Results are cached to avoid repeated database calls. |
| db_describe_tableA | Returns full column details (name, data type, nullable) for a specific table or view. Use this when you need to know exact column names before writing a query. |
| db_sample_dataA | Returns 5 sample rows from a table or view. Use this to understand the actual data format, values and patterns before writing a more specific query. |
| db_run_readonlyA | Executes a SELECT query on SQL Server. Only read operations are allowed — write operations are blocked. TOP is automatically injected if no row limit is present. Use db_describe_schema and db_describe_table first if you are unsure about table or column names. |
| db_list_databasesA | Returns the currently connected database name and status. |
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 6 tools
Each tool has a clearly distinct purpose: connection testing, schema overview, database info, table details, data sampling, and read-only query execution. The descriptions clarify any potential overlap between schema and table descriptions.
All tool names follow a consistent db_ prefix with snake_case verbs/nouns, such as test_connection, describe_schema, list_databases, describe_table, sample_data, and run_readonly. The naming pattern is uniform and predictable.
With 6 tools, the set is well-scoped for a SQL query server. Each tool covers a necessary step in the query workflow without redundancy or unnecessary additions.
The toolset covers the core read-only query workflow: connect, understand schema, sample data, and execute queries. Minor gaps like lack of multiple database listing or more advanced metadata are acceptable for the stated purpose.