sql-explorer-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_NAME | Yes | The database name | |
| DB_USER | Yes | Read-only SQL login username | |
| DB_SERVER | Yes | The SQL Server host (e.g., your-server.database.windows.net) | |
| DB_ENCRYPT | No | Whether to encrypt the connection (default true, needed for Azure SQL) | true |
| DB_PASSWORD | Yes | Password for the SQL login | |
| DB_TRUST_CERT | No | Set to 'true' to trust self-signed certificates (only for local dev) |
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 | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_schemasA | List all schemas in the connected database. |
| list_tablesA | List tables in the database, optionally filtered to a single schema. Returns table_schema and table_name for each. |
| list_viewsA | List views in the database, optionally filtered to a single schema. Returns table_schema and table_name for each. |
| list_proceduresA | List stored procedures in the database, optionally filtered to a single schema. |
| list_functionsA | List functions in the database, optionally filtered to a single schema. Includes the return data type. |
| describe_tableA | Get column names, data types, nullability, and primary key info for a table. |
| describe_viewA | Get column names/types for a view, plus its SQL definition (CREATE VIEW body). |
| describe_procedureA | Get parameters and the SQL definition (CREATE PROCEDURE body) for a stored procedure. This tool only reads the procedure's metadata — it never executes it. |
| describe_functionA | Get parameters, return type, and the SQL definition (CREATE FUNCTION body) for a function. This tool only reads the function's metadata — it never executes it. |
| browse_tableA | Preview rows from a table (SELECT TOP N *). Max 200 rows, no filtering — use query_table for filtered results. |
| query_tableA | Select rows from a table with a single WHERE condition (column, operator, value). Column and operator are validated against the real schema. Max 200 rows. |
| join_tablesA | Select across multiple tables/views with explicit join conditions. Every table and column is validated against the real schema (same as browse_table/query_table) — no raw SQL fragments are accepted. Max 200 rows, up to 6 joins. |
| run_queryA | Run an arbitrary read-only query — CTEs (WITH ...), subqueries, GROUP BY/aggregates, window functions, UNION, ORDER BY, anything a single SELECT statement can express. Only one SELECT (optionally led by a WITH clause) statement is allowed: the query is rejected before it reaches the database if it contains a second statement or any write/DDL/EXEC keyword, and it additionally always runs inside a transaction that gets rolled back afterwards regardless of outcome, as a second line of defense. Results are capped at 500 rows. |
| find_similar_namesA | Jaro-Winkler fuzzy search over table/view/column/procedure/function names — use this when you don't remember the exact spelling of an object. |
| fuzzy_search_columnA | Jaro-Winkler fuzzy search over the distinct values of a single text column — use this to find rows whose value is close to (but not an exact match for) a search term. Samples up to sampleSize distinct values server-side, then ranks them client-side. |
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 15 tools
Each tool targets a distinct aspect of SQL exploration: listing metadata, describing specific object types, browsing/querying/joining data, running arbitrary read-only queries, and fuzzy-searching names vs column values. Even the query tools have clear boundaries (browse=unfiltered preview, query=single condition, join=multi-table validated, run=arbitrary SQL).
All tool names follow a consistent snake_case verb_noun pattern (list_*, describe_*, browse_table, query_table, join_tables, run_query, find_similar_names, fuzzy_search_column). The verb accurately reflects the operation and the noun indicates the target object.
15 tools is at the upper end of a well-scoped server, but each tool serves a unique and justified purpose—covering listing, describing, querying, joining, arbitrary read-only execution, and fuzzy search. No redundant or trivial tools are present.
The tool set provides comprehensive coverage for a SQL schema/data explorer: complete metadata listing (schemas, tables, views, procedures, functions), detailed descriptions (columns, definitions, parameters), multiple data retrieval methods (browse/query/join/run_query), and fuzzy search for both object names and column values. No significant gaps are apparent.