TokenSaver MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ANTHROPIC_API_KEY | No | Optional API key for higher quality abstractive compression using Claude Haiku. Not required for core functionality. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| count_tokensA | Estimate token count for text or a message list before sending to an API. Use this to decide whether to compress, prune, or skip content. |
| compress_contextA | Compress long text or conversation history into a dense summary. Use before re-injecting large context on repeated turns. Extractive mode (default): offline, free, uses LSA sentence ranking. Abstractive mode: higher quality but requires ANTHROPIC_API_KEY env var. |
| cache_storeA | Store a tool result in the persistent cache with a TTL. Prevents re-running the same expensive operation twice. Recommended: set key = make_cache_key(tool_name, args). |
| cache_getA | Retrieve a cached result. If hit, skip re-running the original tool. |
| cache_invalidateA | Remove a stale cache entry (e.g. after file changes). |
| extract_webpageA | Fetch a webpage and return only its main readable content — no HTML, scripts, navigation, ads, or cookie banners. Saves 85–95% of tokens vs raw HTML. |
| summarize_fileB | Summarize a file or directory without reading every byte. Agents get full structural understanding in ~500 tokens instead of 50,000+. |
| prune_conversationC | Reduce conversation history token footprint by removing filler turns and compressing older verbose ones. Saves 60–80% on long conversations. |
| optimize_promptA | Shorten a verbose or redundant prompt/system prompt while preserving intent. Typical savings: 30–65%. Run once on system prompts that accumulate over iterations. |
| advise_context_windowA | Analyze current token usage vs model context window and recommend what to trim. Use this meta-tool to know WHERE to apply compress_context, prune_conversation, or other tokensaver tools for maximum effect. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Each tool targets a clearly distinct purpose: advising, caching, compressing, counting, extracting, optimizing, pruning, and summarizing. No two tools overlap in functionality, reducing the chance of misselection.
Most tools follow a verb_noun pattern (e.g., compress_context, count_tokens), but the cache tools use noun_verb (cache_get, cache_invalidate). This minor inconsistency prevents a perfect score.
With 10 tools, the server is well-scoped for token management. Each tool covers a necessary aspect (analysis, caching, compression, extraction, counting, optimization, pruning, summarization) without redundancy or bloat.
The tool surface covers the core lifecycle: analyze usage, apply various compressions, cache results, and count tokens. A minor gap is the lack of an automatic application tool that acts on advisement, but the exist set is sufficient for most workflows.