claw-tsaver
claw-tsaver
Ein Token-sparender MCP-Proxy für OpenClaw-Benutzer. Reduziert Tool-Call-Payloads um über 90 % durch Lazy Expansion.
Warum
MCP-Tool-Aufrufe geben oft Tausende von Token an HTML oder JSON in einer einzigen Antwort zurück – das Modell nutzt jedoch typischerweise nur 5 % davon. Die restlichen 95 % verbrauchen stillschweigend das Kontextfenster und erhöhen die Kosten. claw-tsaver sitzt zwischen OpenClaw und Ihren nachgelagerten MCP-Servern, fängt übergroße Antworten ab und übergibt dem Modell stattdessen eine kompakte Vorschau sowie ein Handle für den Abruf bei Bedarf.
Related MCP server: TokenSaver MCP
Wie
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 tokensEchte Messung
Test | Ursprüngliche Token | Zurückgegebene Token | Ersparnis |
fetch Wikipedia "Tokenization (data security)" | 11.507 | 104 | 99,1 % |
Getestet mit OpenClaw + Claude Sonnet 4.6 + mcp-server-fetch, 25.04.2026.
Rohdaten: benchmarks/mvp-day1-fetch.jsonl.
Schnellstart
1. Voraussetzungen
Installieren Sie uv (einmalige Einrichtung):
curl -LsSf https://astral.sh/uv/install.sh | shEs ist keine Installation von claw-tsaver erforderlich – uvx lädt und führt es bei Bedarf aus.
2. Nachgelagerte MCP-Server konfigurieren
Bearbeiten Sie ~/.claw-tsaver/config.json (der erste Start von claw-tsaver-mcp erstellt automatisch eine Vorlage):
{
"downstream_servers": [
{"name": "fetch", "command": "uvx", "args": ["mcp-server-fetch"]}
],
"compression_threshold_tokens": 500
}3. Bei OpenClaw registrieren
Fügen Sie diesen Block auf der obersten Ebene von ~/.openclaw/openclaw.json hinzu:
"mcp": {
"servers": {
"claw-tsaver": {
"command": "uvx",
"args": ["--from", "git+https://github.com/Yang1Bai/claw-tsaver",
"claw-tsaver-mcp"]
}
}
}Starten Sie dann das OpenClaw-Gateway neu: openclaw gateway restart
Dashboard
Optional: eine lokale Web-Benutzeroberfläche für Statistiken zu den Token-Einsparungen in Echtzeit.
uvx --from git+https://github.com/Yang1Bai/claw-tsaver claw-tsaver-dashboardÖffnen Sie http://localhost:7878 in Ihrem Browser.
Roadmap
[x] Modul A: Lazy-Expansion-Proxy (dieses Release)
[x] Modul D: Lokales Dashboard (dieses Release)
[ ] Modul B: Tool-Routing (automatisches Laden nur relevanter MCPs pro Turn)
[ ] Modul C: Komprimierung des Konversationsverlaufs (atomare Faktenkarten)
Lizenz
MIT – siehe LICENSE-Datei.
Mitwirken
Issues und PRs sind willkommen.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that helps AI agents reduce token usage by converting data to TOON format and stripping comments and unnecessary whitespace from code files.MIT
- AlicenseAqualityCmaintenanceAn MCP server that reduces AI API costs by up to 97% through token measurement, compression, caching, and pruning, all without changing prompts.101Apache 2.0
- AlicenseAqualityAmaintenanceAn MCP server that intelligently filters and compresses tool outputs to reduce context window usage, saving up to 90% of tokens by removing noise such as passing tests and redundant information.520MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that reduces AI agent token usage by up to 90% through intelligent context compression. Enables efficient code exploration, multi-file refactoring, and debugging by providing tools for smart reading, searching, and managing code context.4MIT
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
An MCP server that integrates with Discord to provide AI-powered features.
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Yang1Bai/claw-tsaver'
If you have feedback or need assistance with the MCP directory API, please join our Discord server