Pre-execution cost estimation for LLM agent workflows with calibration learning
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Pre-execution cost estimation for LLM agent workflows. Get a cost estimate before running any agent task, then let tokencast learn from actuals to improve accuracy over time.
Available as a Claude Code plugin (recommended β one command delivers everything) or as an MCP server for Cursor, VS Code + Copilot, and Windsurf.
Install tokencast as a Claude Code plugin β delivers the MCP server, calibration hooks, and estimation skill in two commands:
The first command registers the tokencast marketplace. The second installs the plugin from it.
Prerequisites:
uvmust be installed for the MCP server to function. Install with:curl -LsSf https://astral.sh/uv/install.sh | sh
This delivers:
estimate_cost, get_calibration_status, get_cost_history, report_session, report_step_cost)Calibration data is stored in ~/.tokencast/calibration/ (global across projects, preserved on uninstall).
Scope options:
--scope user(recommended β installs globally for all projects) or--scope project(per-project only).
Install the package:
Or with uvx (no install required β runs directly from PyPI):
Configure your IDE β replace /path/to/your/project with your actual project path in the config snippets below.
Create or update .cursor/mcp.json in your project root:
Create or update .vscode/mcp.json in your project root:
Add to your Windsurf MCP config:
Full config examples are in docs/ide-configs/.
Once configured, tokencast exposes five MCP tools in your IDE:
| Tool | What it does |
|---|---|
estimate_cost | Estimate API cost for a planned task before running it |
get_calibration_status | Check whether your estimates are well-calibrated |
get_cost_history | Browse past estimates vs actuals |
report_session | Report actual cost at session end to improve calibration |
report_step_cost | Record the cost of a single pipeline step during a session |
Example β estimate before starting work:
Example β report actuals after finishing:
tokencast includes opt-out anonymous usage telemetry. It is on by default β data is collected unless you explicitly disable it.
What is collected: session count, mean accuracy ratio, calibrated factor count, client name, framework, tool name, package version. What is NOT collected: project names, file paths, cost amounts, or any personal data.
To disable:
disable_telemetry MCP tool (permanent opt-out, creates ~/.tokencast/no-telemetry)--no-telemetry to the MCP server commandTOKENCAST_TELEMETRY=0 in your environmentPrecedence (highest to lowest):
TOKENCAST_TELEMETRY=0 β always disablesTOKENCAST_TELEMETRY=1 β always enables (overrides --no-telemetry and the no-telemetry file)~/.tokencast/no-telemetry file exists β disablesTo delete your install ID: rm ~/.tokencast/install_id.
Data is sent to PostHog (US region). A random UUID is generated locally as your install ID β it contains no personal information. See the wiki for full details.
| Flag | Default | Description |
|---|---|---|
--calibration-dir PATH | ~/.tokencast/calibration | Where calibration data is stored |
--project-dir PATH | None | Project root for file measurement |
--no-telemetry | Off | Disable anonymous usage telemetry (on by default) |
--version | Print version and exit |
The Claude Code plugin (recommended) delivers everything in one command. Use this only if you prefer the SKILL.md workflow without the plugin system.
If you use Claude Code and prefer the skill-based (SKILL.md) workflow, you can install tokencast as a Claude Code skill instead:
Paths with spaces: Always wrap the project path in quotes. Without them the install script will fail on paths like
/Volumes/Macintosh HD2/....
This does three things:
<project>/.claude/skills/tokencast/Stop hook for auto-learning at session endPostToolUse hook to nudge estimation after planning agentsThe SKILL.md workflow is Claude Code-specific. The MCP server works in any MCP-compatible client and is the recommended path for new users.
(K+1)/2, and cache ratesExample output:
| Band | Cache Hit | Multiplier | Meaning |
|---|---|---|---|
| Optimistic | 60% | 0.6x | Best case β focused agent work |
| Expected | 50% | 1.0x | Typical run |
| Pessimistic | 30% | 3.0x | With rework loops, debugging, retries |
Calibration is fully automatic once you report actuals:
Calibration data lives in ~/.tokencast/calibration/ (gitignored, local to each user).
In Claude Code with SKILL.md installed, you can invoke explicitly:
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/tokencast)<a href="https://allmcps.com/mcp/tokencast"><img src="https://allmcps.com/api/badge/tokencast?style=directory" alt="Tokencast on AllMCPs" /></a>