kosa8 docs Dashboard
esc
↑ ↓ move↵ openRuns in your browser; nothing you type is sent anywhere.

HTTP API / MCP connections

MCP connections

10 endpoints at https://api.kosa8.com, sent with Authorization: Bearer $KOSA8_API_KEY. Generated from the API's own OpenAPI description, which a test holds to the router.

The remote MCP servers kosa8 connects in one click#

GET/v1/mcp/connectorsscope sandboxes:read

Each publisher's own hosted server, checked live. kosa8 is the OAuth client: it discovers the server's authorization server (RFC 9728, RFC 8414), registers itself (RFC 7591), a Client ID Metadata Document, or uses a client the kosa8 team registered, signs in with PKCE S256 and the resource parameter (RFC 8707), and keeps the tokens sealed per organization. No route returns a token. Agents and sandboxes reach the server through the gateway, POST /v1/mcp/gw/{id}, which adds the token and records every tools/call in the audit log (mcp.call).

Responses
200401403
curl -s -X GET https://api.kosa8.com/v1/mcp/connectors \
  -H "Authorization: Bearer $KOSA8_API_KEY"

This organization's connected MCP servers#

GET/v1/mcp/connectionsscope sandboxes:read
Responses
200401403
curl -s -X GET https://api.kosa8.com/v1/mcp/connections \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Connect a remote MCP server by its URL#

POST/v1/mcp/connectionsscope admin

Like a custom connector. The URL must be public https on port 443 (no IP address, private address or kosa8 host); discovery follows at most one redirect. Its id is custom-<name>.

JSON body
urlrequiredstring
https://… the server's MCP endpoint (Streamable HTTP)
namestring
A name for it (default: its host)
keystring
An API key, for a server that takes one instead of a sign-in
Responses
200400401403409502
curl -s -X POST https://api.kosa8.com/v1/mcp/connections \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json

Connect a catalog MCP server: sign in, or a key#

POST/v1/mcp/connections/{id}/connectscope admin

From the dashboard this also sets a short-lived, HttpOnly cookie that binds the sign-in to this browser and person; the provider redirects to https://app.kosa8.com/oauth/mcp/callback, which checks it, swaps the code, checks the token's audience and that it works, and returns to Integrations with ?result=connected or an error code (denied, expired, state_mismatch, invalid_grant, audience_mismatch, token_rejected, needs_client, …).

Parameters
idrequiredpath · string
The server's id: a catalog id (linear, notion, atlassian, …) or custom-<name>
JSON body
keystring
For a server that takes an API key (mode key), or instead of signing in where the catalog lists a key
Responses
200400401403404409502
curl -s -X POST https://api.kosa8.com/v1/mcp/connections/$SBX/connect \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json

Refresh a connected server's token now#

POST/v1/mcp/connections/{id}/refreshscope sandboxes:write

kosa8 also refreshes on its own a minute before expiry and on a 401. A refused refresh sets status reconnect (409 reconnect). Audited as mcp.refresh.

Parameters
idrequiredpath · string
The server's id: a catalog id (linear, notion, atlassian, …) or custom-<name>
Responses
200401403404409502
curl -s -X POST https://api.kosa8.com/v1/mcp/connections/$SBX/refresh \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Check a connected server: initialize and list its tools#

POST/v1/mcp/connections/{id}/testscope sandboxes:write
Parameters
idrequiredpath · string
The server's id: a catalog id (linear, notion, atlassian, …) or custom-<name>
Responses
200401403404409502
curl -s -X POST https://api.kosa8.com/v1/mcp/connections/$SBX/test \
  -H "Authorization: Bearer $KOSA8_API_KEY"

Disconnect a server: revoke at the provider and forget the tokens#

DELETE/v1/mcp/connections/{id}scope admin

Audited as mcp.disconnect.

Parameters
idrequiredpath · string
The server's id: a catalog id (linear, notion, atlassian, …) or custom-<name>
Responses
200401403404
curl -s -X DELETE https://api.kosa8.com/v1/mcp/connections/$SBX \
  -H "Authorization: Bearer $KOSA8_API_KEY"

