rift
Protocol

Protocol

Planned

Rift publishes one generated contract through these definitions:

  • Core model - source discovery, identities, provider facts, and changes shared by protocol surfaces
  • MCP - the tools and resources an agent calls
  • SCIP - a read-only export for tools that consume SCIP indexes

The Rust models in crates/rift-protocol are the source of truth. The served tool surface is exported as JSON Schema at mcp.json, and the reference explains it.

How a request finds its target

An agent's rift mcp reads the workspace's ServerLock - or starts the server that writes it - and forwards MCP requests to the endpoint it names. Calls do not open connection-scoped sessions. Each call names a projection, or the workspace tree by omitting one, and carries any witnessed address it uses.

The server retains no capture between calls: a paged read names its page by page_index, and each page is computed from the request. A projection retains its changes and recorded read dependencies across calls.

Node addresses carry content witnesses, so the server refuses a stale write before replacing moved bytes. When two projections change the same workspace path, publish checks directly by comparing the paths it's about to write.

Versioning

Rift uses MCP's protocol versioning without adding another version field. The MCP client carries standard MCP version metadata; Rift tool arguments contain only arguments declared by each tool's input schema.

The server advertises its current tool and resource schemas through MCP. A release freezes its exported contract for implementers and generated clients; callers do not select a snapshot on each request.