unclog
Every agent, skill, slash command, and MCP server you've installed occupies your Claude Code context window on every turn. unclog scans your install, shows you what's costing tokens, flags MCP servers you haven't called in 30 days, and lets you handpick what to delete — locally, with no telemetry, no accounts, and no network calls.
# install
uv tool install unclog
# run
unclog
What it shows
- Every agent in
~/.claude/agents/, with its token cost. - Every skill in
~/.claude/skills/, with its token cost. - Every slash command in
~/.claude/commands/, with its token cost. - Every MCP server declared in
~/.claude.json(global and per-project), with its invocation count over the last 30 days so you can see which ones are actually pulling their weight. Servers with zero invocations get an[unused]flag. - A baseline — the total tokens loaded before you type a single message.
Why no per-MCP token count?
Modern Claude Code session logs no longer record the tools schema, so unclog cannot recover an exact token cost for each MCP server without spinning up the server and querying it. We've chosen to stay lightweight (no network, no spawning user-configured commands) and show — tok honestly rather than guess. Invocation count is the next-best signal: a server you haven't called in 30 days is paying schema rent for nothing.
Invocation counts come from walking every session JSONL under ~/.claude/projects/ (parent and subagent files) and tallying tool_use blocks per server. Counts are per server name — if the same MCP is declared at both global and project scope, both rows show the same total.
Remove what's costing you
After the scan, one sectioned picker opens. Tick the agents / skills / commands / MCPs you want to remove, hit enter, confirm once, done. A post-apply line shows how many tokens you saved and the new baseline.
Picker keys: ↑↓ move · space toggle · a / A check section / all · n / N clear section / all · enter apply · q quit.
Actions are destructive. Deleted files are removed from disk. MCP servers are deleted from ~/.claude.json. There is no undo and unclog keeps no snapshot — if you want to revive something, restore it from your own backup or reinstall.
Requirements
Python 3.11+, Claude Code ≥ 2.1.90, macOS or Linux.
Development
uv sync --all-extras --dev
uv run pytest
uv run ruff check src tests
uv run mypy src/unclog
License
MIT. See LICENSE.
Metadata
Release files for unclog 0.3.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 | Provenance | |
|---|---|---|---|---|
| unclog-0.3.0.tar.gz | 450.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| unclog-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 490.5 kB
Release files / unclog-0.3.0.tar.gz
| Download URL | unclog-0.3.0.tar.gz |
|---|---|
| Size | 450.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e500cf43f48926f5698d5541fe4ab47a43039e3b0df8e24dc1e55806b36faf04
|
|
BLAKE2b-256 checksum How to use checksums |
4e6f6fbb49bf3aab2fac4debdd7f99266d57ef7e5485c617d9e482ab0e174ab7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / unclog-0.3.0-py3-none-any.whl
| Download URL | unclog-0.3.0-py3-none-any.whl |
|---|---|
| Size | 40.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dae1b22d5ffa80d3552272edf0503ae8950147aab7d24cf9c72753af6b3b0780
|
|
BLAKE2b-256 checksum How to use checksums |
cdc08a67979a8b1b95ba9a3ecc1467b7fc6e6a8394102e5f2019eb6a68152c93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for unclog 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.