# Yang1Bai/claw-tsaver [Health: Active]

**Category:** 🔒 Delivery  
**Repository:** https://github.com/Yang1Bai/claw-tsaver  
**GitHub Stars:** 1  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/yang1bai-claw-tsaver

## Description
Token-saving MCP proxy that intercepts oversized tool returns and replaces them with a preview + on-demand handle. Real benchmark: 11,507 tokens → 104 tokens (99.1% saved) on a Wikipedia fetch. Works with OpenClaw + Claude.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "claw-tsaver": {
    "command": "uvx",
    "args": ["--from"]
  }
}
```

## Documentation

## What Yang1Bai/claw-tsaver MCP server does

Yang1Bai/claw-tsaver MCP server is a local MCP proxy for OpenClaw setups. It sits between the client and downstream MCP servers such as fetch-based tools, forwards tool calls, and examines the returned content. Responses above the configured size threshold are stored locally instead of being sent to the model in full.

For an oversized response, the proxy returns a compact result containing a beginning preview, an ending preview, and a handle for later expansion. The model can call `expand_content` with that handle to retrieve the stored content. Responses below the threshold are not described as being compressed or rewritten.

The project is intended to reduce context usage from large HTML or JSON results. Its documented benchmark reduced a Wikipedia fetch from 11,507 original tokens to 104 returned tokens, or 99.1 percent saved. That measurement was made with OpenClaw, Claude Sonnet 4.6, and `mcp-server-fetch`.

## How it works

Yang1Bai/claw-tsaver MCP server receives a tool call from OpenClaw and forwards it to the configured downstream server. It counts the returned content with a token-counting step and compares the result with `compression_threshold_tokens`. When the threshold is exceeded, the complete response is written to a local SQLite database. Only the preview fields and expansion handle are returned to the client.

A later `expand_content` call uses the handle to return the full stored response. This lazy-expansion flow lets the model decide whether the complete payload is necessary rather than automatically placing it in the conversation context.

## Setup and configuration

The documented setup uses `uv`. The first run of `claw-tsaver-mcp` creates a configuration template under `~/.claw-tsaver/config.json`. The configuration contains a `downstream_servers` list, where each entry defines a name, command, and argument list for a downstream MCP server. It also accepts `compression_threshold_tokens`; the example sets this value to 500.

OpenClaw registers the proxy as an MCP server with `uvx --from git+https://github.com/Yang1Bai/claw-tsaver claw-tsaver-mcp`. After adding the entry to `~/.openclaw/openclaw.json`, the README instructs users to restart the OpenClaw gateway.

An optional local dashboard can be started with `uvx --from git+https://github.com/Yang1Bai/claw-tsaver claw-tsaver-dashboard`. The dashboard is available at `http://localhost:7878` and displays token-saving statistics.

## Tools and capabilities

Yang1Bai/claw-tsaver MCP server provides the proxy behavior and the documented `expand_content` operation. Its capabilities include:

- Forwarding calls to configured downstream MCP servers.
- Detecting responses above a token threshold.
- Saving full oversized responses in local SQLite storage.
- Returning head and tail previews with expansion handles.
- Expanding stored content on demand.
- Showing local token-saving statistics through the optional dashboard.

## Limitations and notes

The current release covers lazy expansion and the local dashboard. Tool routing and conversation-history compression are listed as roadmap items, so they should not be treated as available features. The README documents OpenClaw integration and a Claude-based benchmark, but does not establish compatibility with every MCP client.

The proxy does not eliminate the cost of retrieving the full result: calling `expand_content` returns the complete stored content. Its main benefit applies when the model can work from the preview and does not need expansion. The provided material does not specify retention, cleanup, encryption, or remote storage behavior for the SQLite database.

_Full upstream README: https://allmcps.com/mcp/yang1bai-claw-tsaver/readme_

