Exposes a single tool, `truncate_to_token_budget`, that lets Claude count tokens and fit text into a context window mid-task without hallucinating character offsets or chunk boundaries. The logic is ported from the author's `promptbudget` Rust crate but implemented in plain JavaScript so you don't need a toolchain. Useful when you're chaining prompts, building RAG pipelines, or need deterministic truncation that respects token limits rather than guessing at string slices. Part of a fourteen-server collection that replaces operations LLMs commonly fumble,regex, CSV parsing, timezone math,with real implementations they can call as tools.
claude mcp add --transport stdio io.github.mukundakatta-promptbudget-mcp -- npx -y @mukundakatta/promptbudget-mcp