Skip to main content
Glama
timsuv

sql-explorer-mcp

by timsuv

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DB_NAMEYesThe database name
DB_USERYesRead-only SQL login username
DB_SERVERYesThe SQL Server host (e.g., your-server.database.windows.net)
DB_ENCRYPTNoWhether to encrypt the connection (default true, needed for Azure SQL)true
DB_PASSWORDYesPassword for the SQL login
DB_TRUST_CERTNoSet to 'true' to trust self-signed certificates (only for local dev)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

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/timsuv/sql-explorer-mcp'

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