loading…
Search for a command to run...
loading…
Enables natural language database querying through GPT-powered SQL generation and execution with metadata-driven validation and intermediate representation.
Enables natural language database querying through GPT-powered SQL generation and execution with metadata-driven validation and intermediate representation.
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
Run in your terminal:
claude mcp add mcp-sql-api -- npx Yes, Sql Api MCP is free — one-click install via Unyly at no cost.
No, Sql Api runs without API keys or environment variables.
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
Open Sql Api on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
CSA PROJECT - FZCO © 2026 IFZA Business Park, DDP, Premises Number 31174 - 001
Security
Low riskAutomated heuristic from public metadata — not a security guarantee.