cosmic-mcp

API REFERENCE

COSMOS API

Raw contracts: openapi.yaml (OpenAPI 3.1) and asyncapi.yaml (AsyncAPI 3.0). Errors are RFC 9457 problem+json with a COSMOS error code; every answer carries X-Request-Id.

HTTP operations

MethodPathAreaWhat it does
POST/mcpmcpSend one JSON-RPC message (MCP Streamable HTTP)
GET/mcpmcpOpen the server-to-client SSE stream (notifications/tools/list_changed, notifications/resources/updated)
DELETE/mcpmcpEnd the MCP session
GET/.well-known/oauth-protected-resourceoauthProtected resource metadata (RFC 9728)
GET/.well-known/oauth-protected-resource/mcpoauthProtected resource metadata for /mcp (RFC 9728 path-suffixed form)
GET/.well-known/oauth-authorization-serveroauthAuthorization server metadata (RFC 8414)
GET/oauth/authorizeoauthStart authorization (redirects to TheOneApp sign-in)
GET/oauth/callbackoauthSign-in provider callback; shows the consent page
POST/oauth/consentoauthApprove or deny the authorization
POST/oauth/tokenoauthExchange a code or refresh token (RFC 6749, PKCE RFC 7636, resource RFC 8707)
POST/oauth/registeroauthDynamic client registration (RFC 7591); new clients start pending
POST/oauth/revokeoauthRevoke a token (RFC 7009)
GET/signinpagesSign in to COSMOS's own pages
GET/confirm/{id}pagesShow a pending confirmation (what the agent wants to do)
POST/confirm/{id}pagesApprove or deny (CSRF-protected form)
GET/v1/toolstoolsList the tools you can call (same use case as MCP tools/list)
POST/v1/tools/{name}/callstoolsCall a tool (same pipeline as MCP tools/call)
GET/v1/jobs/{id}jobsJob status and result
POST/v1/jobs/{id}/canceljobsCancel a job (idempotent)
GET/v1/pluginspluginsList plugins (cursor-paginated)
POST/v1/pluginspluginsCreate a plugin (plugins:admin)
GET/v1/plugins/{name}plugins
PUT/v1/plugins/{name}/versions/{version}pluginsPublish an immutable manifest version (plugins:admin; idempotent by URL)
POST/v1/plugins/{name}/versions/{version}/distributions/{target}pluginsRender the package for one client target and record it as pending
PATCH/v1/admin/clients/{id}adminActivate, pend or disable an OAuth client; set redirect URIs (cosmos:admin)
PATCH/v1/admin/models/providers/{id}adminModels leg kill switch for one provider (cosmos:admin)
GET/v1/admin/audit/verifyadminRe-compute the audit hash chain (cosmos:admin)
GET/errorlordpagesErrorLord console (admins)
GET/bridge/connectmcpBrowser bridge WebSocket upgrade (AsyncAPI channel bridge)
GET/{$}sitePublic front page (gateway story
GET/docssiteDeveloper docs index
GET/docs/quickstartsiteQuick start per client plus bridge and extension downloads
GET/docs/authsiteOAuth 2.1 guide (metadata URLs
GET/docs/toolssiteTool catalog from the live registry (no endpoints)
GET/docs/apisiteThis API reference
GET/docs/changelogsiteChangelog
GET/statussiteFriendly status page (readiness checks and leg health)
GET/tools.jsonsitePublic tool catalog as JSON (namespace, status, tools with input schemas; never endpoints)
GET/openapi.yamlsiteThis document
GET/asyncapi.yamlsiteThe AsyncAPI document
GET/downloads/{file}siteA release artifact of this build (allow-listed names only)
GET/assets/{file}sitePage stylesheet and script
GET/favicon.svgsiteFavicon
GET/site.webmanifestsiteWeb app manifest (site name cosmic-mcp)
GET/favicon.icositeFavicon (same SVG)
GET/robots.txtsiteRobots rules (allow / and /docs)
GET/sitemap.xmlsiteSitemap of the public pages
GET/homesiteSigned-in home (connections, legs and health, tools, own activity; admins - pending clients and audit verify)
POST/home/connections/{family}/revokesiteDisconnect one of your own clients (revokes its refresh and access tokens)
POST/home/clients/{id}/decisionsiteAdmins approve (active) or deny (disabled) a pending client
POST/home/audit/verifysiteAdmins re-compute the audit hash chain (first 10,000 entries)
POST/signoutsiteSign out of COSMOS's pages
POST/v1/veritas/verifyveritasAnonymous public verify of one Veritas receipt (spec - Verify needs no account)
GET/extensions/privacysitePrivacy policy of the Cosmic Unicorn and Cosmic Chariot browser extensions
GET/healthzopsLiveness
GET/readyzopsReadiness (database, legs, config)
GET/errorssitePublic error code registry (problem+json type URLs point here)
GET/metricsopsPrometheus text metrics (loopback / tunnel only)

Channels and events

ChannelAddressAbout
bridge/bridge/connect
auditRecordedcosmos.audit.recorded.v1One per audited call. Key user_id (per-user ordering). Retry topic cosmos.audit.recorded.v1.retry, DLQ cosmos.audit.recorded.v1.dlq.
jobUpdatedcosmos.job.updated.v1Job status changes. Key job_id. Retry + DLQ as above.

gRPC for internal services

Services on the TheOne network can call the same use cases over gRPC (cosmos.gateway.v1.Gateway) with a client-credentials token. Ask a COSMOS administrator for a service client.