Trazum as an MCP server: let an agent price and budget its own prompts before it sends them.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A deterministic cost analyser for prompts and usage logs. Offline, free, same answer every time. It reports fifteen findings priced in dollars per month: caching you are not getting, a model tier you may not need, a schema you pay to describe on every call. Shortening the prompt is one of them, and it is rarely the biggest.
One agent costs what it costs. A fleet of them spends in a loop nobody is watching per iteration, and the bill arrives a month later as one number with no per-decision detail inside it.
Trazum installs into that loop. The MCP server's first tool is spend_guard,
and it is the only one here whose trigger is not a sentence somebody types:
A refusal carries the cheaper ways to make the same call, each priced for that
call and each naming what it assumes. The ceilings come from your
trazum.config.json; the spend so far comes from the usage log your host
already writes. Nothing is called and nothing is spent to answer.
That one line brings the skill and the MCP server. For any other MCP client,
npx -y @trazum/mcp over stdio does the same.
Or run it right now, without installing anything: the Playground
That link opens the CLI's pure subset running in the page, against sample files
already loaded, through the same @trazum/core functions the terminal runs.
Nothing you paste leaves your browser.
Real output, transcribed. Read the last two lines: the rules recovered $24.00 a month, and the advisory above them is worth $528.40, 22 times more. That gap is the entire argument for this tool.
The prompt is the part everyone looks at, and usually the cheap part. In the run above, forty percent of the text came out and it moved 3.5% of the bill. What moved the rest was a question nobody was asking: does this task need the model it is running on?
Every figure has a receipt. Fifteen advisories, each priced per month and reproducible on a single file: caching you are not getting, work that could go through the Batch API, a schema costing tokens on every call to describe a shape the request could carry as a parameter. Underneath them, twelve deterministic rules that shorten the text itself: same input, same output, free, offline, and never touching code, URLs or placeholders. On top, an optional LLM pass for the compression rules cannot do, through whichever provider you configure, which never runs unless you ask.
init, and the four things it refuses to write1. Tells you where the money actually is. This is the part worth reading first, because it is where the numbers are. Every advisory is priced per month against your own call volume, and none of them is about making the text shorter:
| Advisory | Why it matters |
|---|---|
| Prompt caching | Reading from cache costs 10% of input. The saving is computed over the real stable prefix: in a template with {{placeholders}}, only what precedes the first one is cached β not the whole prompt. |
| Reorder the template | Stable instructions sitting after the first variable placeholder never cache today. Trazum prices moving them in front β and with --reorder, does it. |
| Batch API | 50% off input and output when the work tolerates latency. |
| Cheaper model | Complexity heuristic: if the task looks simple, what dropping a tier would save. |
| Output-dominated cost | If you pay more for the answer than for the prompt, shortening the prompt has a ceiling. |
| Promotional pricing | Warns when you are budgeting with an introductory price that expires. |
| Context window | If the prompt does not fit, the call is going to fail. |
| Contradictory instructions | "Answer in English" three paragraphs above "reply in the customer's own language". The model has to pick one, and which one can change between calls β a correctness problem that also costs tokens twice. |
| Redundant examples | Few-shot examples that are near-copies of an earlier one, and what they cost per month. |
| Output format stated twice | A schema shown in a code block and then walked again in prose. The block is the version worth keeping. |
| Schema the request could carry | A schema block introduced by "Output format:" is paid for in input tokens on every call. Every major API now takes a response schema as a parameter β and moving it there is both cheaper and stricter. See below. |
The last four are advisory only. A contradiction has a right answer that only the author knows, and an example that looks redundant may be demonstrating a boundary case on purpose. Trazum points; it does not cut.
Most of what Trazum reports is a choice: shorter against clearer, cheaper against more capable. Moving an output schema out of the prompt is neither.
Those tokens are paid on every call to have the model read a shape and be
asked, politely, to match it. output_config.format, response_format,
responseSchema β whatever your provider calls it β takes the same shape as a
request parameter, where the decoder is constrained rather than persuaded. Cheaper
and stricter.
Trazum reports it and never does it, because it is not a change to the prompt: it is a change to the code that sends the prompt. A rule that deleted the schema would leave a prompt asking for a shape it no longer describes, sent by a client nobody updated β strictly worse than what it started from.
The one way this could do harm, and what stops it. Output format: {...} is
a contract and moving it is free; Input: {...} inside a few-shot example is
data the prompt needs, and moving it breaks the prompt. So nothing is guessed:
a block counts only when a phrase from the output-cue dictionary appears
immediately before it, in one of the seven languages the rules cover. No phrase,
no finding β a false negative, which is the right direction to be wrong in.
The example detector finds near-copies β the way few-shot blocks actually grow. It deliberately does not flag paraphrases: that case needs a model, and is on the roadmap for the LLM pass.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/trazum)<a href="https://allmcps.com/mcp/trazum"><img src="https://allmcps.com/api/badge/trazum?style=directory" alt="Trazum on AllMCPs" /></a>