BotBeat
...
← Back

> ▌

AnthropicAnthropic
OPEN SOURCEAnthropic2026-02-28

Open-Source MCP Server Cuts Claude Code Context Consumption by 98%

Key Takeaways

  • ▸Context Mode reduces Claude Code's MCP tool output from 315 KB to 5.4 KB (98% reduction), extending productive session time from 30 minutes to 3 hours
  • ▸The system uses isolated subprocess sandboxes with ten language runtimes and a SQLite FTS5 knowledge base with BM25 ranking for efficient data processing
  • ▸Real-world validations show dramatic reductions: Playwright snapshots drop from 56 KB to 299 bytes, and GitHub issues from 59 KB to 1.1 KB
Source:
Hacker Newshttps://mksg.lu/blog/context-mode↗

Summary

Developer Mert Köseoğlu has released Context Mode, an open-source MCP (Model Context Protocol) server that dramatically reduces context window consumption in Anthropic's Claude Code by 98%. The tool addresses a critical efficiency problem where MCP tool calls dump raw data directly into Claude's 200K token context window, causing sessions to degrade after just 30 minutes. A single Playwright snapshot typically consumes 56 KB, while twenty GitHub issues take 59 KB—quickly exhausting available context.

Context Mode works by sitting between Claude Code and tool outputs, processing data through an isolated sandbox environment that executes code in ten different language runtimes and returns only essential stdout to the conversation context. The system also includes a knowledge base feature using SQLite FTS5 with BM25 ranking for efficient document search and retrieval. In validated real-world scenarios, the tool reduced a Playwright snapshot from 56 KB to 299 bytes, GitHub issues from 59 KB to 1.1 KB, and overall session output from 315 KB to just 5.4 KB.

The solution extends session viability from approximately 30 minutes to 3 hours, with context window utilization remaining at 99% after 45 minutes compared to 60% without the tool. Context Mode is available via Claude Code's plugin marketplace or as a standalone MCP server, and includes automatic routing hooks that integrate seamlessly into existing workflows. The project is released under MIT license and complements Cloudflare's recent Code Mode work, which compressed tool definitions—Context Mode addresses the opposite direction by compressing tool outputs.

  • The open-source tool (MIT license) integrates automatically through Claude Code's plugin marketplace and complements Cloudflare's tool definition compression work

Editorial Opinion

Context Mode represents an elegant solution to a structural problem in AI agent tooling—the asymmetric explosion of context consumption from tool outputs versus inputs. While Cloudflare's Code Mode addressed definition compression, this tackles the equally critical output side, validating that 98% of typical tool output is disposable noise. The impressive benchmark results and seamless integration suggest this could become standard infrastructure for production Claude Code deployments, though it raises interesting questions about what other critical information might be lost in aggressive compression.

Large Language Models (LLMs)AI AgentsMLOps & InfrastructureOpen Source

More from Anthropic

AnthropicAnthropic
POLICY & REGULATION

Anthropic Explores AI's Role in Autonomous Weapons Policy with Pentagon Discussion

2026-04-05
AnthropicAnthropic
POLICY & REGULATION

Security Researcher Exposes Critical Infrastructure After Following Claude's Configuration Advice Without Authentication

2026-04-05
AnthropicAnthropic
POLICY & REGULATION

Anthropic's Claude Code Stores Unencrypted Session Data and Secrets in Plain Text

2026-04-04

Comments

Suggested

OracleOracle
POLICY & REGULATION

AI Agents Promise to 'Run the Business'—But Who's Liable When Things Go Wrong?

2026-04-05
Google / AlphabetGoogle / Alphabet
RESEARCH

Deep Dive: Optimizing Sharded Matrix Multiplication on TPU with Pallas

2026-04-05
AnthropicAnthropic
POLICY & REGULATION

Anthropic Explores AI's Role in Autonomous Weapons Policy with Pentagon Discussion

2026-04-05
← Back to news
© 2026 BotBeat
AboutPrivacy PolicyTerms of ServiceContact Us