Onboarding: one URL
The hosted MCP door is Streamable HTTP at:mcp.kymaapi.com host: https://kymaapi.com/mcp is a web page, not the MCP endpoint. Do not put a secret in the path.
Manage keys on Integrations.
Auth
- OAuth — default for Claude, Cursor, Codex, ChatGPT. Dynamic client registration + PKCE.
- Authorization: Bearer — if the header is present, OAuth is skipped. Use this for Grok or Perplexity when they cannot complete OAuth. The token is a dedicated MCP key (
km-…), not a RESTkyma-key and not a path token.
/mcp returns 401, not 404, with WWW-Authenticate pointing at resource metadata.
For client authors
The authorization server is OAuth 2.1 with PKCE (S256 only). Metadata lives athttps://mcp.kymaapi.com/.well-known/oauth-authorization-server, and the protected resource metadata at /.well-known/oauth-protected-resource (the read-only door publishes its own at /.well-known/oauth-protected-resource/mcp/readonly).
- Client ID Metadata Documents are accepted.
client_id_metadata_document_supportedistrue, so you can pass an HTTPS URL as yourclient_idinstead of registering. The document must be served directly asapplication/json(no redirects), itsclient_idmust equal the URL exactly, and everyredirect_uriyou use must be listed in it. Loopback redirects match on any port. Dynamic client registration at/mcp/oauth/registerkeeps working unchanged. - Send the
resourceparameter. On/authorizeand/token,resourcemust name one of the two doors:https://mcp.kymaapi.com/mcporhttps://mcp.kymaapi.com/mcp/readonly(RFC 8707). The bare originhttps://mcp.kymaapi.comcounts as the main door, with or without a trailing slash, somcp-remote --resource https://mcp.kymaapi.comworks as sent. A resource this server does not host comes back aserror=invalid_targeton yourredirect_uri. The issued token is bound to it: a token minted for the read-only door is refused at the main door with 401 anderror="invalid_token". Omittingresourcekeeps the old behaviour, so existing clients are unaffected. - Browser clients need an allowed origin. Cross-origin requests are answered only for
https://kymaapi.com,https://www.kymaapi.com,https://mcp.kymaapi.com, loopback (the MCP Inspector), and preview deployments. Any otherOrigingets 403 on the preflight and on the request. Clients that send noOriginheader, which is every non-browser client, are unaffected.
MCP keys
OAuth and the dashboard issue a dedicated key labeledKyma MCP: <client>.
- Spend cap default **1 to $500 on Integrations; the window resets 30 days after it starts
- OAuth connections (Claude, Cursor, ChatGPT) refresh themselves while in use; hand-issued keys (Grok, Perplexity, scripts) last 30 days and can be extended from Integrations
- SHA-256 at rest
- Revoke on Integrations without rotating REST keys on
/keys
refresh_token (90 days), so Claude, Cursor, Codex, and ChatGPT renew silently — no weekly re-login. Refreshing keeps the same key: the spend cap never resets. Manual Bearer keys have no refresh; issue a new one when they expire.
An expired or revoked MCP key returns 401. Hitting the spend cap refuses send_message with spend_cap_reached; a single call priced above what is left of the cap is refused with estimate_exceeds_remaining.
Tools
Default tools only. Every tool advertises MCP annotations (title, readOnlyHint, destructiveHint, idempotentHint, openWorldHint) so clients can auto-allow reads. Tools are grouped by scope: models.read (catalog, pricing, cost estimates, docs), usage.read (balance, this key’s budget, your usage and requests, transactions, top-up link) and chat.completions (the one tool that spends credits). All three are granted by default; keys.read and billing.alerts are optional boxes on the Allow screen; a tool called without its scope answers HTTP 403 with the missing scope in WWW-Authenticate.
Default chat model is
qwen-3.6-plus. initialize and tools/list do not charge.
max_cost_usd is a spend ceiling for one call, and it is enforced by turning money into tokens: Kyma prices your input from the live catalog, works out how many output tokens still fit under the ceiling, and sends that as max_tokens. The reply is cut at that length rather than allowed to run to the model’s own limit. If even a one-token reply is above the ceiling, the call is refused as estimate_exceeds_max and nothing is charged. Set your own max_tokens and it takes precedence, with the estimate priced against it.
The ceiling binds the length, so the price follows the published rate for that length. What you are billed is what the upstream invoice says: for most models that is the catalog rate you were quoted, and for the few billed from an invoice rather than the rate card the settled cost can land a little either side.
Every send_message is also checked against what this key has left in its 30-day cap. Above it, the call is refused as estimate_exceeds_remaining with the quote, whether or not you set a ceiling; that is a different answer from spend_cap_reached, which means the cap is already spent and nothing more goes out until the window resets.
A model with no published price cannot be priced. Without max_cost_usd the call proceeds rather than being refused on a number nobody has; with max_cost_usd it is refused as unpriceable_model, because a ceiling that cannot be worked out cannot be held to. estimate_cost runs the same arithmetic on its own, so you can price a call without touching the spend tool.
send_message also returns structuredContent: generation_id, model_requested, model_served, routes_tried (null where the path does not report it), cost_usd, cap_remaining_usd and max_tokens_sent. The same facts are in the text block.
get_usage and get_request cover the whole account, every key and every client, not just this connection. get_spend is the per-connection number: the cap, spend and remaining budget of this MCP key alone.
There are no keys.write, billing.write, or admin tools. Image and audio tools are not on this door yet.
Stdio clients: @kyma-api/mcp-server
For clients that can launch stdio servers but cannot speak Streamable HTTP, @kyma-api/mcp-server is a thin bridge to the same hosted URL (it runs mcp-remote against https://mcp.kymaapi.com/mcp). The tools are exactly the hosted ones, it needs network access to Kyma, and it has no API key of its own.
KYMA_MCP_KEY:
KYMA_MCP_KEY must be an MCP key (km-…); the bridge exits with an error if it gets a REST API key (kyma-…). KYMA_API_KEY is not read. Extra arguments are passed through to mcp-remote.
Install in Cursor
One click: Add to Cursor, or add{"mcpServers": {"kyma": {"url": "https://mcp.kymaapi.com/mcp"}}} to .cursor/mcp.json. The plugin bundle (Agent Plugins spec and Claude Code format) is open source at github.com/kyma-api/kyma-mcp-plugin.