Skip to main content
Glama

K-AIR MCP

An official MCP server that opens only for agents to query the data hub. There is a single entry point, and the catalog source engine internally distinguishes between Postgres (analytics mart) and Tibero (collection). SQL strings are not accepted.

The role is similar to robo-meta-api's T2SQL and query_execute, but the server does not generate SQL; it assembles SELECT statements from tool arguments. It does not replicate the portal POST /mcp mockup as the canonical version.

Update history: change_log.md

What this service does

  • Provides agents with table lists, column details, distinct values, limited SELECT, and aggregation tools.

  • Allowed tables = POST /meta/catalog ∩ tables and columns that actually exist in the corresponding engine source.

  • HTTP uses Streamable HTTP (/mcp) + X-Api-Key. stdio is for same-PC IDEs.

  • AI only knows the MCP URL and API Key. DB passwords and robo addresses are not present in tool results.

What it does not do: free SQL, DML/DDL, dump/send, operational Tibero, querying t2s·argus_catalog data, or splitting MCP per engine.

Related MCP server: SQLite Read-Only MCP Server

Tools

Tool

Role

list_tables

List of allowed tables. Optional schema_name. Response includes engine

describe_table

Column types, PK, comments. Missing Korean descriptions are left blank

get_distinct_values

DISTINCT on allowed columns. Max 200

query_table

Assembled SELECT. columns, filters {column,op,value}, order_by {column,dir}

aggregate_table

count/sum/avg/max/min. Total row count uses func=count with no column

Row limit 200. Read-only (default_transaction_read_only), statement_timeout 15 seconds. filters.op: eq, ne, gt, gte, lt, lte, like, in, is_null, is_not_null.

Engine distinction

sources[].engine in /meta/catalog is the canonical source. Agents do not choose the engine.

Catalog engine

Source

postgresql / postgres / postgis

Analytics mart (locally kair-postgis-16)

tibero / oracle

Collection Tibero. Sometimes written as oracle in OA

If the engine is missing or unknown, it is excluded from the list. Even if a Tibero table has the same name as an existing Postgres table, they are not mixed.

Locally, only Postgres is available. If there is no Tibero connection or JDBC, catalog Tibero sources do not appear in the list. JDBC JARs are not included in the image.

Configuration

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

Prerequisites: robo-meta-api and kair-metadata-platform_control-plane network. The data side is local kair-postgis-16 (host 5434). The portal, OASIS, and operational Tibero are outside the scope of this repository.

Execution

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

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

Same-PC CLI (stdio, default):

python -m app.main

Container HTTP:

python -m app.main --transport http

MCP registration

Same PC (stdio recommended). The container must be running. URL, key, and .env are not included.

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

Another PC (Streamable HTTP). DB passwords are not included.

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

mcp.json is JSON, so keys are wrapped in "…". The values the server receives are keys without quotes.

Settings

Copy .env.example to .env, which is excluded from Git. Passwords and API keys are not stored in code or Git-tracked documents.

Variable

Role

MCP_API_KEYS

HTTP X-Api-Key. Local smoke key. Not the portal dh_·tm_po_api_key

MCP_PG_HOST / PORT / DB / USER / PASSWORD

Mart SELECT account. Default host host.docker.internal, port 5434

ROBO_META_URL

POST /meta/catalog. Default http://robo-meta-api:8100

MCP_ROW_LIMIT

Row limit. The server caps it at 200

MCP_TB_*

Collection Tibero. Only when a connection exists

The connection canonical source is SourceDbConn in OA. Locally it is env/CLI.

Tests

python -m pytest tests -q

Known issues and limitations

Item

Description

Status

Tibero execution

Dialect (FETCH FIRST) and engine branching exist. No JDBC connection

To be continued when collection SID and JAR arrive

Portal key and audit

tm_po_api_key / th_po_api_call / rating and usage application

Not implemented. Local keys are to be retired

Free SQL

execute_read_only_sql from Gemini feedback

Not included

Row limit 1000

Gemini feedback

Not applied. Keeping 200

  • robo-meta-apiPOST /meta/catalog

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

  • K-AIR-Portal — Future canonical entry point POST /api/v1/mcp, key ledger

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