Fetch an MCP endpoint
const url = 'https://example.com/v1/mcp/endpoints/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/mcp/endpoints/example \ --header 'Authorization: Bearer <token>'Returns the wire-safe MCPEndpoint (secrets never cross the wire — secretRef, auth and secretEnv name secrets the runtime resolves inside the deployment). A stdio endpoint’s config.env values read back as [redacted], their names kept.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”MCPEndpointId — deployment-stable string identifier chosen by the caller.
Responses
Section titled “Responses”MCP endpoint.
object
Human-readable display name.
MCP transport variant. stdio — local subprocess (spawn a command). http-sse — the older MCP HTTP+SSE transport (separate POST + SSE endpoints). streamable-http — the Streamable HTTP transport (single endpoint, session id via header).
object
Variables for the server’s process, stored as given. Not for a credential: a name config.headers would refuse, its parts split on _ as well as - (GITHUB_TOKEN, OPENAI_API_KEY, AWS_SECRET_ACCESS_KEY, SLACK_BOT_TOKEN), is refused (invalid-mcp-endpoint, reason credential-in-env). Give it by reference through secretEnv. An empty name, a name with = or a NUL, a value with a NUL, or a value of [redacted] is refused too (reason invalid-stdio-env). Every value reads back as [redacted], its name kept, on endpoints registered before as well, so an export holds the names, not the values.
object
object
Optional distinct SSE endpoint if the server splits them.
Headers sent with every request, as given. Not for a credential: a header named Authorization, Proxy-Authorization or Cookie, or with a -/_-separated part token, secret, password, passwd, apikey, credential, credentials, signature, session, auth, authorization or authentication, or the parts api-key, access-key, private-key, auth-key, subscription-key, functions-key, application-key, app-key, master-key, client-key or partner-key (X-Api-Key, X-Auth-Token), is refused (invalid-mcp-endpoint, reason credential-in-headers). Send it by reference: auth with scheme: header, or secretRef for a bearer. An endpoint registered with one before keeps working, and its value reads back as [redacted]. Nor one of MCP’s own headers, whatever its case: Mcp-Session-Id, Mcp-Protocol-Version, Mcp-Method, Mcp-Name or any Mcp-Param-… is refused (invalid-mcp-endpoint, reason transport-header-in-config). The MCP client sets them itself where the protocol calls for them, the Mcp-Param- ones from a tool’s arguments.
object
object
Headers sent with every request, as given. Not for a credential: a header named Authorization, Proxy-Authorization or Cookie, or with a -/_-separated part token, secret, password, passwd, apikey, credential, credentials, signature, session, auth, authorization or authentication, or the parts api-key, access-key, private-key, auth-key, subscription-key, functions-key, application-key, app-key, master-key, client-key or partner-key (X-Api-Key, X-Auth-Token), is refused (invalid-mcp-endpoint, reason credential-in-headers). Send it by reference: auth with scheme: header, or secretRef for a bearer. An endpoint registered with one before keeps working, and its value reads back as [redacted]. Nor one of MCP’s own headers, whatever its case: Mcp-Session-Id, Mcp-Protocol-Version, Mcp-Method, Mcp-Name or any Mcp-Param-… is refused (invalid-mcp-endpoint, reason transport-header-in-config). The MCP client sets them itself where the protocol calls for them, the Mcp-Param- ones from a tool’s arguments.
object
The secret sent as the endpoint’s bearer. HTTP transports only: on a stdio endpoint it’s refused (invalid-mcp-endpoint, reason secret-ref-on-stdio), since a stdio server gets no headers; give it its secret through secretEnv. An endpoint registered with one before keeps it, and the runtime reads it for no one.
object
HTTP Basic: the runtime sends Authorization: Basic base64(<username>:<secret>), with the secret secretRef names (a WordPress Application Password, for one).
object
The user name. Not a secret, and without :.
The secret an MCP endpoint authenticates with: a name in the deployment’s secrets store, resolved at the endpoint’s tenant scope by the runtime (the shape webhooks and providers use). As the endpoint’s own secretRef, it is sent as its bearer; inside auth, it is the scheme’s password, client secret or header value; in secretEnv, a variable’s value for a stdio server. The endpoint keeps only this reference.
object
OAuth 2 client credentials: the runtime asks tokenUrl for an access token (grant_type=client_credentials) as clientId, with the client secret secretRef names, sends it as the endpoint’s bearer, and asks for a new one before it expires (Drupal’s Simple OAuth, for one). The token is never stored.
object
The token endpoint: https, or http to a loopback host (localhost, 127.0.0.1, [::1]).
The secret an MCP endpoint authenticates with: a name in the deployment’s secrets store, resolved at the endpoint’s tenant scope by the runtime (the shape webhooks and providers use). As the endpoint’s own secretRef, it is sent as its bearer; inside auth, it is the scheme’s password, client secret or header value; in secretEnv, a variable’s value for a stdio server. The endpoint keeps only this reference.
object
The scopes to ask for, space-separated, sent as-is. Absent: none asked for.
An audience parameter, for identity providers that need one. Absent: none sent.
How the client authenticates to the token endpoint (RFC 6749 §2.3.1): client_secret_basic (an Authorization: Basic header, the default) or client_secret_post (client_id and client_secret in the form).
Headers of the server’s own, each with a secret: an API key in X-Api-Key, a key and a secret in two headers, or Authorization with a prefix other than Bearer (Token …). The runtime resolves each secretRef when it connects, and refuses to follow a redirect with them, as it does for every auth.
object
One header a header auth sends: <name>: <prefix><secret>.
object
An HTTP header name, once per auth (case-insensitive). Not one the MCP transport or HTTP sets itself (Host, Content-Type, Content-Length, Accept, Connection, Mcp-Session-Id, Mcp-Protocol-Version, Mcp-Method, Mcp-Name, any Mcp-Param-…, Last-Event-ID, traceparent, tracestate, …): reason invalid-auth.
The secret an MCP endpoint authenticates with: a name in the deployment’s secrets store, resolved at the endpoint’s tenant scope by the runtime (the shape webhooks and providers use). As the endpoint’s own secretRef, it is sent as its bearer; inside auth, it is the scheme’s password, client secret or header value; in secretEnv, a variable’s value for a stdio server. The endpoint keeps only this reference.
object
Text sent before the secret, such as Token or ApiKey , without control characters. Absent: none. Not a secret: it reads back as registered.
A connection to the app whose own MCP server this is (HubSpot’s, Asana’s): each tool call sends the access token of the connection the call runs with, minted for the server’s resource (RFC 8707), and renewed once on a 401. No secret is stored. The app’s entry must list the endpoint’s origin in its mcpServers, so a token goes to that origin only (reason origin-not-listed), and the server’s Protected Resource Metadata must name the entry’s resource and authorization server (reasons resource-mismatch and issuer-mismatch, or resource-metadata-unreadable). Needs catalogConnectionId. Each of the server’s tools needs a connection to app (needsSpec.connections, named for the app), so a call without one waits for its person to connect, or is refused as a pack tool’s need would be.
object
The app’s entry id (hubspot, asana), one the server knows (GET /v1/connections/entries; reason unknown-app).
Whose connection a call uses: person, the account of the person the run acts for; company, the company’s one account, which runs no person started (a webhook’s, a schedule’s) can use. The entry must allow that owner (reason owner-not-allowed).
The entry’s permission keys the tools need, one set for every tool of the endpoint. Each must be the entry’s (reason unknown-permission). Absent: each of the entry’s permissions.
With a connection auth only, and needed with one: the connection the runtime lists the server’s tools with (connectionId, from GET /v1/connections). It only lists tools, and never calls one. A live connection to auth.app, under the env the runtime serves (reason catalog-connection-not-found), and the registrant’s own or the company’s (reason catalog-connection-not-yours). Without a connection auth it’s refused (reason catalog-connection-without-connection-auth); missing with one, reason catalog-connection-required; not a UUID, reason invalid-catalog-connection-id. While it needs reconnecting, the endpoint keeps the tools it last listed. An older runtime refuses the field as unknown.
A stdio server’s secrets, as variables of its process: each variable’s name (GITHUB_TOKEN) with the secret its value is read from, at the endpoint’s recorded scope, when the runtime starts the server. The value is never stored or answered. 1 to 16 variables, each name without =, and none also in config.env (invalid-mcp-endpoint, reason secret-env-twice); otherwise reason invalid-secret-env. Each secret counts for the provider-key guard and the env a runtime serves, as secretRef’s does. stdio only: on an HTTP endpoint it’s refused (reason secret-env-on-http). An older runtime refuses the field as unknown. A runtime rolled back to one without it starts the server without these variables, so the server fails its own calls; no value is exposed.
object
The secret an MCP endpoint authenticates with: a name in the deployment’s secrets store, resolved at the endpoint’s tenant scope by the runtime (the shape webhooks and providers use). As the endpoint’s own secretRef, it is sent as its bearer; inside auth, it is the scheme’s password, client secret or header value; in secretEnv, a variable’s value for a stdio server. The endpoint keeps only this reference.
object
Optional pass-through to the MCP client serverInfo.instructions.
Optional caller-defined metadata bag.
object
Send the W3C traceparent of the run calling a tool to this endpoint, as a request header, so the server’s logs can be matched to the run. Ids only, never content. Default false. HTTP transports only: true on a stdio endpoint is refused (invalid-mcp-endpoint, reason invalid-send-traceparent). An older runtime ignores it and sends none.
The server’s tools that only read, by the names its tools/list gives them (acme-order-lookup, not the catalog id). Each is published with mutating: false, and a tool’s newest version decides for every version of it, pinned ones included. So a listed tool runs without a yes in a site person’s Ask, defaults to never_ask, runs in a dry run, and a replay uses its recorded result or refuses it. The registrant’s claim, as a tool’s own mutating: false is: list only tools that never change anything. The server’s own readOnlyHint isn’t read. A name the server doesn’t serve changes nothing. 1 to 256 names, each 1 to 128 characters, no repeats; otherwise invalid-mcp-endpoint, reason invalid-read-only-tools. Any transport. An older runtime refuses the field as unknown and registers nothing.
Where each secret it names is read, by name: recorded by the server when it was registered, never sent by a caller. null: none usable (the registrant administers no scope the secret could be read at), until an admin records it again: a tool by publishing a new version, an MCP endpoint by unregistering it and registering it again. Absent on items registered before it was recorded, or on a runtime without a secrets store.
Example
{ "transport": "stdio", "config": { "transport": "stdio" }, "auth": { "scheme": "basic" }, "secretScopes": { "additionalProperty": { "kind": "tenant" } }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No MCP endpoint with that id under this workspace.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.
The database was too busy to answer in time (database-busy), or the authorization store couldn’t be reached (authz-backend-unavailable); Retry-After (whole seconds) says when to try again.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.
See also
GET /v1/mcp/endpoints: List MCP endpointsPOST /v1/mcp/endpoints: Register an MCP endpointPOST /v1/mcp/endpoints/{endpointId}/unregister: Unregister an MCP endpointGET /v1/mcp/endpoints/{endpointId}/resources: List resources at a remote MCP endpoint- Error code
authz-backend-unavailable - Error code
database-busy - Error code
rate-limit-exceeded - Every error code