PluginBench
MCP Server
Active
MIT

Sipcode MCP Server

io.github.Anuj7411/sipcode

Keep Claude Code's context clean automatically—drift detection, re-read dedup, and token analytics.

What is the Sipcode MCP server?

Sipcode is a free command-line tool that optimizes Claude Code's context window by detecting context rot, deduplicating file reads, and providing token usage analytics. It sits between you and Claude Code to reduce bloat, lower costs, and maintain answer quality through a local proxy hook that makes zero network calls.

Sipcode monitors and cleans Claude Code's context in real time, catching duplicate reads and bloated context before they reach Claude. It measures savings with a reproducible 62.6% median benchmark, provides daily spend summaries and month-end projections, and includes 15 MCP tools for introspection—all running locally on your machine with no telemetry or cloud uploads.

How to install Sipcode

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "sipcode": {
      "command": "npx",
      "args": [
        "-y",
        "sipcode",
        "-y",
        "-p",
        "sipcode",
        "sipcode-mcp"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • sipcode drift — Detects if your current Claude Code session is drifting from your normal usage pattern due to bloated context or repeated reads.
  • sipcode proxy --stats — Shows token savings caught in the current session, broken down by rewriter type with signal-integrity scoring.
  • sipcode benchmark — Runs a locked 20-task corpus to produce a verifiable, reproducible savings number (62.6% median).
  • sipcode today — Daily spend summary showing tokens used, sessions, output ratio, and comparison to 30-day median.
  • sipcode forecast — Projects month-end spend based on your last 14 days of activity.
  • sipcode estimate — Predicts task cost across Opus, Sonnet, and Haiku models before you run them.
  • sipcode stats — Cumulative token savings across all sessions.
  • sipcode trend — Tracks one metric over time to show if usage patterns are improving.
  • sipcode why — Per-session forensics showing where tokens were spent and why.
  • sipcode impact — A/B comparison of spend before and after Sipcode installation.
  • sipcode score — Audits your repository for AI-friendliness on a 0-100 scale with tiered badges.
  • sipcode receipt — Generates a shareable PNG receipt of a session's activity.
  • sipcode init — Sets up Sipcode in a project with manifest, CLAUDE.md rules, and proxy hook.
  • sipcode manifest — Generates or refreshes the project manifest for Claude's context.
  • sipcode rules — Installs, switches, or inspects output-compression rules in CLAUDE.md.

Use cases

  • Reduce Claude Code session costs by 40–80% through automatic context deduplication and bloat removal.
  • Monitor context health and detect when your session is drifting from normal patterns before quality drops.
  • Forecast monthly Claude spending and track savings impact before and after Sipcode installation.
  • Audit your codebase for AI-friendliness and get actionable recommendations to improve agent performance.
  • Benchmark task costs across different Claude models (Opus, Sonnet, Haiku) before committing tokens.

Sipcode MCP server FAQ

What is Sipcode?

Sipcode is a free, open-source CLI tool that optimizes Claude Code's context window by detecting context rot, deduplicating file reads, and providing token analytics. It runs locally with zero network calls and is MIT licensed.

Is Sipcode free?

Yes, completely free. MIT license, no tracking, no telemetry sent to Anthropic or the developers, and no paid tier. All code is open source on GitHub.

Does Sipcode send my code anywhere?

No. Sipcode makes zero network calls during normal use. Everything runs locally on your machine. There is a privacy test in the codebase that fails if any network code is imported.

How do I install Sipcode in Claude Code?

Run `npm i -g sipcode` to install globally, then `sipcode init` in your project folder. This wires the proxy hook into Claude Code automatically. Your next Claude Code session will use it without any restart needed.

How much can Sipcode save me?

Sipcode has a reproducible benchmark showing a 62.6% median token reduction on a locked 20-task corpus. Real savings vary by session, but the tool measures every saving with signal-integrity scoring so you can see exactly what was removed.

Does Sipcode work with Cursor or other AI tools?

Today, Sipcode only works with Claude Code, since it is the only tool that exposes the hooks Sipcode needs. Support for other CLIs is being explored.

README (reference)

Source of truth, from the repository.

<p align="center"> <a href="https://anuj7411.github.io/sipcode/" aria-label="Sipcode"> <img src="https://raw.githubusercontent.com/Anuj7411/sipcode/main/docs/brand/icon/icon-color.png" alt="Sipcode" width="120" /> </a> </p> <h1 align="center">Sipcode</h1> <p align="center"> <strong>Keep Claude Code's context clean for sharper answers and lower cost, automatically.</strong> </p> <p align="center"> <a href="https://www.npmjs.com/package/sipcode"><img src="https://img.shields.io/npm/v/sipcode?color=5B4FCF&label=npm" alt="npm" /></a> <a href="https://github.com/Anuj7411/sipcode/stargazers"><img src="https://img.shields.io/github/stars/Anuj7411/sipcode?color=5B4FCF&label=stars" alt="GitHub stars" /></a> <a href="https://www.npmjs.com/package/sipcode"><img src="https://img.shields.io/npm/dm/sipcode?color=5B4FCF&label=downloads" alt="npm downloads per month" /></a> <a href="https://github.com/Anuj7411/sipcode/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-5B4FCF" alt="MIT licensed" /></a> <img src="https://img.shields.io/badge/tests-1%2C389%20passing-28C840" alt="1389 tests passing" /> <img src="https://img.shields.io/badge/network%20calls-0-2D3142" alt="zero network calls" /> </p> <p align="center"> <a href="https://anuj7411.github.io/sipcode/">Website</a> · <a href="https://anuj7411.github.io/sipcode/compare/">Compare</a> · <a href="https://github.com/Anuj7411/sipcode/releases">Releases</a> </p>

Install in 30 seconds

npm i -g sipcode
sipcode init

That is it. Your next Claude Code session will use Sipcode automatically. Verify a few minutes later:

sipcode drift

If the output reads no drift, context health stable, Sipcode is doing its job.

Already installed? Keep it fresh. Sipcode makes zero network calls, so it can't pop an "update available" notice. Build a weekly habit: run sipcode update (or npm i -g sipcode@latest) to pull the latest fixes. Full details in Updating Sipcode.


What is Sipcode?

Sipcode is a free command-line tool that sits between you and Claude Code. It does three things:

  1. It watches Claude Code's context window and warns you when it starts to bloat (we call this "context rot")
  2. It catches duplicate file reads and other waste before they reach Claude, so you pay less for the same answers
  3. It gives you receipts. Every saving is measurable in your terminal.

It is open source under the MIT license. It makes zero network calls during normal use. Your data never leaves your laptop.


How Sipcode compares

SipcodeTool ATool BTool C
ApproachLive PreToolUse hookCross-session memory storeStatic methodologyRAG retrieval server
Caps verbose tool output✓✗docs only✗
Dedups same-session re-reads✓✗docs only✗
Mid-session install support✓ Verified Warm-Filln/an/an/a
Zero false-dedup by construction✓n/an/an/a
Reproducible benchmark on locked corpus✓ 62.6% median (20 tasks)✗✗✗
Self-introspection MCP tools✓ 15 tools✗✗partial
Zero network calls in normal use✓✓n/a✗
MIT licensed✓✓✓✓

Sipcode is complementary to memory tools that persist context across sessions (Tool A in the table). Sipcode keeps each individual session clean. They solve different problems. Run both for maximum effect.

Full feature-by-feature comparison with tool names revealed: anuj7411.github.io/sipcode/compare


Why you probably want it

If you use Claude Code for real work, you have already felt this:

  • Long sessions get expensive fast. A two-hour session on Claude Max can burn through your daily plan
  • Quality drops as the context window fills. Claude starts re-reading files, repeating itself, losing the thread of what you asked
  • You cannot tell what is bloat and what is signal

Sipcode measures the bloat, then removes the parts Claude does not need. The savings are not theoretical. Run sipcode benchmark on any machine and you will see the same 62.6% median reduction on the locked 20-task corpus.


The two-minute tour

After installing, here are the five commands that show you what Sipcode is doing.

1. sipcode drift

Tells you if your current Claude Code session is drifting from your normal usage pattern. Bloated context, repeated reads, stale signals are all flagged here.

✓ Sipcode drift: no drift, context health stable vs your recent baseline.

2. sipcode proxy --stats

Shows what Sipcode caught in the current session, broken down by rewriter.

Sipcode proxy, rewrite stats
  total rewrites:    144
  est. tokens saved: ~288,685 (heuristic)
  signal kept:       67% (med), weighted across all rewrites

3. sipcode benchmark

Runs the locked 20-task corpus and produces a verifiable savings number. Anyone, anywhere can run this and get 62.6%.

62.6%  median savings on a locked 20-task corpus
       range 37.4% to 80.6%   3,567,170 tokens   $67.43

4. sipcode today

Daily spend summary. Tokens used, sessions, output ratio, comparison to your 30-day median.

spend so far    $1.20    across 4 sessions
tokens so far   943.8K   output ratio 3.7%

5. sipcode forecast

Month-end projection based on your last 14 days.

projected month-end   $17,674   (range $14,139 to $21,208)

How to install (more detail)

Sipcode works on Mac, Linux, and Windows. You need Node.js 18 or newer.

Step 1. Install Node.js

Skip this step if you already have Node.js. Otherwise:

  • Mac: brew install node
  • Linux (Ubuntu / Debian): sudo apt install nodejs npm
  • Windows: Download from nodejs.org

Verify it worked:

node --version

You should see v18.0.0 or higher.

Step 2. Install Sipcode globally

npm i -g sipcode

This downloads Sipcode from npm and makes the sipcode command available everywhere.

If you see permission errors on Mac or Linux, try:

sudo npm i -g sipcode

Verify it installed:

sipcode --version

You should see 1.6.20 or higher.

Step 3. Run sipcode init to wire it into Claude Code

sipcode init

This command does four things:

  1. Creates a small .sipcode/manifest.md file in your current project so Claude knows what your project is about
  2. Adds a small block to your CLAUDE.md (or creates one) with rules that keep Claude's replies terse
  3. Installs the Sipcode hook into Claude Code, which is the thing that actually saves tokens
  4. Marks the date so sipcode impact can show you before-and-after savings later

You will see a checklist as it runs. Each step shows a checkmark when it completes.

The two questions it asks (and what to pick):

1. Manifest budget. How lean to keep the project summary Sipcode injects.

  • tighten (recommended): auto-trims low-signal sections so the summary stays lean, and never blocks you.
  • strict: hard-caps the manifest at 2k tokens and refuses if it would go over.
  • off: no cap, the manifest can grow to any size.

2. Output compression rules. How terse Claude's replies are in this project.

  • default (recommended): diff-style edits, no "here's what I did" preamble.
  • strict: telegraphic, clipped replies, for power users who want maximum brevity.
  • verbose: extra context and explanation, good while you are still learning the tool.
  • skip: don't install reply rules at all.

Not sure? Take the recommended option in each. You can change either choice later: run sipcode rules --mode <default|strict|verbose> for the reply style, or re-run sipcode manifest to regenerate the summary.

Step 4. Open a new Claude Code session

Sipcode picks up automatically on the next tool call Claude makes. No restart needed in most cases. To be safe, you can close any existing Claude Code window and open a fresh one.

Now Claude Code will be using Sipcode in the background.

Step 5. After about an hour of work, check it

sipcode drift
sipcode proxy --stats

If drift says "no drift" and proxy --stats shows a few dozen rewrites with savings, everything is working.


Updating Sipcode

Sipcode never checks for updates on its own. That would require a network call, and zero network calls in normal use is a guaranteed property of the codebase (a test fails the build otherwise). Updating is always a manual, explicit step.

To update to the latest version:

npm i -g sipcode@latest

Or use the built-in helper:

sipcode update          # prints your current version + the update command
sipcode update --run    # runs the update in place for you

After updating, confirm with sipcode --version and see what changed in the CHANGELOG. The MCP config never needs re-pasting; Claude asks the server for its tools on every reconnect, so new tools appear automatically.

Release cadence: patch releases ship whenever a fix or improvement is ready, often within a day or two of a reported issue. Since Sipcode can't notify you (zero network calls), a good habit is to run sipcode update about once a week. It's a one-second check, and --run upgrades you on the spot if something's new. Watch or star the repo to catch releases too.


What you get

FeatureWhat it does for you
Context-rot detectionWarns when your Claude Code session is starting to behave worse than your norm
Re-read deduplicationCatches duplicate file reads and skips them, saving tokens and time
Compression-integrity scoringFor every saving, tells you what percentage of the original signal was kept
Spend telemetryDaily, monthly, projected. All from your own transcripts, no cloud upload
Task cost estimationPredicts what a coding task will cost across Opus, Sonnet, and Haiku before you run it
Codebase health scoreRates your repo 0-100 on how easy it is for an AI agent to work in
MCP server15 tools registered for Claude Desktop, so you can ask Claude itself about your usage
Reproducible benchmarkA locked 20-task corpus that anyone can run and verify

Frequently asked questions

Is it really free?

Yes. MIT license. No tracking. No telemetry sent to us. No paid tier. You can read every line of source code on GitHub.

Does it send my code anywhere?

No. Sipcode makes zero network calls during normal use. Everything runs locally on your machine. We have a privacy test that fails if any network code is imported into the source.

How is it different from other context tools?

See the comparison page. The short version: Sipcode is the only one with a published reproducible benchmark, zero false-dedup by architecture, and mid-session install support.

What is "context rot"?

When Claude's context window fills up with stale, repeated, or off-topic information, the quality of its answers drops. Sipcode measures this with sipcode drift and removes most of the waste with the proxy hook.

Does it work with Cursor or other AI tools?

Today, only with Claude Code (since Claude Code is the only tool that exposes the hooks Sipcode needs). Support for other CLIs is something we are exploring.

How do I update?

npm i -g sipcode@latest

Or run sipcode update to see your version and the command, or sipcode update --run to update in place. Sipcode never auto-checks for updates (zero network calls), so updating is always explicit. See the CHANGELOG for what changed.

How do I uninstall?

sipcode proxy --uninstall
npm uninstall -g sipcode

Commands

CommandWhat it does
sipcode initSet up Sipcode in a project (manifest + CLAUDE.md + proxy hook)
sipcode updateShow how to update to the latest version (or --run to update now)
sipcode hygieneInstall Session Hygiene: read-once rules + context-pressure hooks
sipcode rulesInstall, switch, or inspect the output-compression rules in CLAUDE.md
sipcode manifestGenerate or refresh the project manifest
sipcode driftCheck if the current session is drifting from your norm
sipcode proxy --statsSee what the proxy caught this session (also --install / --uninstall)
sipcode benchmarkRun the locked 20-task corpus for a verifiable savings number
sipcode estimatePredict what a task will cost across models before you run it
sipcode todayToday's spend summary vs your 30-day median
sipcode statsCumulative token savings across all sessions
sipcode forecastMonth-end spend projection from your last 14 days
sipcode trendTrack one metric over time, to see if it's getting better
sipcode whyPer-session forensics: where your tokens died
sipcode impactA/B compare your spend before vs after Sipcode
sipcode scoreAudit your repo for AI-friendliness (0-100, tiered badge)
sipcode receiptGenerate a shareable PNG receipt of a session

Run any of them with --help for full options.

Tip: which sessions do these report on? By default, why, stats, today, forecast, trend, and impact look across all your projects, not just the folder you are standing in. So if you run sipcode why inside project A but project B had the most recent activity, you will see project B. To scope any of them to the project you are currently in, add --here (for example, sipcode why --here or sipcode today --here). Use sipcode why --list to see every session and pick a specific one with --session <id>.


Requirements

  • Node.js 18 or newer
  • Claude Code installed (for the proxy hook). Sipcode also works as standalone CLI tools (benchmark, score, etc.) without Claude Code installed.

License

MIT. See LICENSE.


Acknowledgments

Built with care for the indie developers who burn through their Claude Max plan in two hours. The 62.6% benchmark methodology is documented in benchmark/METHODOLOGY.md. Anthropic's published research on context-window quality informs the integrity-scoring approach.

Related MCP servers

ANAnwani logo

Anwani

Active

Anwani MCP: create and manage permanent 9-digit address codes through OAuth (9code.app).

0
JavaScript
MIT
View repository →
STStyleKit logo

StyleKit

Active

Search 148 curated design styles and pull tokens, recipes, and shadcn commands into your AI IDE.

562
TypeScript
MIT
View repository →

Connect AI assistants to Stellary projects, boards, documents, and governed agent workflows.

0
JavaScript
MIT
View repository →
TRTrainTools logo

Recommend paper-backed diagnostics for PyTorch and Hugging Face training problems.

0
Python
MIT
View repository →
WEweb3agent logo

web3agent

Active

Web3 MCP proxy for AI agents: DeFi swaps, bridges, market data, wallets, and gated writes.

0
TypeScript
MIT
View repository →

Local guardrail proxy that blocks destructive MCP tool calls, rug pulls, and tool poisoning

5
Rust
Apache-2.0
View repository →