⚡ OmniCache
Cut your Claude Code & Cursor API bills by 40%–70%.
Stop burning tokens and hitting rate limits re-reading unchanged files. Replay agent tool calls, file reads, and repeated prompts on localhost in <0.1ms for $0.00.
# ⚡ 10-Second Quickstart (Zero Configuration Needed)
pip install omnicache-proxy
omnicache run claude
| 💡 The Problem & Fix | 🚀 Quick Start | 🔌 MCP Server | 📐 Architecture | ⚡ Benchmarks | 🤖 Agent Presets | 🛠️ CLI Tools |
💡 Why OmniCache?
When autonomous coding agents (Claude Code, Cursor, Aider, Cline) work on your codebase, up to 60%–80% of your token burn and latency goes into repetitive disk and file reads:
- Re-reading
package.json,tsconfig.json, directory trees, and lint rules on every single turn. - Running test suites, git diffs, or bash inspection commands where the underlying code has not changed.
- Paying frontier cloud input prices ($3–$15 per million tokens) and waiting 1,200ms–2,500ms per roundtrip for identical content.
┌────────────────────────┬────────────────────────┬────────────────────────┬────────────────────────┐
│ < 0.1 ms │ $0.00 │ 100% │ 100% │
│ Tool Replay Latency │ Cost on Repeat Reads │ Token Savings on Hits │ Localhost Air-Gapped │
└────────────────────────┴────────────────────────┴────────────────────────┴────────────────────────┘
The Difference:
| Scenario | Without OmniCache | With OmniCache Sidecar |
|---|---|---|
| Re-reading unchanged files & directory trees | 1,200ms–2,500ms cloud lag + full token cost | <0.1ms local replay + $0.00 token cost |
| Running test suites on unchanged code | Burns 5k–20k input tokens on repeat | 0 tokens burned (served from SQLite WAL memory) |
| Anthropic & OpenAI Rate Limits | Frequent 429 Rate Limit interruptions |
Vastly reduced (cached turns never touch the cloud) |
| Workspace File Edits | Risk of stale or hallucinated context | Instant invalidation (SHA-256 Git & mtime tracking) |
| Data Privacy | Code sent across the wire on every turn | 100% Localhost with HMAC-SHA256 PII redaction |
How it works: OmniCache sits transparently on 127.0.0.1:8000. It cryptographically fingerprints your local Git tree and workspace file modification times (mtime). If the files haven't changed, the agent receives the exact tool output or cached completion from local SQLite WAL memory in under 0.1ms without touching the internet. The second you edit a file or git commit, affected cache entries are instantly evicted.
📐 Architecture
flowchart TD
subgraph Client["Developer Coding Workspace"]
Agent["🤖 AI Coding Agent<br/>(Claude Code / Cursor / Cline / Aider)"]
end
subgraph Sidecar["⚡ OmniCache Local Engine (127.0.0.1:8000)"]
Router["Transparent Interceptor<br/>(Protocol Translator)"]
subgraph MemoryFabric["Deterministic Memory Subsystems"]
GitCheck{"Git Working Tree<br/>Changed?"}
L1["L1 Exact Trie Cache<br/>(0.06ms Lookup)"]
L2["L2 Quantized Vector Cache<br/>(Int8 SIMD Cosine Match)"]
ToolStore[("SQLite WAL Store<br/>Tool & File Signatures")]
Compactor["Context Compaction<br/>(Head/Tail Pruning)"]
end
end
subgraph Cloud["Remote Cloud Providers (Only on Cache Miss)"]
Upstream["Anthropic / OpenAI / Gemini<br/>(1,000ms - 2,500ms Turn)"]
end
Agent -->|"ANTHROPIC_BASE_URL<br/>OPENAI_BASE_URL"| Router
Router --> GitCheck
GitCheck -->|"Unchanged (Hit)"| ToolStore
GitCheck -->|"Prompt Re-evaluation"| L1
L1 -->|"Exact Match"| ToolStore
L1 -->|"Fuzzy Match"| L2
ToolStore -->|"Replay in <0.1ms ($0.00)"| Agent
L2 -->|"Cache Miss"| Compactor
Compactor -->|"Pruned Prompt"| Upstream
Upstream -->|"Record to SQLite WAL"| ToolStore
ToolStore -->|"Streaming Response"| Agent
💡 Why OmniCache vs. Native Provider Caching?
Anthropic and OpenAI offer server-side prompt caching, which discounts prefix tokens in the cloud. However, native cloud caching leaves four critical developer gaps unaddressed:
| Capability | Native Cloud Provider Caching | OmniCache Local Sidecar |
|---|---|---|
| Tool Execution Roundtrips | ❌ Runs on disk & calls cloud every turn | ✅ <0.1ms deterministic SQLite replay |
| Completion Output Token Cost | ❌ 100% full price ($10–$15 per 1M tokens) | ✅ 100% free ($0.00) on cached turns |
| Cache Lifetime | ❌ Ephemeral (evicts after 5–10 min idle) | ✅ Persistent across sessions (SQLite WAL / Redis) |
| Git Working-Tree Awareness | ❌ Zero (no concept of git commits or mtimes) | ✅ Deep (SHA-256 tree validation + instant edit purge) |
| Multi-Turn Context Growth | ❌ Unbounded (context expands every turn) | ✅ Adaptive Compaction (prunes intermediate tool dumps) |
| Team & Cross-Agent Sharing | ❌ Isolated to a single API connection | ✅ Shared memory bus & CRDT P2P edge mesh |
| Offline Air-Gapped Speed | ❌ Requires active internet connection | ✅ Runs 100% locally on 127.0.0.1:8000 |
🚀 60-Second Quickstart
1. Install via PyPI
pip install omnicache-proxy
2. Verify Your Environment
omnicache doctor
3. Launch Your Coding Agent (Zero Configuration Changes)
Use the run execution wrapper. It automatically launches the background sidecar, exports loopback environment variables (ANTHROPIC_BASE_URL, OPENAI_BASE_URL, LLM_BASE_URL), and displays a session savings summary when you finish:
# Claude Code:
omnicache run claude
# Cursor IDE:
omnicache run cursor .
# Custom Python agent scripts or runners:
omnicache run -- python my_agent.py
When your session exits, OmniCache renders your verified telemetry ledger:
╭──────────────────────────────────────────────────╮
│ ⚡ OmniCache Session Telemetry │
│ - Tokens Saved: 18,450 tokens │
│ - Avoided Cost: $0.0554 USD │
│ - Tool Replays: 14 cached tool calls │
╰──────────────────────────────────────────────────╯
⚡ Verified Performance Benchmarks
Measured on standard commodity ARM/x86 hardware running Python 3.10–3.14:
==================================================================================================
Subsystem Est. Upstream Turn OmniCache Replay Speedup Benefit
==================================================================================================
L1 Exact Request Cache ~450.00 ms (Est.) 0.0609 ms 7,390x 100% Token Savings
L2 FastHash Fuzzy/Near-Duplicate ~450.00 ms (Est.) 1.0232 ms 439x Fuzzy Subword Match
Agent Tool Replayer (Git-Aware) ~1,200.00 ms (Est.) 0.3052 ms 3,931x $0.00 Disk Thrashing
Workspace CI/CD Pre-Warming Cold Repo Scan 2781.43 ms 2 f/s Pre-warmed 5 files
==================================================================================================
* Est. Upstream Turn represents typical remote cloud LLM network roundtrips.
OmniCache Replay columns represent actual locally measured micro-benchmarks on hardware.
Run benchmarks locally anytime:
omnicache benchmark
🤖 Drop-In Agent Support
OmniCache automatically writes native configurations for your preferred developer environment:
# Auto-configure Claude Code, Cursor, Cline, and OpenHands:
omnicache init
# Or preview configuration JSON / TOML snippets without touching disk:
omnicache init --show
# Target a specific assistant:
omnicache init --agent claude
omnicache init --agent cursor
omnicache init --agent cline
Manual Environment Variables
If you prefer configuring your shell manually:
# Claude Code
export ANTHROPIC_BASE_URL="http://127.0.0.1:8000"
# OpenAI SDK & Cursor
export OPENAI_BASE_URL="http://127.0.0.1:8000/v1"
export OPENAI_API_BASE="http://127.0.0.1:8000/v1"
🔌 Model Context Protocol (MCP) Server
OmniCache provides a native, enterprise-ready Model Context Protocol (MCP) server compliant with Anthropic's Connectors Directory Policy. It supports both Local Stdio (omnicache mcp) for desktop workflows and Streamable HTTP (GET/POST /mcp) with Server-Sent Events (SSE), Mcp-Session-Id session tracking, and RFC 8414 / RFC 9728 OAuth 2.0 discovery metadata.
Transports Supported
- Local Stdio Transport: Standard JSON-RPC 2.0 loop via
omnicache mcpfor Claude Desktop, Claude Code, Cursor, and Cline. - Streamable HTTP Transport: Hosted/remote endpoint at
http://127.0.0.1:8000/mcpwith persistent SSE streams (Accept: text/event-stream), protocol version negotiation (2024-11-05), and automated OAuth 2.0 discovery (/.well-known/oauth-authorization-server).
1-Click Install via Smithery
Install directly to Claude Desktop with one command:
npx -y @smithery/cli install omnicache --client claude
Direct Agent Configuration
Claude Code (CLI)
claude mcp add omnicache -- omnicache mcp
Claude Desktop (claude_desktop_config.json) & Cursor (.cursor/mcp.json)
{
"mcpServers": {
"omnicache": {
"command": "omnicache",
"args": ["mcp"],
"env": {
"OMNICACHE_ORG_ID": "default"
}
}
}
}
Provided Tools
| Tool | Purpose |
|---|---|
omnicache_query |
Sub-millisecond intent-gated vector cache lookup (<1ms), returning cached completions for 0 tokens. |
omnicache_store |
Explicitly saves high-value answers, documentation, or code snippets into vector memory. |
omnicache_search |
Sub-millisecond vector similarity search across all cached prompts, solutions, and knowledge entries. |
omnicache_replay_tool |
Looks up cached outputs for deterministic agent tools (read_file, git_status, grep) with workspace state checks. |
omnicache_record_tool |
Records tool execution outputs for subsequent 0ms replays. |
omnicache_health |
Enterprise health check: verifies SQLite persistence, vector memory, and tool replayer status. |
omnicache_stats |
Returns real-time telemetry: hit ratios, total queries, tokens saved, and cost saved in USD. |
Example Agent Prompts Exercising MCP Tools
omnicache_query:"Check OmniCache to see if we have an optimized SQLite WAL connection pool implementation in Python."omnicache_search:"Search our cached knowledge base for solutions related to OAuth 2.0 token expiration and refresh token rotation."omnicache_store:"Store our standard API rate limiting configuration in OmniCache under the tag 'networking'."
For complete MCP documentation, payloads, and JSON schemas, see mcp/README.md.
📊 Engineering Telemetry Dashboard
OmniCache includes a real-time developer telemetry dashboard:
Engineering Blueprint Dashboard (http://localhost:8000/dashboard)
- Dark Neo-Brutalist Architecture: High-contrast schematic blueprint layout matching the production frontend.
- Single-Frame Mobile KPI Matrix: All 6 core performance and financial metrics visible above the fold on mobile screens without scrolling.
- Twin Telemetry Monitors: Streaming financial savings spline + resolution distribution breakdown (L1 Exact, L2 Semantic, and Git Tool replays).
- Live Sandbox & Upstream Inspection: Test Claude Messages and OpenAI completions in-browser with synthetic PII generation, hot routing, and transparent billing indicators.
🛠️ Command Cheatsheet
| Command | Purpose |
|---|---|
omnicache |
Start the background proxy daemon listening on 127.0.0.1:8000 |
omnicache mcp |
Launch the standard JSON-RPC 2.0 stdio MCP server for Claude Desktop, Cursor, and Cline |
omnicache run <cmd> |
Zero-config execution wrapper for Claude Code, Cursor, or custom agents |
omnicache doctor |
Validate Python runtime, SQLite WAL status, port binding, and vector engine health |
omnicache benchmark |
Run microsecond latency and throughput benchmarks across all cache tiers |
omnicache demo |
Run an automated 30-second live test streaming realistic events to the dashboard |
omnicache harness |
Run the complete 14-subsystem integration test scorecard (14/14 Passed) |
omnicache warm |
Pre-warm workspace repository files and tool signatures for instant replays |
omnicache sync |
Export, import, push, or pull cache snapshots across teammates |
omnicache mesh |
Discover and inspect P2P Edge Mesh peers and CRDT vector clocks |
omnicache stats |
Output cumulative session savings (pass --markdown for CI/CD summaries) |
🔒 Security & Enterprise Readiness
- Strict Localhost Binding: By default, OmniCache binds strictly to loopback (
127.0.0.1:8000), refusing to expose unauthenticated endpoints to external networks. - Salted HMAC-SHA256 Tokenization: The built-in
PrivacyShieldscrubs sensitive developer credentials (emails, API keys, private tokens) locally before optional upstream transmission. - Cryptographic Multi-Tenancy: Complete tenant isolation via
org_idandOMNICACHE_ORG_IDenvironment variables. - SOC2-Ready Audit Logging: Structured JSONL audit trails recording all MCP tool executions, durations, and statuses written to
~/.omnicache/mcp_audit.jsonl. - Zero Remote Telemetry: All embeddings, SQLite WAL database writes, and telemetry aggregations execute strictly in-process. No code or prompt data is ever phoned home to external servers.
- For security disclosures and guidelines, see SECURITY.md.
- For complete data handling, retention policies, and user purge rights under Anthropic Directory Policy, see PRIVACY.md.
🐳 Docker & Container Deployment
OmniCache provides a hardened container image with fail-closed security invariants:
# REQUIRED: Pass ADMIN_API_KEY at runtime (do not bake keys into image layers)
docker run -d \
-p 8000:8000 \
-e ADMIN_API_KEY="your-secure-random-admin-key" \
omnicache-proxy:latest
# Or launch with docker-compose (includes Redis + automated healthchecks)
docker-compose up -d
📄 Documentation
- 📜 Privacy Policy & Full Policy Document
- 📖 Architecture Deep Dive
- 🤖 Agent Integrations Guide (Claude Code, Cursor, Cline)
- 📡 API Reference
- 🔬 Independent Empirical Audit Report
- ❓ Troubleshooting & FAQ
⚖️ License
Distributed under the Functional Source License, Version 1.1 (FSL-1.1-MIT).
Copyright (c) 2026 Rajiv Prasad.
Free for developers and internal organizational use; prevents third-party commercial cloud hosting/proxy competition; converts automatically to standard MIT License after two years. See LICENSE for full legal terms.
Metadata
Release files for omnicache-proxy 3.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| omnicache_proxy-3.1.0.tar.gz | 3.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| omnicache_proxy-3.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.8 MB
Release files / omnicache_proxy-3.1.0.tar.gz
| Download URL | omnicache_proxy-3.1.0.tar.gz |
|---|---|
| Size | 3.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aaf39562bc0f88ea2737a3507a3c6c393c94a44be64bd3827e1a8f8aee677a23
|
|
BLAKE2b-256 checksum How to use checksums |
96b148ec4370d43742e203d1460a1ec05129726dc4289ea046a1e14160db1036
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / omnicache_proxy-3.1.0-py3-none-any.whl
| Download URL | omnicache_proxy-3.1.0-py3-none-any.whl |
|---|---|
| Size | 2.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca7da707b3543111c671d1139b7c0f6d97b01996244f0c5cb2ad044f652b67cb
|
|
BLAKE2b-256 checksum How to use checksums |
331c886716666277ebbef8f528d4b6a3eb71c262d49151bc162028ef6b330a80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|