PyRank
  • Search
  • PyPI
  • GitHub
  • Insights
  • Compare
  • Advisories
  • Ecosystem
  • About

Token Optimization Python Packages

Python packages with the GitHub topic token-optimization. Sorted by monthly downloads, with stars and forks.
headroomlabs-ai
headroom-ai

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

346K 75K 6K
jgravelle
jcodemunch-mcp

Cut AI token costs 95%+ on code exploration. The leading MCP server for precise, symbol-level GitHub code retrieval via tree-sitter AST. Works with Claude Code, Cursor & any MCP client. 313B+ tokens saved.

65K 3K 375
inth3shadows
terse-mcp

Shrinks your AI agent's tool output so it burns fewer tokens, without changing what the agent reads. Lossless by default, no decode step.

19K 1 0
abhijitbansal
cartoon

Token-optimized output for any CLI — your AI agent reads 12 lines instead of 800, raw log always archived. Adapters for pytest/jest/vitest/ruff/eslint/tsc + a compression ladder for everything else.

17K 1 0
activeing123
mcptoon

One zero-dependency CLI for every MCP server and agent skill. Token optimization, tool discovery and context compression: 71,929 -> 581 tokens (-99.2%, measured), schemas stay out of context. One config for Claude Code, Codex, Cursor, every agent. 341KB, pure Python. | 零依赖 CLI:管所有 MCP 工具与技能,工具发现省 99.2% token。

14K 218 10
blackwell-systems
gcf-python

GCF Python implementation. 100% LLM comprehension on every frontier model. 50-92% fewer tokens than JSON. 43B+ round-trips verified. Zero dependencies.

14K 5 0
jgravelle
jdocmunch-mcp

The leading, most token-efficient MCP server for documentation exploration and retrieval via structured section indexing

13K 203 47
ratel-ai
ratel-ai

Context engineering for AI agents. ~80% fewer tokens. Fix tool overload. Skills and memory with in-process BM25 and semantic retrieval. Progressive Disclosure. No vector DB.

11K 471 26
dshakes
distil-llm

Compression with a quality contract — cache-aware, causally-pruned LLM context compression for agentic runtimes, certified non-inferior across 7 domains. Works with any SDK.

10K 19 3
juyterman1000
entroly-core

Cut AI context cost without trusting the compressor. Every reduction is reversible, byte-exact recoverable, and carries an auditable receipt. Local-first, works through proxy, MCP, SDK, or agent wrapper.

10K 474 72
CorvinLabs
corvinos

Self-hosted agentic OS — a Vibe-Engineering platform for Builders. Connect Claude Code Agent to Discord, Telegram, WhatsApp, Slack & Email. EU AI Act 2026 & GDPR compliance by architecture.

10K 17 3
simpletibr
simplicio-loop

🔁 Finishes your entire backlog while you sleep. The AI orchestrator that DOES the work end-to-end on ANY LLM — discover → implement → verify → merge → 24/7 — behind safety gates, at up to 90% fewer tokens. 48 extension points. Not a chatbot. A worker.

7K 1 0
0-co
agent-friend

Find the MCP schema issues eating your context window. 156 checks. Grade A+ through F. ESLint for MCP.

7K 4 0
heuristicolab
ctxfw

High-assurance in-memory Tree-Sitter AST context firewall and pruning MCP server for coding agents (-72.4% token mass).

6K 7 1
juyterman1000
entroly

Cut AI context cost without trusting the compressor. Every reduction is reversible, byte-exact recoverable, and carries an auditable receipt. Local-first, works through proxy, MCP, SDK, or agent wrapper.

5K 474 72
13manmayarai-hash
omnicache-proxy

⚡ Zero-latency semantic caching, agent loop accelerator & cost optimization gateway for LLMs. Slash OpenAI & Anthropic bills by 40%-75%.

5K 1 0
fkiene
llmtrim

Local proxy that compresses your LLM API requests so you pay less, with no change to the answers. Trims wasted tokens from prompts, history, tool output, and code before they're sent: -31% input / -74% output, measured live. Any provider, no extra model calls. Also an MCP server and embeddable library (Rust, Python, Ruby, Kotlin, Swift, JS/TS).

5K 243 23
svasenkov
greedy-token

Route dev tasks through tool (rg/jq - rust) → python → ollama (cheap llm) → RAG before escalating to Cursor (expencive llm)

4K 4 2
knight22-21
codeprism-ai

Standalone Python package + MCP server that builds and maintains a persistent knowledge graph of any codebase, exposing precise, token-efficient context to AI coding agents.

4K 5 8
Habartru
token-save-mcp

Stop your coding agent burning context on file reads. Delegates big reads to a cheap worker model and returns only the answer — 87-99% saved, measured per call. A hook enforces it in Claude Code; the MCP tools work in any client.

4K 0 0
CarlosVallejoRuiz
slurp-graph

Token-budget-aware graph navigation for AI coding agents. Serve exactly the noodles your LLM needs. 🍜

3K 47 7
simpletibr
simplicio-mapper

🔁 Finishes your entire backlog while you sleep. The AI orchestrator that DOES the work end-to-end on ANY LLM — discover → implement → verify → merge → 24/7 — behind safety gates, at up to 90% fewer tokens. 48 extension points. Not a chatbot. A worker.

3K 1 0
jgravelle
jdatamunch-mcp

Token-efficient MCP server for tabular data retrieval. Index CSV/Excel files, query rows, aggregate — 99%+ token savings vs raw file reads.

3K 82 21
ishwar170695
context-audit

Zero-config CLI that audits coding-agent context windows — measures cache health, repeated context, and structural waste from your local Claude Code / Cursor session logs. 100% local, no telemetry.

3K 0 0
    • Original data from PyPI, GitHub, and OSV; downloads served through ClickHouse
    • Sources & methodology