mcp-sql-api
Allows interaction with a PostgreSQL database, enabling SQL queries and data retrieval through an MCP interface.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-sql-api/ ├── app/ │ ├── main.py # FastAPI entry point │ ├── api/ # Endpoint layer │ │ ├── sql.py # Raw SQL execution (step 1) │ │ ├── query.py # Query execution API (step 3) │ │ └── agent.py # GPT integration (step 2) │ │ │ ├── core/ # Core logic │ │ ├── db.py # DB connection (PostgreSQL) │ │ └── security.py # SQL control (SELECT restrictions, etc.) │ │ │ ├── services/ # Business logic │ │ ├── sql_executor.py # SQL execution engine │ │ ├── query_service.py # Template query execution │ │ ├── llm_service.py # SQL generation with GPT │ │ └── ir_service.py # Intermediate representation → SQL conversion (step 4) │ │ │ ├── models/ # Data models │ │ ├── schema.py # DB schema definition │ │ ├── query.py # Query definition (with semantics) │ │ └── ir.py # Intermediate representation (crucial) │ │ │ ├── repositories/ # DB access layer │ │ └── base.py │ │ │ └── utils/ │ ├── logger.py │ └── validator.py │ ├── metadata/ # ← Core of MCP │ ├── schema.yaml # Table definitions (for LLM) │ ├── metrics.yaml # KPI definitions │ └── queries.yaml # Semantic API definitions │ ├── prompts/ # Prompts for GPT │ ├── sql_generation.txt │ └── ir_generation.txt │ ├── tests/ │ ├── test_sql.py │ ├── test_query.py │ └── test_ir.py │ ├── requirements.txt └── README.md
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Query, explore, and manage your databases through natural conversation.
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Ask questions in plain language, get answers from your business database. No SQL required.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to query databases using natural language, with automatic schema discovery and SQL compilation.453 npm3,236Apache 2.0

Bollard MCPofficial
AlicenseAqualityDmaintenanceEnables safe, AI-driven database interactions with schema discovery, intent validation, and session memory, supporting multiple databases.1433 PyPI2AGPL 3.0- AlicenseNot gradedqualityDmaintenanceEnables natural language querying of SQL databases using AI, supporting multiple database types and automatic schema discovery.1MIT
- AlicenseAqualityDmaintenanceEnables natural-language querying of databases via SQLBot, with datasource discovery, metadata inspection, and report generation.5MIT