Open source|MIT|v0.10.0

Keep project context portable across coding tools.

Move between supported coding agents without starting over. xtctx writes local MCP configs and managed instructions so the next agent can retrieve recent context through MCP.

Setup writes local configRaw transcripts stay localFive MCP tools
npx -y xtctx setup
bash
$ npx -y xtctx setup
xtctx setup for ~/projects/my-app
config .xtctx/config.yaml
skill .xtctx/skills/xtctx-handoff/SKILL.md
memory:codex AGENTS.md
mcp:codex .codex/config.toml
[ok] managed instructions written
[ok] mcp server registered
$ npx -y xtctx status
xtctx status
MCP command: npx -y xtctx
Local cache: indexes on MCP retrieval
Next agent: recent, detail, search, status
Raw transcripts stay the source of truth.
Process

What happens after setup

xtctx is not a dashboard or memory layer. It is project-local wiring plus MCP retrieval against transcript files your tools already write.

  1. 01

    Run setup

    xtctx writes project-level MCP config and managed instruction blocks. Antigravity MCP is always configured. Copilot CLI still requires --global-mcp.

  2. 02

    Open another tool

    The tool reads the managed instructions and can start xtctx over stdio as an MCP server.

  3. 03

    Read recent sessions

    MCP calls list sessions, open raw transcript messages, and search chronological transcript windows.

  4. 04

    Check status

    Status reports configured tools, selected skills, transcript freshness, and unsupported targets.

Features

What xtctx writes

Setup writes config, managed instructions, selected skill targets, and a rebuildable SQLite cache. Raw transcript files remain the source of truth.

Five MCP tools

Agents can list recent sessions, open session detail, search transcript windows, check continuity status, and fetch a handoff manifest.

xtctx - Visual Studio Code / Cursor
AGENTS.md
index.ts
<!-- xtctx:begin -->
# xtctx Handoff

Tool: cursor
Project root: ~/projects/my-app
Integration mode: instruction-only

## Session Retrieval
- Call xtctx_recent_sessions to list sessions.
- Call xtctx_session_detail for raw messages.
- Call xtctx_search_sessions for transcript windows.
<!-- xtctx:end -->
AI ASSISTANT / CHAT
You
Continue from the last Claude Code session.
AI Agent
I found the AGENTS.md xtctx block. I will list recent local sessions.
Calling: xtctx_recent_sessions()
- Ref: claude-code:sess_714 (today 13:42)- Messages: 18 turns | Tool: Claude Code
I found the matching session. I will open the raw messages.
Calling: xtctx_session_detail(session_ref: "claude-code:sess_714")
user: add the status smoke after the indexer testsassistant: SqliteHandoffIndex tests passeduser: keep Node 24 as the release runtime
I have the recent messages. I will start with the status smoke and keep Node 24.

Managed setup files

Setup owns generated instruction blocks, MCP config, and selected skill targets so the repo wiring is repeatable.

$ npx -y xtctx setup
updated .xtctx/config.yaml
updated .xtctx/skills/xtctx-handoff/SKILL.md
updated AGENTS.md
updated .codex/config.toml
verified MCP config

Status output

Status reports configured tools, transcript freshness, selected skills, managed blocks, and unsupported targets.

$ npx -y xtctx status
configured
mcp command npx -y xtctx
cache 12 sessions
codex instruction only
claude-code executable hook

Search stays local

Raw transcript files remain the source of truth. SQLite is a rebuildable local index for ordered lookup and fallback keyword search.

cache .xtctx/state/xtctx.db
├── sessions
├── messages
├── retrieval_windows
├── vectors
└── fts_index
Install

Run setup, then status

Start with setup in the repo. Use status to check configured tools, transcript freshness, selected skills, and drift.

Set up this repo
npx -y xtctx setup
Writes project-level MCP config, syncs selected skills, always configures Antigravity MCP, and repairs managed instruction blocks. Use --global-mcp only for Copilot CLI.
Check what is wired
npx -y xtctx status
Reports configured tools, cached transcript freshness, skill drift, managed blocks, and repair hints.
Start MCP over stdio
npx -y xtctx
Starts the MCP server for clients. In a normal terminal it prints setup and status help.

Read the README for supported tools and local transcript notes.

Try it

$ npx -y xtctx setup $ npx -y xtctx status $ npx -y xtctx --help
Review

Questions before using it in a repo

Short answers about setup, local storage, transcript limits, and what xtctx does not do.

What problem does xtctx solve?
It lets a configured AI coding tool read recent local transcript sessions from the current repo through MCP.
Does xtctx run a background service?
No. xtctx has no daemon, API server, dashboard, watcher, or web service. MCP retrieval calls update the local cache on demand.
Does xtctx sync skills?
Yes. Setup writes the built-in xtctx-handoff skill, inventories compatible skills from connected tools, and syncs selected project skills to supported targets.
Does it summarize sessions?
No. xtctx points agents to recent raw transcript messages. Those messages stay the source of truth.
What are the limits?
xtctx is local-only. Transcript formats can change upstream, semantic vectors are created lazily, and keyword fallback is expected when local vector generation is unavailable.
Can I test it without private transcripts?
Yes. The public demo smoke creates synthetic Claude Code and Codex transcript stores in a temporary project, then calls the built MCP server over stdio.
Which tools are supported?
Claude Code, Cursor, Codex, GitHub Copilot, Google Antigravity, opencode, and GitHub Copilot CLI.
Where does data live?
Project config lives in .xtctx/config.yaml. The rebuildable SQLite cache lives in .xtctx/state/xtctx.db. Source transcripts stay in each tool storage location.
Is it open source?
Yes. xtctx is MIT licensed and published at github.com/fstubner/xtctx.