Skip to content

client.mcp.endpoints

View as Markdown

client.mcp.endpoints — the mcp.endpoints operations.

On AsyncKindgi every method is the same, awaited.

list(
*,
limit: int | None = None,
cursor: str | None = None,
transport: Literal['stdio', 'http-sse', 'streamable-http'] | None = None,
scope_kind: Literal['tenant', 'org', 'project'] | None = None,
scope_id: str | UUID | None = None,
inherit: bool | None = None,
timeout: float | None = None,
) -> MCPEndpointCollectionPage
Signature

List MCP endpoints. GET /v1/mcp/endpoints

Cursor-paginated. Optional ?transport= narrows to a single variant (stdio | http-sse | streamable-http). ?scopeKind + ?scopeId + ?inherit narrow to a specific scope; inherit is LOAD-BEARING here (policy/config-scoped binding — controls the upward-hierarchy walk).

register(
body: RegisterMCPEndpointBody | Mapping[str, Any] | None = None,
/,
*,
idempotency_key: str | None = None,
timeout: float | None = None,
**fields: Any,
) -> RegisterMCPEndpointResult
Signature

Register an MCP endpoint. POST /v1/mcp/endpoints

Body is a full MCPEndpoint plus the scope to register it in (scopeKind + scopeId); authorization checks that scope. Server validates the closed transport enum + the config.transport matches transport guardrail + per-variant required fields (command for stdio; url for http-sse / streamable-http), and refuses unknown fields. secretRef, auth and secretEnv name secrets in the deployment's store (plaintext secrets never cross the wire), and never a model provider's key (400 provider-key-refused), a texts registration's account key (400 connection-key-refused) or an identity provider's secret (400 identity-provider-key-refused). A credential in plaintext config.headers or a stdio endpoint's config.env is refused (400 invalid-mcp-endpoint, reason credential-in-headers or credential-in-env), and so is one of MCP's own headers in config.headers (Mcp-Session-Id, Mcp-Protocol-Version, Mcp-Method, Mcp-Name, Mcp-Param-…; reason transport-header-in-config). Where each secret it names is read is recorded on it now (secretScopes): the first of its own scope, its project's org and the workspace that has the secret and that the caller administers, else the broadest they administer; the runtime reads it there only. An auth with scheme: connection names no secret: it's checked against the server's app entries and connections (the app, its mcpServers, its owners and permissions, and catalogConnectionId), and the runtime reads the server's Protected Resource Metadata through its egress guard; each refusal is 400 invalid-mcp-endpoint with its reason. A deployment with KINDGI_TENANT_HOST_ACCESS=deployed (the default outside development) refuses a stdio endpoint, which would run a command on the server's host: 403 host-access-denied.

get(endpoint_id: str | UUID, /, *, timeout: float | None = None) -> MCPEndpoint
Signature

Fetch an MCP endpoint. GET /v1/mcp/endpoints/{endpointId}

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.

unregister(
endpoint_id: str | UUID,
/,
*,
idempotency_key: str | None = None,
timeout: float | None = None,
) -> UnregisterMCPEndpointResult
Signature

Unregister an MCP endpoint. POST /v1/mcp/endpoints/{endpointId}/unregister