claw-tsaver
A token-saving MCP proxy for OpenClaw users. Cuts tool call payloads by 90%+ via lazy expansion.
Why
MCP tool calls often return thousands of tokens of HTML or JSON in a single response — but the model typically uses only 5% of it. The remaining 95% silently burns context window and increases cost. claw-tsaver sits between OpenClaw and your downstream MCP servers, intercepts oversized responses, and hands the model a compact preview + an on-demand handle instead.
How
sequenceDiagram
participant U as OpenClaw (Claude)
participant C as claw-tsaver proxy
participant F as fetch / puppeteer / etc.
U->>C: call_tool("fetch", url)
C->>F: forward call
F-->>C: 11,507 tokens of HTML
Note over C: tiktoken count > threshold
C->>C: store full content in SQLite
C-->>U: {preview_head, preview_tail, expand_handle}<br/>(only 104 tokens)
Note over U: model decides if it needs full text
U->>C: expand_content(handle)
C-->>U: full 11,507 tokens





