mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LLM_MODEL | No | Language model name for SQL generation | qwen2.5-coder:3b |
| LLM_API_KEY | No | API key for the LLM service (optional) | |
| LLM_TIMEOUT | No | Timeout in seconds for LLM requests | 60 |
| DATABASE_URL | Yes | PostgreSQL connection string (e.g., postgresql://user:password@localhost:5432/database_name) | |
| LLM_BASE_URL | No | Base URL of the OpenAI-compatible API (default Ollama endpoint) | http://localhost:11434/v1 |
| DB_CONNECT_TIMEOUT | No | Connection timeout in seconds for PostgreSQL | 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 | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_tablesA | List the tables available in the configured read-only database. |
| describe_tableB | Return column metadata for a table. |
| generate_queryA | Turn a natural-language request into one read-only SQL statement. |
| run_readonly_queryA | Execute a single read-only SELECT or WITH query and return its rows. |
| execute_generated_queryA | DANGEROUS: generate SQL from a prompt and execute it immediately. This executes model-generated SQL without a separate review step. Use generate_query and run_readonly_query instead when possible. |
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 5 tools
Most tools are clearly distinct: schema inspection (list_tables, describe_table), SQL generation (generate_query), and query execution (run_readonly_query). execute_generated_query overlaps by combining generation and execution, but its DANGEROUS warning and guidance to prefer the separate steps mitigate confusion.
All tool names follow a consistent snake_case verb_noun pattern, with optional qualifiers like readonly and generated. The naming clearly indicates the action and target (list_tables, describe_table, generate_query, run_readonly_query, execute_generated_query).
Five tools is well-scoped for a read-only database interface: schema exploration, query generation, exact query execution, and a dangerous combined shortcut. Each tool contributes a distinct capability without unnecessary bloat.
The tool surface covers the complete read-only workflow: see what tables exist, inspect schema, translate natural language to SQL, and execute read-only queries. The optional generate-and-execute tool also fills the convenience path without introducing an obvious dead end.