fast-jev-compaction
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., "@fast-jev-compactioncompact this conversation transcript, preserving retained messages exactly"
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.
Fast Jev Compaction for Agent Hosts
This repository adapts fast-jev-compaction as a portable Agent plugin. It exposes the same MCP server to Agent hosts and keeps a .codex-plugin/ compatibility manifest for Codex.
It exposes an on-demand MCP tool, compact_transcript, that uses TypeSafe Jev to decide which tool calls and tool results can be removed or truncated while keeping retained transcript content verbatim. It does not replace a host's internal automatic compaction.
Install as an Agent plugin
npm install
npm run typecheck
npm test
npm run buildThe portable entrypoint is plugin.json with mcp.json and skills/. Codex can also load .codex-plugin/plugin.json with .mcp.json. The two MCP files are intentionally identical so either loader gets the same server configuration.
Set TYPESAFE_API_KEY before using the MCP tool. The supplied transcript's compaction state is sent to https://api.typesafe.ai/v1/systemone by default. Set TYPESAFE_BASE_URL to use a compatible endpoint. Do not send secrets or private transcripts without checking the data boundary.
Related MCP server: mcp-context-guard
Agent-neutral transcript contract
compact_transcript accepts a messages array. The canonical shape is:
{
"role": "assistant",
"text": "",
"toolUses": [{"tool_use_id": "call-1", "tool": "Read", "input": {"path": "README.md"}}],
"toolResults": []
}The MCP adapter also accepts common content, tool_calls, toolCalls, tool_results, and tool_call_id aliases from Agent hosts. Tool-role messages are normalized to the internal result representation; no tool from the supplied transcript is executed.
Options accepted by compact_transcript include:
messages: transcript messages withrole,text,toolUses, and optionaltoolResults;options: optional thresholds and token budgets from the original library;model: optional per-call model override; the MCP server readsTYPESAFE_API_KEYfrom its environment.
The result contains the compacted messages, per-call decisions, and stats.
Development
npm run typecheck
npm test
npm run build
npm run validate:pluginThe original MIT license and core compaction implementation are retained. Claude Code-specific hooks are intentionally not part of this portable Agent plugin.
This server cannot be deployed
Maintenance
Related MCP Connectors
Same functionality, consuming only 1/20 of the context window tokens.
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
Deterministic decision layer for autonomous agents: reproducible PROCEED/REVIEW/SKIP verdicts.
Deterministic AI agent microtools, no accounts/API keys. fetch_extract: 98% token cut. 38 tools.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceCompresses, deduplicates, and filters tool outputs to optimize token usage and context window for AI agents.MIT
- AlicenseNot gradedqualityCmaintenanceCompresses tool outputs, manages token budgets, deduplicates content, and filters by relevance to optimize context window usage for AI agents.MIT
- AlicenseAqualityAmaintenanceEnables Codex agents in VS Code to compact accumulated conversation context at checkpoints while preserving a verified written handoff, and to automatically continue the authorized task once after compaction.41MIT
- FlicenseNot gradedqualityBmaintenanceEnables agents to analyze their session context usage and surgically remove heavy or unnecessary events from their history, preserving coherent transcripts and freeing token budget without restarting.-