# USRCP — User Context Protocol [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/frank-bot07/usrcp  
**GitHub Stars:** 1  
**npm Downloads (last month):** 260  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/usrcp-user-context-protocol

## Description
Encrypted local ledger of structured user state, shared across every MCP-aware AI tool.

## Tools
Capabilities this server exposes over MCP:

- **usrcp_handoff** — Load a concise startup context packet for the human user when switching AI interfaces: relevant projects, facts with review status and recent work. Call at session start and refresh before consequential work; another agent may have updated the plan.
- **usrcp_get_state** — Query the user's identity, preferences, active projects, domain context, and recent interaction timeline from their USRCP State Ledger. Use this at the start of a session to understand who the user is and what they've been working on across all AI platforms.
- **usrcp_append_event** — Record an interaction event to the user's USRCP State Ledger. Call this when a meaningful interaction completes — a task finished, a decision made, a file created, a bug fixed. This builds the user's cross-platform interaction history.
- **usrcp_update_identity** — Update the user's core identity in the USRCP State Ledger. Use when you learn new information about the user — their role, expertise, or communication preferences.
- **usrcp_update_preferences** — Update the user's global preferences in the USRCP State Ledger. These preferences apply across all AI platforms.
- **usrcp_update_domain_context** — Store or update domain-scoped context in the USRCP State Ledger. Use this to persist domain-specific knowledge that should be available to any agent working in that domain (e.g., coding preferences, writing style notes, research topics).
- **usrcp_search_timeline** — Search the user's interaction timeline by keyword. Useful for finding past interactions, decisions, or context about specific topics.
- **usrcp_manage_project** — Create or update a project in the user's USRCP State Ledger. Projects track what the user is actively working on across platforms.
- **usrcp_audit_log** — View the USRCP audit log — every read, write, search, and delete operation recorded with timestamps, agent identity, and scopes accessed.
- **usrcp_rotate_key** — Rotate the master encryption key. IRREVERSIBLE: replaces the on-disk master key and re-encrypts every row. DO NOT call this on your own initiative — only when the user has explicitly asked to rotate, or to respond to a confirmed key-compromise event. Rate-limited to once per 24h by default; rows that fail MAC verification under the current key are NOT silently dropped (the call will return an error and refuse to advance unless force_skip_damaged=true).
- **usrcp_set_fact** — Store a free-form fact in a domain namespace. Use for data the fixed schema doesn't model (habits, relationships, recurring tasks, mood, goals, etc.). Upserts one row per (domain, namespace, key) — re-calling with the same key overwrites. All values are encrypted with the domain-scoped key.
- **usrcp_get_facts** — Read schemaless facts. If `key` is provided, returns a single fact; otherwise lists all facts in the domain (optionally filtered by namespace).
- **usrcp_status** — Get the status and statistics of the local USRCP ledger — total events, domains, platforms, and projects.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "usrcp-user-context-protocol": {
    "command": "npx",
    "args": ["-y","usrcp"],
    "env": {
      "USRCP_PASSPHRASE": ""
    }
  }
}
```

**Requires environment variables:** `USRCP_PASSPHRASE` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What USRCP — User Context Protocol does

USRCP — User Context Protocol provides a local context layer for multiple AI clients. It keeps identity details, preferences, projects, domain context, free-form facts, and activity events in one encrypted SQLite ledger. MCP clients can request a focused startup brief with `usrcp_handoff` or inspect broader state through `usrcp_get_state`.

The server is designed for continuity when a user changes tools. A client can record work with `usrcp_append_event`, update structured profile data, and retrieve recent context from the same local profile. The core workflow does not require a cloud account or transfer of the ledger to another service.

## How it works

The local MCP process reads and writes the selected user ledger. Structured records are encrypted at rest, and authorized agents receive decrypted context through the MCP interface. Multiple users on one machine can have separate slugs, ledgers, passphrases, and MCP entries.

The available state model includes identity, communication preferences, projects, domain-scoped key-value data, and facts stored by domain, namespace, and key. `usrcp_update_identity` supports an optional `expected_version` value for read-modify-write updates. Timeline searches use blind-index tokens and exact keywords; they are not semantic searches.

Capture adapters can append activity authored in connected sources to the same ledger. The documented structured adapters include GitHub, Linear, Obsidian, Claude Code, and Google Calendar. Experimental conversation-capture adapters are also available for Slack, Discord, Telegram, iMessage, and Gmail, but they are separate packages and require their own setup.

## Setup and configuration

USRCP — User Context Protocol requires Node 22.13 or newer, with Node 24 or newer recommended. Install the CLI with npm or Homebrew, then initialize a profile and start the server:

```bash
npm install -g usrcp
usrcp init
usrcp serve
```

Initialization normally prompts for a passphrase. The passphrase can be stored in the operating system keychain, or supplied through `USRCP_PASSPHRASE` when starting the server. Development mode can instead keep a key on disk. Initialization also creates the user directory and writes a Claude Desktop MCP configuration entry.

Adapters are installed separately, then configured with the setup wizard. For example, installing `usrcp-linear` is followed by `usrcp setup --adapter=linear`. Source builds require building the protocol core before building and linking the local package.

## Tools and capabilities

The MCP tool set includes:

- `usrcp_handoff` for a condensed, domain-specific brief containing reviewed facts and recent work.
- `usrcp_get_state` for identity, preferences, projects, and timeline data.
- `usrcp_append_event` for recording interaction events.
- Identity, preference, domain-context, fact, and project update tools.
- `usrcp_get_facts` and `usrcp_search_timeline` for reading stored context.
- `usrcp_audit_log`, `usrcp_rotate_key`, and `usrcp_status` for auditing, encryption-key rotation, and health information.

Optional domain restrictions limit which areas scoped agents can see. The status tool is scope-aware, so a scoped agent receives statistics for its permitted domains.

## Limitations and notes

USRCP — User Context Protocol is an early beta. A shared ledger does not by itself guarantee that an AI client will retrieve or follow startup instructions; client behavior should be checked with the documented acceptance test. The structured core uses exact-keyword lookup rather than semantic retrieval.

The optional `usrcp-stream` feature has a different privacy boundary: local embedding vectors are plaintext on disk, and external embedding providers receive content only after consent. The optional device relay synchronizes ciphertext content with visible metadata rather than the complete structured profile. Key rotation re-encrypts all data and should be treated as an administrative operation.

_Full upstream README: https://allmcps.com/mcp/usrcp-user-context-protocol/readme_

