
ATR: Automation for Token Reduction
io.github.JacobBhatt12Published by GitHub account JacobBhatt12v1.0.0Updated Oct 29, 2026
MCP proxy that hides tool lists and shrinks tool results so your AI uses fewer tokens.
Overview
Local MCP proxy that hides tool lists and shrinks tool results so an AI assistant spends fewer tokens on tool use.
- What you can do
- Search across all configured MCP servers' tools and run the few that fit the task
- Run read-only tools and shrink their results, or run changing tools with a confirmation step
- Read more of a result that was cut, such as one page, field or search
- Work with code: repo map, code search, targeted file reads, trimmed git diffs, test and build output
- Show how many tokens ATR has saved
- When to use it
- Worth adding when you use MCP servers that return large results, such as GitHub, browsers, databases, logs or web pages, and want lower token bills. It helps little for plain coding without MCP servers, and cannot reduce chat history or the assistant's own replies.
- Requirements
- Python 3.11 or newer and a local install of the atr-mcp package. Setup rewrites your AI apps' MCP configuration, moving existing servers behind ATR. For claude.ai or ChatGPT it needs the http extra plus a public tunnel link containing a secret. Settings live in a local config file.
Installation
In SourceWeft
- Open ATR: Automation for Token Reduction in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
ATR: Automation for Token Reduction
ATR makes your AI use fewer tokens when it works with tools. Fewer tokens means lower bills and fewer "usage limit reached" messages.
It works with Claude Code, Codex, Claude Desktop, Cursor, Windsurf, claude.ai and ChatGPT. It's free and runs on your own computer.
The problem
When an AI uses tools (GitHub, a browser, a database, your test runner), two things waste tokens:
- Every tool's instructions are sent on every message, even tools the AI never uses. Ten MCP servers can mean 10,000+ tokens before you've typed anything.
- Tool results are huge. A list of GitHub issues, a web page or a test run can be tens of thousands of tokens, and all of it goes into the chat.
What ATR does
ATR sits between your AI app and your tools:
- It hides the tool list. The AI sees a few small ATR tools and searches for the tool it needs when it needs it.
- It shrinks results. Before the AI sees a result, ATR removes the noise and keeps what matters. A failing test run keeps the failures and drops the passing tests. A web page keeps its text and links and drops the layout.
- Nothing is lost. When ATR cuts something, it keeps the full result, and the AI can ask for any part of it.
Get started
You need Python 3.11 or newer.
atr setup finds the AI apps on your computer, shows you what it will change, and asks first. Then it:
- moves your MCP servers behind ATR, and
- adds ATR to each app.
Restart your apps and you're done.
Every file atr setup changes also gets a backup copy (.atr-backup).
Just want to try it?
The demo connects a fake server with 50 tools (GitHub, Slack, logs, a database). Nothing leaves your computer.
Ask your AI to "list the open GitHub issues", then "show ATR stats" to see how many tokens it saved.
How much it saves
Live tests
We gave AI agents the same browser task with and without ATR: open Hacker News, click "new", then open a GitHub issues page. Each setup ran 3 times, and every answer was correct.
Codex is mixed: with ATR it sends about half as many full-price tokens, but more tokens overall.
Single results
What the AI receives, in tokens, measured with python -m benchmarks.bench_atr:
In each case, the parts that matter are kept: errors, failing tests, changed code lines, page text and links.
When ATR helps, and when it doesn't
- Helps most: you use MCP servers that return big results, like GitHub, browsers (Playwright), databases, logs or web pages.
- Helps a little: plain coding in Claude Code or Codex with no MCP servers. Those apps already trim their own commands, so in our test ATR made no difference there.
- Can't help: your chat history and the AI's own replies. An MCP server only sees tool calls, never the conversation.
ATR's tools
The AI uses these. You don't need to call them yourself.
For your MCP servers
For coding
Safety
- Secrets are never read, searched or shown, including
.envfiles, private keys, cloud credentials, and files named likeapi_keys.json. This also applies to tools behind ATR and toatr_diff. - Reading and changing are separate. Tools that only read go through
atr_read. Anything that changes something goes throughatr_call, so your app can ask you before it runs.atr_run(shell commands) always asks. - Files stay in allowed folders. File tools only see the folders listed in your settings.
Using ATR in claude.ai or ChatGPT
These apps can only reach servers on the internet, so ATR needs a public link.
Add https://<your-link>/mcp/<secret> as a connector:
- claude.ai: Settings → Connectors → Add custom connector (no sign-in)
- ChatGPT: Settings → Apps & Connectors → developer mode → create a connector (no sign-in)
Keep the link private. Anyone who has it can use your tools. File reading and shell commands are off over the internet unless you turn them on with --read-files and --allow-run. To change the secret, delete ~/.atr/http_token.
Settings
atr setup writes these for you. You can also edit ~/.atr/config.json yourself:
More
No MCP at all? atr compress shrinks a file or your clipboard before you paste it into any chat:
Set up by hand: atr init writes the settings file, and atr snippet prints the entry to add to your app's MCP config.
"No module named 'atr'" on macOS: run chflags nohidden .venv*/lib/python*/site-packages/*.pth, or use the entry from atr snippet.
Limits:
- Online servers that need a sign-in (OAuth) can't go behind ATR yet, so
atr setupleaves them in your app. - ATR lowers what each message costs. It doesn't change your plan's limits.
For developers
Next up: remembering repeated tool calls so the same result isn't sent twice, sign-in support for online servers, and a small local model that summarizes long text when cutting would lose meaning.
License: MIT
Source: README.md at commit 3a9847d
Tools
0Version history
1- v1.0.0LatestOct 29, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts