
Agentfit
Shrink long agent chat histories to a token budget before each model call without hand-rolling truncation logic.
Overview
Agentfit is an MCP server for the Build phase that token-aware truncates chat histories to fit a model context budget.
What is this MCP server?
- Token-aware truncation of message histories against a configurable context budget
- stdio MCP server via npm package @mukundakatta/agentfit-mcp
- Designed for agent workflows that outgrow default context limits mid-session
- Keeps truncation policy in one MCP tool instead of scattered prompt hacks
- Package @mukundakatta/agentfit-mcp version 0.1.0
- Transport type stdio
- Repository github.com/MukundaKatta/agentfit-mcp
Community signal: 1 GitHub stars.
What problem does it solve?
Long agent transcripts blow past context limits and force brittle manual trimming in every workflow.
Who is it for?
Indie builders orchestrating multi-turn agent chats who need deterministic context sizing before API calls.
Skip if: Teams that only need a one-shot prompt with no history or want semantic memory instead of truncation.
What do I get? / Deliverables
You get a repeatable MCP step that fits message history to your token budget before the model runs.
- Registered stdio MCP server
- Truncated message lists within a declared token budget
Recommended MCP Servers
Journey fit
How it compares
MCP context-budget utility, not an agent skill or embedding store.
Common Questions / FAQ
Who is agentfit for?
Solo and indie developers building agent workflows who need to cap token usage on rolling chat histories.
When should I use agentfit?
Use it during agent development and operation whenever conversation length regularly nears your model’s context window.
How do I add agentfit to my agent?
Install @mukundakatta/agentfit-mcp from npm, add a stdio MCP server entry in Claude Code or Cursor, and call the truncation tool before sending history to the model.