The kosa8 MCP gateway: send MCP messages to a connected server#

POST/v1/mcp/gw/{id}scope sandboxes:write

MCP Streamable HTTP, proxied: point any MCP client at https://api.kosa8.com/v1/mcp/gw/{id} with Authorization: Bearer <a kosa8 API key with sandboxes:write>, or, inside a sandbox created with mcp, $KOSA8_MCP_URL/{id} with $KOSA8_MCP_TOKEN (its egress broker swaps in the real token). kosa8 adds the server's token, refreshes it when needed, passes Mcp-Session-Id both ways and streams the answer. Every tools/call is an audit event (mcp.call: server and tool, never arguments). Errors are JSON-RPC errors whose data.code is reconnect, not_connected, forbidden, …. Example: claude mcp add --transport http linear https://api.kosa8.com/v1/mcp/gw/linear --header "Authorization: Bearer $KOSA8_API_KEY"

Parameters
idrequiredpath · string
The server's id: a catalog id (linear, notion, atlassian, …) or custom-<name>
Responses
200401403404409413502
curl -s -X POST https://api.kosa8.com/v1/mcp/gw/$SBX \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json

The gateway: the server's event stream#

GET/v1/mcp/gw/{id}scope sandboxes:write

MCP Streamable HTTP, proxied: point any MCP client at https://api.kosa8.com/v1/mcp/gw/{id} with Authorization: Bearer <a kosa8 API key with sandboxes:write>, or, inside a sandbox created with mcp, $KOSA8_MCP_URL/{id} with $KOSA8_MCP_TOKEN (its egress broker swaps in the real token). kosa8 adds the server's token, refreshes it when needed, passes Mcp-Session-Id both ways and streams the answer. Every tools/call is an audit event (mcp.call: server and tool, never arguments). Errors are JSON-RPC errors whose data.code is reconnect, not_connected, forbidden, …. Example: claude mcp add --transport http linear https://api.kosa8.com/v1/mcp/gw/linear --header "Authorization: Bearer $KOSA8_API_KEY"

Parameters
idrequiredpath · string
The server's id: a catalog id (linear, notion, atlassian, …) or custom-<name>
Responses
200401403404409413502
curl -s -X GET https://api.kosa8.com/v1/mcp/gw/$SBX \
  -H "Authorization: Bearer $KOSA8_API_KEY"

The gateway: end the MCP session#

DELETE/v1/mcp/gw/{id}scope sandboxes:write

MCP Streamable HTTP, proxied: point any MCP client at https://api.kosa8.com/v1/mcp/gw/{id} with Authorization: Bearer <a kosa8 API key with sandboxes:write>, or, inside a sandbox created with mcp, $KOSA8_MCP_URL/{id} with $KOSA8_MCP_TOKEN (its egress broker swaps in the real token). kosa8 adds the server's token, refreshes it when needed, passes Mcp-Session-Id both ways and streams the answer. Every tools/call is an audit event (mcp.call: server and tool, never arguments). Errors are JSON-RPC errors whose data.code is reconnect, not_connected, forbidden, …. Example: claude mcp add --transport http linear https://api.kosa8.com/v1/mcp/gw/linear --header "Authorization: Bearer $KOSA8_API_KEY"

Parameters
idrequiredpath · string
The server's id: a catalog id (linear, notion, atlassian, …) or custom-<name>
Responses
200401403404409413502
curl -s -X DELETE https://api.kosa8.com/v1/mcp/gw/$SBX \
  -H "Authorization: Bearer $KOSA8_API_KEY"

The kosa8 newsletter

A short daily email with that day's article and one tip. Switch to weekly or unsubscribe in one click.

© 2026 kosa8 · kosa8.com · Zero Trust cybersecurity infrastructure for AI agents · Local models served by llamay · Agent gateway: MAQPNA