Skip to main content
Glama

claw-tsaver

Un proxy MCP de ahorro de tokens para usuarios de OpenClaw. Reduce las cargas útiles de llamadas a herramientas en más de un 90% mediante expansión diferida.

Por qué

Las llamadas a herramientas MCP a menudo devuelven miles de tokens de HTML o JSON en una sola respuesta, pero el modelo normalmente utiliza solo el 5% de ellos. El 95% restante consume silenciosamente la ventana de contexto y aumenta el costo. claw-tsaver se sitúa entre OpenClaw y tus servidores MCP descendentes, intercepta las respuestas de gran tamaño y entrega al modelo una vista previa compacta + un manejador bajo demanda.

Related MCP server: TokenSaver MCP

Cómo

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

Medición real

Prueba

Tokens originales

Tokens devueltos

Ahorro

fetch Wikipedia "Tokenization (data security)"

11,507

104

99.1%

Probado en OpenClaw + Claude Sonnet 4.6 + mcp-server-fetch, 25-04-2026.
Datos brutos: benchmarks/mvp-day1-fetch.jsonl.

Inicio rápido

1. Requisitos previos

Instala uv (configuración única):

curl -LsSf https://astral.sh/uv/install.sh | sh

No se necesita instalación de claw-tsaver: uvx lo buscará y ejecutará bajo demanda.

2. Configurar servidores MCP descendentes

Edita ~/.claw-tsaver/config.json (la primera ejecución de claw-tsaver-mcp creará automáticamente una plantilla):

{
  "downstream_servers": [
    {"name": "fetch", "command": "uvx", "args": ["mcp-server-fetch"]}
  ],
  "compression_threshold_tokens": 500
}

3. Registrar con OpenClaw

Añade este bloque en el nivel superior de ~/.openclaw/openclaw.json:

"mcp": {
  "servers": {
    "claw-tsaver": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/Yang1Bai/claw-tsaver",
               "claw-tsaver-mcp"]
    }
  }
}

Luego reinicia la puerta de enlace de OpenClaw: openclaw gateway restart

Panel de control

Opcional: una interfaz web local para estadísticas de ahorro de tokens en tiempo real.

uvx --from git+https://github.com/Yang1Bai/claw-tsaver claw-tsaver-dashboard

Abre http://localhost:7878 en tu navegador.

Hoja de ruta

  • [x] Módulo A: proxy de expansión diferida (esta versión)

  • [x] Módulo D: panel de control local (esta versión)

  • [ ] Módulo B: enrutamiento de herramientas (carga automática solo de MCPs relevantes por turno)

  • [ ] Módulo C: compresión del historial de conversación (tarjetas de hechos atómicos)

Licencia

MIT — ver archivo LICENSE.

Contribución

Las incidencias y PRs son bienvenidas.

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An 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
  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that reduces AI API costs by up to 97% through token measurement, compression, caching, and pruning, all without changing prompts.
    10
    1
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    An 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.
    5
    20
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP 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.
    4
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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