Skip to main content
The core MCP call endpoint of the Bridger Gateway. It follows the JSON-RPC 2.0 spec exactly.

Request headers

POST /mcp HTTP/1.1
Content-Type: application/json
x-api-key: dk_live_...

Common error codes

CodeMeaning
-32600Invalid JSON-RPC request
-32601Method not found
-32602Invalid params (e.g. missing tool name)
-32000Internal gateway error

tools/list

Returns metadata for every tool registered with Bridger.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

Response 200

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "tools": [
      {
        "name": "pingtool",
        "description": "Ping endpoint",
        "inputSchema": { "type": "object", "properties": {} },
        "annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "openWorldHint": false
        }
      }
    ]
  }
}

tools/call

Runs a single tool.

Request

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "pingtool",
    "arguments": { "q": "hello" }
  }
}

Response 200

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "tool": "pingtool",
    "upstream": {
      "method": "GET",
      "url": "http://127.0.0.1:9921/ping?q=hello",
      "status": 200
    },
    "data": { "ok": true, "q": "hello" },
    "cacheStatus": "MISS",
    "auditId": "aud_..."
  }
}
FieldDescription
result.toolCalled tool name
result.upstream.methodUpstream HTTP method
result.upstream.urlFinal upstream URL (after middleware injection such as ServiceKey)
result.upstream.statusUpstream HTTP status code
result.dataUpstream response body (after XML→JSON normalization)
result.cacheStatusWhether the cache was hit (HIT/MISS, etc.)
result.auditIdAudit-log identifier for this call

Full cURL examples

curl -X POST https://mcp.datari.kr/mcp \
  -H "x-api-key: $DATA_BRIDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Automatic public-data middleware behavior

When calling a tool from a preset with isPublicData=true, the following are applied automatically.
  1. ServiceKey injection (PUBLIC_DATA_SERVICE_KEY)
  2. lat/lonnx/ny grid coordinate conversion (KMA DFS)
  3. XML/JSON payload normalization
  4. Public-data error code → human-readable message mapping
CodeMessage
00OK
30Unregistered service key
31Expired service key
32Unregistered IP
otherUnknown public-data error (<code>)