
Promptbudget Mcp
Count, truncate, and chunk text so agent prompts stay inside model token limits without guesswork.
Overview
io.github.MukundaKatta/promptbudget-mcp is a Build-phase MCP server for token-budget-aware counting, truncation, and chunking of text destined for LLM prompts.
What is this MCP server?
- Token-budget-aware counting for LLM prompt sizing
- Truncate long context to a safe maximum length
- Chunk documents for map-reduce or RAG-style agent steps
- Stdio MCP via @mukundakatta/promptbudget-mcp (v0.2.0)
- Keeps large paste-and-pray prompts from blowing context windows
What problem does it solve?
You keep overrunning context windows or silently dropping middle sections because manual character counts do not match model token billing.
Who is it for?
Indie builders orchestrating long documents, logs, or tool outputs through Claude Code-style agents.
Skip if: Teams that only need a one-shot short prompt with no chunking strategy or formal budget policy.
What do I get? / Deliverables
Agents produce right-sized prompt segments with known budgets, enabling safer multi-step runs and more predictable API cost.
- Token counts aligned to budget-oriented tooling
- Truncated or chunked text blocks sized for the next model call
- Repeatable chunking strategy the agent can apply each session
Recommended MCP Servers
Journey fit
Agent-tooling in build is where you design prompt pipelines; budget control is foundational before shipping AI features. Token-aware chunking belongs with MCP agent tooling that shapes what actually gets sent to the model each turn.
How it compares
Prompt budget MCP utility, not a full RAG stack or model router.
Common Questions / FAQ
Who is promptbudget-mcp for?
Solo developers building LLM-powered agents who need reliable token counting and chunking inside MCP workflows.
When should I use promptbudget-mcp?
Use it before sending large text to the model, when splitting docs for staged summarization, or when trimming tool output to a cap.
How do I add promptbudget-mcp to my agent?
Install @mukundakatta/promptbudget-mcp from npm, add the stdio MCP server block to your host config, and call count/truncate/chunk tools on your source text.