Appearance
MCP resources
OpenBrain exposes read-only MCP resources with brain:// URI templates. Requires memory:search and a token scoped to the organization in the URI.
brain_summary
brain://{organizationId}/summary
Plain-text summary: organization name, total memory count, top facet values per metadata key.
brain_recent
brain://{organizationId}/recent
Plain-text digest of the 10 most recent memories (content truncated).
brain_document
brain://{organizationId}/document/{documentId}
Concatenates chunks for a documentId (metadata chunkIndex / chunkTotal), ordered by numeric chunkIndex in SQL. Non-numeric indexes sort last and do not raise cast errors. The resource fetches at most OPENBRAIN_MAX_DOCUMENT_CHUNKS (default 500) and returns an MCP error if the document has more chunks rather than silently truncating.
Authorization
The organizationId in the URI must match the token’s organization:{uuid} ability (or the sole membership when using an unbound token). X-Organization-Id, when present, must agree with the URI and the bound token org. Mismatches return an error response. Resources require memory:search and remain available to unpaid organizations.
Local unauthenticated MCP (APP_ENV=local and OPENBRAIN_DEFAULT_ORGANIZATION_ID set) may only read resources whose URI organizationId equals that configured default. Other organization IDs are denied.