An MCP server to reduce token usage in Claude Code and Codex
Most MCP servers add tokens: each one puts its tools in every request. MinniMemoryMCP is built to take tokens away. It sorts your Claude Code or Codex memory into a short core that loads every turn and on-demand files the agent opens only when a task needs them, then keeps it that way as you add notes. Your agent, model and files stay yours; every change can be undone.
Updated 2026-11-27
What an MCP server costs in tokens#
An MCP server gives your agent tools. Each tool’s name, description and input schema is sent with every request, whether the task uses it or not. Five servers with ten tools each is fifty tool descriptions on every turn. So the first saving is to remove servers you do not use.
A token-saving MCP server has to save more than it adds. MinniMemoryMCP keeps its own tool list small and works on the part that costs the most every turn: your memory.
What MinniMemoryMCP does#
- Reads your memory:
CLAUDE.md, auto memory and imports for Claude Code, orAGENTS.mdfor Codex. - Splits it: a short always-loaded core and on-demand files, each listed in the core with a hint of when to open it.
- Keeps it split: a check shows drift as notes are added, and
undoputs everything back.
On our test memory, the text loaded every turn went from 12,511 tokens to 6,699, 46.5% less, with 5,812 tokens moved to files that load on demand. With MinniMemoryMCP 1.6.0 on our test memory, the agent went looking in its memory 17 times instead of 89 over the same 87 answers, and the run used 47.2% fewer tokens.
Measured 15 November 2026: at API rates, a Claude Code session on our test memory cost $0.47 before MinniMemoryMCP 1.6.0 and $0.29 after on average, 37.7% less (each of the three sessions 33.9% to 40.0% less). A blind judge found 80 of 87 answers correct before and 81 after. The method and raw numbers are on the evidence page.
Install it#
$ npm i -g minnimemory
$ minnimemory install$ npm i -g minnimemory
$ minnimemory install --host codexThe npm package is minnimemory. Setup steps and every command are in the MinniMemoryMCP docs.
Other tools that save tokens#
Memory is one part of the bill. Output filters, code indexers and usage meters act on the others; they are compared in Tools that reduce Claude Code token usage. Memory tools such as Mem0, Zep, Supermemory and Letta solve a different problem, covered in MinniMemoryMCP vs Mem0, Zep, Supermemory and Letta.