Skip to main content
Glama

K-AIR MCP

エージェントがデータハブの参照のみを行うために公開する公式MCPサーバーです。窓口は1つで、カタログソース engine によりPostgres(分析マート)とTibero(収集)を内部で振り分けます。SQL文字列は受け付けません。

robo-meta-api のT2SQL・query_execute役割は似ていますが、サーバーがSQLを生成するのではなく、ツール引数でSELECTを組み立てます。ポータル POST /mcp モックアップを正本として複製しません。

更新履歴: change_log.md

このサービスが行うこと

  • エージェントにテーブル一覧・カラム詳細・ユニーク値・制限付きSELECT・集計ツールを提供します。

  • 許可テーブル = POST /meta/catalog ∩ 該当エンジン元に実在するテーブル・カラム。

  • HTTPはStreamable HTTP(/mcp) + X-Api-Key。stdioは同一PCのIDE用です。

  • AIはMCP URLとAPI Keyのみを知ります。DBパスワード・roboアドレスはツール結果に含まれません。

行わないこと: 自由SQL、DML/DDL、ダンプ/送信、運用Tibero、t2sargus_catalog データ参照、エンジンごとにMCPを分けること。

Related MCP server: SQLite Read-Only MCP Server

ツール

ツール

役割

list_tables

許可テーブル一覧。任意の schema_name。レスポンスに engine

describe_table

カラム型・PK・コメント。存在しない韓国語説明は空欄

get_distinct_values

許可カラムのDISTINCT。最大200

query_table

組み立てSELECT。columnsfilters {column,op,value}order_by {column,dir}

aggregate_table

count/sum/avg/max/min。全行数は func=count かつカラムなし

行上限 200。読み取り専用(default_transaction_read_only)、statement_timeout 15秒。filters.op: eq, ne, gt, gte, lt, lte, like, in, is_null, is_not_null。

エンジン区分

/meta/catalogsources[].engine が正本です。エージェントがエンジンを選ぶことはありません。

カタログ engine

postgresql / postgres / postgis

分析マート (ローカルは kair-postgis-16)

tibero / oracle

収集Tibero。OAでoracleと記載される場合あり

エンジンがない、または不明な値の場合は一覧から除外します。TiberoテーブルがPostgres実在テーブルと同名でも混在させません。

ローカルにはPostgresのみがあります。Tibero接続・JDBCがない場合、カタログのTiberoソースは一覧に表示されません。JDBC JARはイメージに含めません。

構成

app/                 FastMCP 서버 (stdio / Streamable HTTP)
tests/               단위·계약 테스트
docker-compose.yml   네트워크용 http :8110
mcp.cursor.example.json       같은 PC stdio
mcp.cursor.http.example.json  다른 PC HTTP

前提: robo-meta-apikair-metadata-platform_control-plane ネットワーク。データ面はローカル kair-postgis-16(ホスト5434)。ポータル・OASIS・運用Tiberoはこのリポジトリの範囲外です。

実行

copy .env.example .env
# MCP_API_KEYS · MCP_PG_* 실제 값만 채움. 따옴표 넣지 않음
docker compose up -d --build
curl.exe -fsS http://127.0.0.1:8110/health

ヘルス: {"status":"ok","server":"kair-mcp-query","transport":"streamable-http","engines":["postgres"]}

同一PC CLI(stdio、デフォルト):

python -m app.main

コンテナHTTP:

python -m app.main --transport http

MCP登録

同一PC(推奨stdio)。コンテナが起動している必要があります。URL・キー・.env は入れません。

{
  "mcpServers": {
    "kair-query": {
      "command": "docker",
      "args": ["exec", "-i", "kair-mcp-query", "python", "-m", "app.main", "--transport", "stdio"]
    }
  }
}

別のPC(Streamable HTTP)。DBパスワードは入れません。

{
  "mcpServers": {
    "kair-query": {
      "url": "http://<MCP띄운PC의IP>:8110/mcp",
      "headers": {
        "X-Api-Key": "<MCP_API_KEYS 값만>"
      }
    }
  }
}

mcp.json はJSONのためキーを "…" で囲みます。サーバーが受け取る値は引用符なしのキーです。

設定

.env.example をGitから除外された .env にコピーします。パスワード・API KeyはコードとGit追跡ドキュメントに保存しません。

変数

役割

MCP_API_KEYS

HTTP X-Api-Key。ローカルスモークキー。ポータル dh_tm_po_api_key ではない

MCP_PG_HOST / PORT / DB / USER / PASSWORD

マートSELECTアカウント。デフォルトホスト host.docker.internal、ポート 5434

ROBO_META_URL

POST /meta/catalog。デフォルト http://robo-meta-api:8100

MCP_ROW_LIMIT

行上限。サーバーが200に切り詰める

MCP_TB_*

収集Tibero。接続がある場合のみ

接続の正本はOAの SourceDbConn です。ローカルはenv/CLIです。

テスト

python -m pytest tests -q

既知の課題・制限

項目

説明

状態

Tibero実行

方言(FETCH FIRST)・エンジン分岐はあり。JDBC接続はなし

収集SID・JARが届けば接続

ポータルキー・監査

tm_po_api_key / th_po_api_call / 等級・活用申請

未実装。ローカルキーは廃棄対象

自由SQL

Geminiフィードバックの execute_read_only_sql

入れない

行上限1000

Geminiフィードバック

適用せず。200を維持

関連

  • robo-meta-apiPOST /meta/catalog

  • K-AIR-metadata-platform — Serving t2s_*

  • K-AIR-Portal — 今後正本窓口 POST /api/v1/mcp、キー元帳

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Allows AI assistants to list tables, read data, and execute SQL queries through a controlled interface, making database exploration and analysis safer and more structured.
    3
    1,355
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables read-only SQL database access for AI assistants, allowing schema exploration and safe query execution without risk of data modification.
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to query SQL databases safely with read-only access, allowing schema discovery and SELECT queries while blocking writes and DDL operations.

View all related MCP servers

Related MCP Connectors

  • Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.

  • The grounded data layer for any LLM: governed SQL, metrics, lineage and catalog over your data.

  • Read-only China A-share data for AI agents: market, limit-up, capital flow and disclosures.

View all MCP Connectors

Latest Blog Posts

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/LeeSeungWoo-stlogic/K-AIR-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server