New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

context-relay

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

context-relay

MCP server for seamless AI agent session handoffs via local SQLite storage

npmnpm
Version
0.2.3
Version published
Weekly downloads
2
-75%
Maintainers
1
Weekly downloads
 
Created
Source

context-relay

MCP server that stores AI agent sessions locally in SQLite, enabling seamless handoffs between coding agents (Claude Code, Cursor, Windsurf, Codex, etc.).

Start work in one agent, save a detailed context summary, then continue in a different agent with full context.

How it works

Each agent spawns its own context-relay STDIO process. All processes read/write the same SQLite database at ~/.context-relay/sessions.db (WAL mode for safe concurrency).

Sessions are mutable — multiple agents can update the same session over time. Each save creates a new version (revision history), retrievable by session ID (latest) or specific version number.

Session IDs are human-readable: adjective-noun-xxxx (e.g., flying-coyote-xb2n).

Quick Start

npx context-relay setup

This detects your installed agents and configures them automatically:

  context-relay setup

  Select agents to configure (space to toggle, enter to confirm):

  [x] Claude Code    ~/.claude.json
  [x] Cursor         ~/.cursor/mcp.json
  [ ] Windsurf       (not detected)
  [x] Codex          ~/.codex/config.toml

Restart your agents after setup to pick up context-relay.

For agents with skill support (Claude Code, Cursor, Codex), setup also installs a managed context-relay skill so agents can call handoff workflows more reliably. If you later uncheck an agent, setup removes the MCP config and any managed context-relay skill for that agent.

Manual Configuration

If you prefer to configure agents manually:

Claude Code

Add to ~/.claude.json:

{
  "mcpServers": {
    "context-relay": {
      "command": "npx",
      "args": ["-y", "context-relay"]
    }
  }
}

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "context-relay": {
      "command": "npx",
      "args": ["-y", "context-relay"]
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "context-relay": {
      "command": "npx",
      "args": ["-y", "context-relay"]
    }
  }
}

Codex

Add to ~/.codex/config.toml:

[mcp_servers.context-relay]
command = "npx"
args = ["-y", "context-relay"]

Skills

context-relay setup installs a relaying-context skill for agents that support it. The skill teaches agents how to save detailed context summaries for handoff — it is managed automatically (installed when you select an agent, removed when you deselect).

AgentSkill pathInvoke with
Claude Code~/.claude/skills/relaying-context/SKILL.md/relaying-context
Codex~/.agents/skills/relaying-context/SKILL.md$relaying-context

Both agents also support implicit invocation — the skill triggers automatically when your request matches (e.g. "save this session for handoff").

Tools

save_session

Save or update an agent session context.

Parameters:

NameTypeRequiredDescription
idstringNoSession ID to update. Omit to create new.
titlestringYes (create)Short descriptive title
contextstringYesDetailed context summary
agentstringYesAgent identifier (e.g. "claude-code")
projectstringNoProject directory path

list_sessions

List or search saved sessions.

Parameters:

NameTypeRequiredDescription
querystringNoFull-text search query
projectstringNoFilter by project path
agentstringNoFilter by latest agent
limitnumberNoMax results (default 20)
offsetnumberNoPagination offset

get_session

Retrieve a session by ID with full context and version history.

Parameters:

NameTypeRequiredDescription
idstringYesSession ID
versionnumberNoSpecific version (default: latest)

Example Handoff Workflow

In Claude Code — finish a work session:

"Save the current session context so I can continue in Cursor."

The agent calls save_session and returns a session ID like flying-coyote-xb2n.

In Cursor — pick up where you left off:

"Load session flying-coyote-xb2n and continue the work."

The agent calls get_session and gets the full context, then continues working.

Back in Claude Code — check progress:

"List my recent sessions"

The agent calls list_sessions to show all sessions sorted by last update.

Keywords

mcp

FAQs

Package last updated on 17 Feb 2026

Related posts