Skip to content
PyRank
  • Search
  • PyPI
  • GitHub
  • Insights
  • Compare
  • Advisories
  • Ecosystem
  • About

Context Window Python Packages

Python packages with the GitHub topic context-window. 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.

418K 81K 6K
jgravelle
jcodemunch-mcp

Symbol-level code retrieval for AI agents: fetch the function you need, not the whole file. Runs locally. 96.2% fewer tokens per lookup on average than grep-and-read on our 15-lookup benchmark. Works with Claude Code, Cursor, Codex and any MCP client. Free for non-commercial use; commercial use needs a one-time license.

158K 3K 378
tokensafe-dev
tokensafe

Your AI agent is smart enough to code all day. Now it actually can. Local runtime firewall & zero-loss context optimizer for AI coding agents.

65K 47 3
toprakahmetaydogmus
tzero-mcp

Deterministic AST Context Compressor & MCP Server for Cursor, Claude & Local LLMs. Cuts prompt tokens by 85–95% with 100% Zero-Leak security.

12K 125 5
KonstantinStarovoytov
kitden

See the MCP servers, plugins and skills Claude Code, Codex and Cursor load, and which skills got cut

10K 1 5
juyterman1000
entroly-core

Local-first AI efficiency layer for coding agents and LLM apps. Budget and recover context, verify outputs against source, and resume work across agents.

10K 489 75
lastreload
mnemonic-proxy

Context management proxy for AI coding agents: verbatim archive, on-demand recall, and saved engine state on supported backends.

10K 82 7
activeing123
mcptoon

One zero-dependency MCP gateway CLI for every 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. 561KB, pure Python. | 零依赖 CLI:管所有 MCP 工具与技能,工具发现省 99.2% token。

10K 446 26
cocoindex-io
cocoindex-code

A super light-weight embedded code search engine CLI (AST based) that just works - improves speed and efficiency for coding agent 🌟 Star if you like it!

8K 3K 257
nikolay-e
diffctx

Smart git diff context for LLMs and AI agents: budgeted fragment selection, deterministic, MCP server included

6K 7 2
juyterman1000
entroly

Local-first AI efficiency layer for coding agents and LLM apps. Budget and recover context, verify outputs against source, and resume work across agents.

6K 489 75
Stxyu-p
trimtok

Cut token usage in Claude Code, Cursor, Codex & Gemini: deterministic in-process context compression for AI coding agents. Lossless and retrievable (#ref), AST code skeletons, TOON JSON tables, stdio MCP. No LLM, no network, MIT.

5K 2 0
akadeepesh
contextzip

Use free ChatGPT, Claude or Gemini on your whole codebase. Send the right files as a ZIP, get the changes written back. No paid plan, no agent, no API key.

4K 33 2
LuminariSoftwares
tool-guardian

Too many MCP servers eating your context? tool-guardian sits in front of all of them and loads each tool's schema only when it's needed. A 7-server setup went from 20,005 tokens to 1,084. Works with any MCP client.

4K 2 0
KijitoAI
kijito-tools

Run Claude Code sessions that know their own context and can run themselves: real context self-check, armed-pane auto-catch-up, and a safe self-clear loop. Kijito-backed, works standalone.

3K 0 0
LuminariSoftwares
context-guardian

40 turns: 1,130,722 tokens upstream -> 161,141. A fail-open compaction proxy for local OpenAI-compatible models.

3K 2 0
whiskybeer
toolrecall

High-performance local SQLite FTS5-based tool output cache and MCP multiplexer for AI agents.

3K 6 0
heuristicolab
ctxfw

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

3K 8 1
mkorpela
kopipasta

`cat project | LLM | patch`. Transparent context control and interactive patching for terminal-centric LLM workflows.

3K 16 1
YauhenBichel
context-handoff

Claude Code plugin: meter what each turn costs, write a handoff note, resume cheaply after /clear

2K 0 0
tokenpak
tokenpak

Local proxy for coding agents that records each request and shows how far the session can go: measured usage, estimated cost, burn and runway.

2K 1 0
Perseus-Computing-LLC
harpe

Deterministic context synthesis and token budgeting for cognitive AI agents.

2K 3 1
MalgTruevero
bocconcini

Small bites for small context windows. Zero-dependency Python LLM client for llama.cpp / KoboldCpp / Ollama: safe text/Python/JSON chunking, token budgets, measured cognitive window, tree retrieval on disk. Born on Android/Termux.

2K 0 0
lucasmartins-ai
local-context-compiler

Compact coding-agent context without summarizing it away. Verbatim, offline, with a receipt and recall for every cut. CLI, MCP server, Claude Code plugin. MIT.

2K 20 6
    • Original data from PyPI, GitHub, and OSV; downloads served through ClickHouse
    • Sources & methodology