Skip to Content
Protocol reference

CMP Core HTTP repository API

Public baseline API for self-hosted Server and compatible Cloud implementations.

The public CMP Core protocol uses HTTP JSON to manage versioned context repositories. This is the baseline interoperable API for CMP Server and CMP Cloud, subject to endpoint-specific authorization.

A self-hosted CMP Server does not implement native WSS subscriptions, agent coordination, session archive APIs, or CMP Connect.

Discovery

MethodPathPurpose
GET/.well-known/context-managementHTTP transport and context operations
GET/v1/capabilitiesSupported features, including negative Cloud capability flags
GET/healthzHealth of the local reference

Repositories

MethodPathPurpose
GET/v1/reposList repositories
POST/v1/reposCreate a repository
GET/v1/repos/:repoRepository metadata
GET/v1/repos/:repo/head?branch=mainRead branch head
GET/v1/repos/:repo/records?ref=mainRead versioned record snapshot
GET/v1/repos/:repo/branchesRead branch heads
POST/v1/repos/:repo/branchesCreate a branch
POST/v1/repos/:repo/commitsCommit changes conditionally
POST/v1/repos/:repo/mergeMerge source branch into target
GET/v1/repos/:repo/diff?from=main&to=featureCompare record revisions
GET/v1/repos/:repo/events?cursor=0Historical repository event log, not a live streaming subscription
POST/v1/rpcJSON method dispatch for Core context operations

Conditional commit

A commit request includes branch, expectedHead, authorId, message, and changes. Each change puts a complete knowledge record or deletes an ID. The server validates the expected branch head atomically and returns a conflict for stale writes instead of silently overwriting concurrent edits.

A knowledge record includes ID, kind, Markdown content, status, authorId, update time and sourceRefs. Those source references do not authorize fetching remote provider content.

Authentication

The self-hosted reference is development-only, with a local operator bearer token and loopback binding. CMP Cloud uses its own managed identity and authorization stack. Neither system grants anonymous cross-repository access.

See Core versus Cloud.

On this page