mcp-sql-api
mcp-sql-api/ ├── app/ │ ├── main.py # FastAPIエントリポイント │ ├── api/ # エンドポイント層 │ │ ├── sql.py # 生SQL実行(step1) │ │ ├── query.py # クエリ実行API(step3) │ │ └── agent.py # GPT連携(step2) │ │ │ ├── core/ # コアロジック │ │ ├── db.py # DB接続(PostgreSQL) │ │ └── security.py # SQL制御(SELECT制限など) │ │ │ ├── services/ # ビジネスロジック │ │ ├── sql_executor.py # SQL実行エンジン │ │ ├── query_service.py # テンプレクエリ実行 │ │ ├── llm_service.py # GPTでSQL生成 │ │ └── ir_service.py # 中間表現 → SQL変換(step4) │ │ │ ├── models/ # データモデル │ │ ├── schema.py # DBスキーマ定義 │ │ ├── query.py # クエリ定義(意味付き) │ │ └── ir.py # 中間表現(超重要) │ │ │ ├── repositories/ # DBアクセス層 │ │ └── base.py │ │ │ └── utils/ │ ├── logger.py │ └── validator.py │ ├── metadata/ # ← MCPの核 │ ├── schema.yaml # テーブル定義(LLM用) │ ├── metrics.yaml # KPI定義 │ └── queries.yaml # 意味のあるAPI定義 │ ├── prompts/ # GPT用プロンプト │ ├── sql_generation.txt │ └── ir_generation.txt │ ├── tests/ │ ├── test_sql.py │ ├── test_query.py │ └── test_ir.py │ ├── requirements.txt └── README.md
This server cannot be deployed
Maintenance
Related MCP Connectors
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Ask data questions in natural language. Get SQL, insights, and charts from your databases.
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.451 npm3,173Apache 2.0

Bollard MCPofficial
AlicenseAqualityDmaintenanceEnables safe, AI-driven database interactions with schema discovery, intent validation, and session memory, supporting multiple databases.142AGPL 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