Skip to content

Repository files navigation

usectx

Memory kit for agents. Attach hosted MCP, lease search, hop the code graph.

Version 0.3.0 — see CHANGELOG / RELEASE. No private core clone. Tokens never live in pack mcp.json. Engine/lab iterates separately (usectx-lab); this kit stays the thin public surface.

Hosted accept: GET https://ctx.op0.ai/readyzretrievalMode: hybrid.

Stranger path (install → login → MCP search)

You need a workspace bearer from app.op0.ai/ctx (or usectx login). Not /work. Without a bearer, leased search refuses — agents must not invent memory.

1 — Install (CLI + pack)

Verified install (git content-addressed):

git clone --depth 1 https://github.com/op0ai/usectx.git
cd usectx && bash install.sh --global

CDN convenience (same script; prefer clone for git integrity):

curl -fsSL https://op0.ai/usectx/install.sh | bash -s -- --global

2 — Login (mint bearer + optional home MCP)

usectx login --global

Writes ~/.op0/usectx/token and home ~/.cursor/mcp.json (Claude Desktop when present). Or skip the CLI and paste a bearer into client MCP only (step 3).

3 — MCP search (prove attach)

Fastest without installer: copy examples/cursor.mcp.json → project .cursor/mcp.json (or home ~/.cursor/mcp.json):

{
  "mcpServers": {
    "usectx": {
      "url": "https://ctx.op0.ai/mcp",
      "headers": {
        "Authorization": "Bearer CTX_HTTP_TOKEN"
      }
    }
  }
}

Replace CTX_HTTP_TOKEN. Reload MCP. Call search with { "query": "ready", "limit": 1 } — or usectx ask "ready".

Optional skills (Cursor / Claude Code / Codex / others):

npx --yes skills@1.5.23 add op0ai/usectx@v0.3.0

skills-lock.json is written by the skills CLI in the consumer project — not in this kit.

One agent prompt

After skills or MCP are present:

Attach usectx memory from https://ctx.op0.ai/mcp using my workspace token, verify readiness at /readyz, and retrieve indexed project context.

The agent follows skills/usectx-attach/SKILL.md, then usectx-session.

Hosted today (honest)

Surface Hosted ctx.op0.ai
search (leased) Yes — door mints lease from bearer
code_graph Yes — needs an extracted graph for the workspace
health / /readyz Yes — public probes; MCP health needs bearer
ingestTranscriptProjection When tools/list shows it — call only then
extract (local container) No — local/lab only; hosted queues on repository bind
Unleased / wrong-tenant search Refuse — never invent hits

Optional local lab: set CTX_URL=http://127.0.0.1:4790 and ALLOW_LOOPBACK=1 for the installer/CLI. Pack stdio shim: ./bin/usectx-mcp-stdio.mjs (reads ~/.op0/usectx/token).

Skills

Skill Leading word When
usectx-attach attach wire MCP / login / bearer
usectx-session session start → lease; refuse closed; settle ingest when available
usectx-retrieve lease search settled evidence
usectx-code-graph hop walk callers/callees
usectx-extract extract fill the index (local or bind)

Claude Code loads .claude-plugin/plugin.json and skills/*/SKILL.md. Agent Plugins root plugin.json + mcp.json ship for the same kit.

Install flags

# Verified: clone this repo, then:
bash install.sh                  # interactive plan + confirm (project-local ./usectx)
bash install.sh --global         # home pack + ~/.local/bin + home MCP

# CDN convenience (mirrors this repo):
curl -fsSL https://op0.ai/usectx/install.sh -o install-usectx.sh
bash install-usectx.sh
curl -fsSL https://op0.ai/usectx/install.sh | bash
curl -fsSL https://op0.ai/usectx/install.sh | bash -s -- --global

Token path: ~/.op0/usectx/token. Docs: https://op0.ai/docs/usectx/

About

usectx Memory harness: stdio MCP, skills, hooks, and CLI

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages