SQMCPaL
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SQMCPAL_PG_PORT | No | Server port. | 5432 |
| SQMCPAL_PG_USER | No | Override the login role, if it differs from your UPN. | |
| SQMCPAL_SSLMODE | No | libpq sslmode. | require |
| SQMCPAL_MAX_LIMIT | No | Hard cap on rows returned by any tool. | 1000 |
| AZURE_ACCESS_TOKEN | No | Pre-fetched ARM token, for containers without the az CLI. | |
| SQMCPAL_CONNECT_TIMEOUT | No | Connection timeout in seconds. | 15 |
| SQMCPAL_STATEMENT_TIMEOUT_MS | No | Server-side query timeout. | 30000 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| check_authA | Check whether the current Azure credential is valid for Azure Database for PostgreSQL Flexible Server access, and show which PostgreSQL login role it maps to. Call this first if you suspect an authentication problem. |
| list_postgres_serversA | List all Azure Database for PostgreSQL Flexible Servers accessible via the current Azure credential (az login / managed identity). Returns server names, ARM resource IDs, FQDNs, subscriptions, locations and engine versions. |
| connect_serverA | Connect to a PostgreSQL flexible server by its ARM resource ID. Resolves the server FQDN and stores it in session context. The password is a short-lived Microsoft Entra token minted from your own Azure login — nothing is stored on disk. Args: server_id: ARM resource ID of the flexible server (from list_postgres_servers). server_name: Human-readable server name, for display. Defaults to the ARM name. database: Optional default database for subsequent calls. schema: Optional default schema. Defaults to 'public' when unset. |
| list_databasesA | List all databases on the currently connected PostgreSQL flexible server, with owner, encoding and on-disk size. Azure-managed system databases are hidden. |
| list_schemasA | List the schemas in a PostgreSQL database with their owner and table count. Args: database: Database name. Defaults to the session database. |
| list_tablesA | List tables, views and materialized views in a PostgreSQL database, with estimated row counts and total size. Args: database: Database name. Defaults to the session database. schema: Optional schema filter. Omit to list every non-system schema. |
| describe_tableA | Describe a PostgreSQL table: columns with data types, nullability and defaults, plus primary key, indexes and foreign keys. Use this before writing a query against an unfamiliar table. Args: table: Table, view or materialized view name. schema: Schema name. Defaults to the session schema, then 'public'. database: Database name. Defaults to the session database. |
| sample_rowsA | Fetch a handful of rows from a table to see what the data actually looks like. Equivalent to SELECT * FROM schema.table LIMIT n. Args: table: Table name. limit: Rows to return (default 10). schema: Schema name. Defaults to the session schema, then 'public'. database: Database name. Defaults to the session database. |
| run_queryA | Execute a read-only SQL statement against the connected PostgreSQL database. Only a single SELECT / WITH / TABLE / VALUES / EXPLAIN / SHOW statement is accepted, and it runs inside a READ ONLY transaction that is always rolled back — writes are rejected by PostgreSQL itself. Example: SELECT status, count(*) FROM public.orders GROUP BY status ORDER BY 2 DESC Args: sql: A single read-only SQL statement. limit: Max rows to return (default 100). database: Database name. Defaults to the session database. |
| count_rowsA | Count rows in a PostgreSQL table, optionally filtered by a WHERE clause. Exact, unlike the estimates from list_tables, and returns no row data. Args: table: Table name. where: Optional WHERE clause body without the WHERE keyword, e.g. "status = 'active'". schema: Schema name. Defaults to the session schema, then 'public'. database: Database name. Defaults to the session database. |
| distinct_valuesA | Get the distinct values of a column with their frequencies, most common first. Useful for understanding enums, categories and cardinality. Args: table: Table name. column: Column name. where: Optional WHERE clause body without the WHERE keyword. limit: Max distinct values to return (default 100). schema: Schema name. Defaults to the session schema, then 'public'. database: Database name. Defaults to the session database. |
| show_contextA | Show the current PostgreSQL session context: connected server, database and schema. |
| set_contextA | Update the active PostgreSQL database and/or schema without reconnecting. Args: database: Set the active database. Omit to leave unchanged. schema: Set the active schema. Omit to leave unchanged. |
| clear_contextA | Disconnect from the current PostgreSQL server, close pooled connections and clear session state. |
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
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/ChingEnLin/SQMCPaL'
If you have feedback or need assistance with the MCP directory API, please join our Discord server