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
| Method | Path | Purpose |
|---|---|---|
| GET | /.well-known/context-management | HTTP transport and context operations |
| GET | /v1/capabilities | Supported features, including negative Cloud capability flags |
| GET | /healthz | Health of the local reference |
Repositories
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/repos | List repositories |
| POST | /v1/repos | Create a repository |
| GET | /v1/repos/:repo | Repository metadata |
| GET | /v1/repos/:repo/head?branch=main | Read branch head |
| GET | /v1/repos/:repo/records?ref=main | Read versioned record snapshot |
| GET | /v1/repos/:repo/branches | Read branch heads |
| POST | /v1/repos/:repo/branches | Create a branch |
| POST | /v1/repos/:repo/commits | Commit changes conditionally |
| POST | /v1/repos/:repo/merge | Merge source branch into target |
| GET | /v1/repos/:repo/diff?from=main&to=feature | Compare record revisions |
| GET | /v1/repos/:repo/events?cursor=0 | Historical repository event log, not a live streaming subscription |
| POST | /v1/rpc | JSON 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.