codex-context-relay
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., "@codex-context-relaySelect the agreed requirements and hand off the packaged context to another agent to continue."
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.
Context Relay
Select the exact parts that matter, attach confirmed context, and continue with another agent or thread.
简体中文 · Protocol · Integration guide · Model setup
Agent conversations often contain one useful decision inside a long history. Copying the whole thread adds noise and may expose unrelated details; copying one sentence loses its source and the constraints around it. Context Relay turns selected messages and text fragments into a portable, inspectable ContextPack.
What it solves
Carry several non-adjacent messages or exact text fragments together.
Preserve speaker, source, order, stable reference IDs, and user-confirmed background.
Add a focused follow-up question without silently including the rest of the conversation.
Preview, copy, download, import, and forward the same package through a local UI, CLI, MCP tools, or an Agent Skill.
Keep offline selection and export independent from optional model assistance.
flowchart LR
A[Conversation or ContextPack] --> B[Select messages and fragments]
B --> C[Add confirmed background]
C --> D[Preview ContextPack]
D --> E[Copy or download]
D --> F[Send through a configured bridge]
E --> G[Another agent or thread]
F --> GRelated MCP server: Agent Handoff Certified MCP
Quick start
Requires Node.js 22 or later. The local selector has no production npm dependencies.
node src/cli.mjs serveOpen http://127.0.0.1:6400, then:
Import a JSON/JSONL conversation or an existing ContextPack.
Select complete messages or precise text ranges.
Add the context the receiver needs and write the next question.
Review the package, then copy or download it.
Drafts, exports, and delivery receipts stay under the project’s local .runtime/ directory. Multiple browser windows use conflict-safe drafts so one edit does not silently overwrite another.
MCP and Agent Skill
Build the portable plugin package:
node scripts/package.mjsRun node scripts/configure-plugin.mjs inside the generated package to create a local stdio MCP configuration. The package exposes tools for importing, selecting, packing, previewing, exporting, and—when an explicit bridge is configured—sending to an existing destination.
The included Skill guides an agent through the same ContextPack workflow. It does not grant access to private conversation stores or guess destination IDs.
Optional model support
Selection, packaging, validation, copying, and export work without a model. Optional answer and context suggestions support:
an OpenAI-compatible external API configured with your own endpoint and key environment variable;
a local Codex CLI profile using its normal ChatGPT sign-in and account allowance.
Model output is advisory. A delayed response cannot overwrite a package that the user has edited since the request began. See model setup.
Data model
A ContextPack separates quoted evidence from the receiver prompt:
Part | Purpose |
| Exact selected text with role, source, order, and reference ID |
| Context explicitly confirmed by the sender |
| The focused request for the receiving agent |
| Known source metadata without inventing missing information |
The schema is documented in schemas/. Unknown provenance remains unknown rather than being inferred.
Scope and privacy
Context Relay is a companion selector and transport layer; it does not modify the native message UI of Codex or other hosts.
It reads only files or host connections that the user explicitly provides and validates.
Local drafts and exports are plain files. Review a ContextPack before sharing it because selected text may contain sensitive information.
Host delivery is disabled until a concrete connection and destination are configured. Export-only mode remains available at all times.
Repository guide
web/— local selection interfacesrc/— CLI, ContextPack logic, MCP server, and model bridgeplugin/— portable plugin and Skill templatedocs/PROTOCOL.md— package and delivery contractdocs/INTEGRATION.md— host and plugin integrationexamples/— synthetic examples
Contributing
Run the deterministic test suite before opening a pull request:
npm testIssues and focused pull requests are welcome, especially around conversation import formats, provenance, accessibility, and safe handoff behavior.
Licensed under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
Retrieve citation-ready technical context and coordinate evidence-backed work between AI agents.
Shared, versioned context that humans and AI agents can publish, review, annotate, and continue.
Stop re-explaining yourself to Agents. Give it the right context, right when needed.
Verifiable agent-to-agent task handoff with signed provenance chain. Initiating agent signs the ...
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables handoff of context between AI coding agents like Claude Code, Cursor, Codex, and Windsurf with built-in provenance tracking.5,496 npmMIT
- AlicenseBqualityDmaintenanceVerifiable agent-to-agent task handoff with signed provenance chain.571 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to read each other's conversation history read-only and sanitized, so you can continue work across different tools without re-explaining context.MIT
- AlicenseAqualityDmaintenanceEnables compressing an in-progress AI conversation into a structured context block preserving user goal, decisions, and state, then formats it for another AI to continue seamlessly.427 npm2MIT