fast-jev-compaction
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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-token-optimizer
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
Compress prose for LLM context windows. Per-call USDC billing, signed receipt.
Compress coding-agent context ~64%. Hosted Neural Keep MCP for Cursor/Claude/Codex.
Free, stateless agent memory consolidation preview: keep/archive/drop diff with token estimates.
Compaction witness for agents: pin invariants, name dropped spans, re-inject verbatim or HALT.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides deterministic context compaction and safety gating for AI agents, preserving original messages verbatim while dropping irrelevant ones and flagging destructive commands.2MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to cut token usage by locally pruning, encoding, and summarizing MCP tool responses, with lossless recovery of original data when needed.455 npm1Apache 2.0
- FlicenseNot gradedqualityBmaintenanceEnables MCP-compatible clients and autonomous agents to dynamically compress long-horizon context by pruning verbose tool outputs, HTML boilerplate, and semantic redundancy by 40-70%. It reduces token burn and latency through deterministic, zero-dependency processing.7-
- AlicenseNot gradedqualityBmaintenanceEnables agents to deterministically shrink multi-turn conversation history and prompts by stripping verbose boilerplate and filler tokens while preserving critical tool parameters and named entities. This lets users cut inference costs by roughly 40-60% without losing essential context, running either as a native MCP server over JSON-RPC stdio or as an importable zero-dependency Python module.7MIT