session-relay-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@session-relay-mcpmake a handoff brief for my latest Codex session so I can resume"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
session-relay-mcp
Pass the baton between AI coding agents. session-relay-mcp reads the session
stores that Codex, Claude Code, Antigravity, OpenCode, Freebuff and Grok already
keep on your machine and turns them into inspectable history plus a one-call
handoff brief — no cloud service and no copy-pasting context between agents.
Why
Every harness writes its own private session format. When one agent gets stuck, the next one starts blind: what was the goal, which files changed, what failed? This MCP server answers those questions from local files, so an operator or a different agent can resume the work immediately.
Cross-harness — one interface over six local stores.
Strictly read-only — SQLite is opened
mode=rowithquery_only, JSONL and JSON are only read. Stores are fingerprinted in tests to prove nothing is written.Baton-pass brief —
handoff_contextreturns Goal, Files touched, Last observed state, Blocker and Suggested next steps as markdown.Bounded — giant Freebuff chats (hundreds of MB) are read from a capped tail; search has a byte budget.
Related MCP server: ai-r
Supported harnesses
Harness | Source | Notes |
Codex |
| Turns, messages, shell/file/MCP tool items, turn errors |
Claude Code |
| User/assistant turns, tool_use and tool_result blocks |
Antigravity |
| Planner responses, tool calls, error messages |
OpenCode |
| Sessions, messages, text/tool/patch parts |
Freebuff / Manicode |
| Chat blocks and tool calls; falls back to |
Grok |
| Prompt history and search index; Grok stores no tool events there |
Missing or empty stores return friendly empty states with warnings instead of errors.
Install
pipx install .
# or
uv tool install .
# or a plain virtual environment
python3 -m venv .venv && .venv/bin/pip install .Installing exposes the session-relay console script; python3 -m session_relay.server works without it.
MCP client setup
The server speaks MCP over stdio and needs no arguments.
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"session-relay": { "command": "session-relay", "args": [] }
}
}Codex (~/.codex/config.toml):
[mcp_servers.session-relay]
command = "session-relay"
args = []Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"session-relay": { "command": "session-relay", "args": [] }
}
}Antigravity (~/.gemini/config/mcp_config.json):
{
"mcpServers": {
"session-relay": { "command": "session-relay", "args": [] }
}
}OrquestraAI (~/.orquestra/mcps.json):
"session-relay": {
"id": "session-relay",
"name": "Session Relay (Cross-Harness)",
"description": "Read-only cross-harness session inspection and handoff briefs.",
"command": "session-relay",
"args": [],
"env": {},
"globalEnabled": true,
"enabledHarnesses": []
}Tools
Tool | Inputs | Returns |
|
|
|
|
|
|
|
| Markdown brief with goal, files, state, blocker and next steps |
|
|
|
Harness ids: codex, claude, antigravity, opencode, freebuff, grok
(aliases: claude-code, gemini, manicode, open-code, xai).
Example workflow
list_recent_sessions(limit=5)
inspect_session(harness="codex", session_id="latest", max_turns=3)
handoff_context(source_harness="codex")
search_sessions_history(query="deploy", harness="claude")Configuration
Variable | Default | Purpose |
|
| Alternate home root, useful for fixtures and tests |
No configuration is required for normal use.
Known limits
Freebuff chats over 16 MB expose only their last 12 MB; turn counts above 4 MB fall back to the chat's recorded message count.
Grok's local index contains prompts, not assistant or tool events, so its briefs are goal-focused.
Codex search scans item text in a large database; expect a few hundred milliseconds on very large histories.
Development
python3 -m venv .venv
.venv/bin/pip install -e . pytest
.venv/bin/python -m pytest tests/ -q
bash scripts/check-file-size.shLicense
MIT — see LICENSE.
Available Tools
4 toolshandoff_contextC
Generate an executive handoff brief (goal, files, blocker, next steps) for a session.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No | latest | |
| source_harness | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
inspect_sessionC
Read a session's ordered conversation and tool events. session_id defaults to the newest one.
| Name | Required | Description | Default |
|---|---|---|---|
| harness | Yes | ||
| max_turns | No | ||
| session_id | No | latest |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
list_recent_sessionsA
List recent sessions across harnesses (codex, claude, antigravity, opencode, freebuff), newest first.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| harness | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
search_sessions_historyC
Keyword search across session message texts in one or every harness.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| harness | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
handoff_context - First observed
inspect_session - First observed
list_recent_sessions - First observed
search_sessions_history
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: listing sessions, inspecting a single session in detail, generating a handoff brief, and searching message text. The boundaries are sharp; an agent can easily pick the right tool for each task.
All names use snake_case with a verb-first pattern (list_recent_sessions, inspect_session, handoff_context, search_sessions_history). Minor deviations like the adjective in list_recent_sessions and the compound object in search_sessions_history are readable but not perfectly uniform.
Four tools is a reasonable, focused set for a session relay/inspection server. Each tool earns its place, though the surface is slightly lean for covering five harnesses and multiple session operations.
Core read-and-summarize workflows are covered: listing, deep inspection, keyword search, and handoff brief generation. Minor gaps exist, such as no tool to actually relay/export a session or fetch lightweight metadata, but agents can work around these.
Related MCP Connectors
One searchable history across every AI coding tool, with secret scanning and a shared task board.
Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.
Your AI apps as one team: hand work to Codex or Claude Code on your Mac, with a shared logbook.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Related MCP Servers
- AlicenseAqualityDmaintenanceSearches and browses local Claude Code and Cowork session histories stored on your machine, enabling questions about past work without uploading data.32MIT
- AlicenseAqualityBmaintenanceProvides a read-only interface to audit and continue coding agent sessions by extracting plans, intents, and edit authorship from history across multiple agents (Claude, Codex, OpenCode, Antigravity, Pi) via MCP, CLI, and Python SDK.1830 PyPI3MIT
- AlicenseAqualityCmaintenanceSearch past OpenCode conversation history before starting new work on a module or file, via a local read-only FTS5 index built from OpenCode's own SQLite database. No network calls, fully local. 7 tools for keyword search, file lookup, and session browsing.743 PyPI4MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search and retrieve past coding-tool conversations across Claude Code, Claude Desktop, Codex, and Cursor through a local, read-only index.2MIT