---
title: "MCP server (streamable HTTP, stateless) — the API as agent tools"
method: POST
path: "/mcp"
tags: ["MCP"]
---

# MCP server (streamable HTTP, stateless) — the API as agent tools

`POST /mcp`

## Request

- Base URL: `https://api.stackdata.io`
- URL: `https://api.stackdata.io/mcp`
- Auth: one of:
  - none
  - API key in header `X-API-Key`

Model Context Protocol endpoint: JSON-RPC 2.0 over POST, plain-JSON
responses, no sessions, no SSE. Four tools — `search_datasets`,
`get_table`, `tariff_lookup`, `resolve_data` — each proxied to the public
endpoint it names, so metering, licensing gates and x402 behave exactly as
over plain HTTP. Pass an API key as `x-api-key`; anonymous callers get
anonymous quotas. Point any MCP-capable client at
`https://api.stackdata.io/mcp`.

## Response `200`

JSON-RPC response (result or error).

## Other responses

- `202`: Notification accepted (no body).

---

[API](https://skmtc.dev/stackdata/apis/stackdata-api.md) · [All operations](https://skmtc.dev/stackdata/apis/stackdata-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stackdata/apis/stackdata-api/revisions/91358ae3f6e8?raw)
