MCP Slim Guard

Read less up front. Keep the detail within reach.

Tool results can be long even when the next step needs only part of them. MCP Slim Guard returns compact results while keeping the full content in recoverable snapshots.

In this article

A short result and a full record from the same call.

A reader examines one panel of a continuous manuscript unfolding from a document case.

A thousand records, a compact first view.

A test script generated these records to check compact delivery and exact recovery. The excerpts below show the original JSON and the table content actually delivered.

Original JSON

[
  {
    "id": 0,
    "state": "open",
    "owner": "team-0"
  },
  {
    "id": 1,
    "state": "closed",
    "owner": "team-1"
  }
]

The full result has 1,000 records. The first two are excerpted and formatted here.

Compact view

idstateowner
0"open""team-0"
1"closed""team-1"

Field names appear once. The actual view shows 57 records, with 943 available through read_result. The first two are excerpted here.

Inspect the original record with id 500

This record is absent from the initial view. The test capture reports finding it with one read_result call. It is reproduced below from the original fixture data.

{
  "id": 500,
  "state": "open",
  "owner": "NEEDLE:uniform-json"
}

A separate full-recovery check took two reads and matched the original content exactly.

Deterministic test · 26 July 2026Download the capture excerptView the fixture definition

How it works

For workflows with large MCP responses

One call, a complete result

Run one authorized upstream tool call.

Deliver a compact view

Shorten eligible large results and include a recovery reference.

Into the agent’s context

Read the view and continue the task.

Save the original snapshot

Keep the complete result from that same call.

Retrieve detail when needed

read_result uses the recovery reference to read the snapshot.

Both paths start from the same call. Recovery reads the saved snapshot without running the upstream tool again. Other, ineligible results retain their upstream delivery format.

One call. Exact recovery.

The frozen standard benchmark covers 12 deterministic tools and 24 bilingual tasks, using o200k_base to count the MCP delivery path.

Normal-path tokens
71,388 → 17,007
Deterministic tasks completed
24/24
Upstream calls
24

A separate synthetic stress test with 100 tools and an 8,000-row result reached an upper bound of 99.7%.

Read the benchmark summary

Installation and support

Documented version: 0.1.1-alpha.1

GitHub hosts the open-source Alpha v0.1.1-alpha.1, with installation, host boundaries, benchmark methodology, and source.

Codex is supported with Native preferred and Generic fallback, while Claude Code is supported on the Generic surface. VS Code remains preview support, and OpenCode is planned after Alpha.

Install guide on GitHub

Common questions

What is MCP Slim Guard?

MCP Slim Guard is a reversible MCP result-delivery runtime. The current Alpha reduces Generic tool catalogs and eligible oversized result context on both Generic and Native surfaces.

Which MCP content does it reduce?

It reduces the authorized Generic tool catalog and compacts eligible long text, uniform JSON, and log-like results. Other results keep the upstream delivery format.

Does recovery call the upstream tool again?

Slim Guard stores one immutable snapshot, and read_result reads it directly. The upstream call count stays at one before and after recovery.

Which hosts does the current Alpha support?

Codex is supported with Native preferred and Generic fallback, while Claude Code is supported on the Generic surface. VS Code remains preview support, and OpenCode is planned after Alpha.

Is it a general-purpose security gateway?

MCP Slim Guard focuses on reversible result delivery. Authorization, exact routing, and audit behavior serve that delivery path.

Install guide on GitHub

Keep reading

MCP Slim Guard Alpha: 76% Fewer MCP Tokens with Exact Recovery

View the source

Back to the project story