Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Pre-execution cost estimation for LLM agent workflows with calibration learning
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"tokencast": {
"command": "uvx",
"args": [
"tokencast"
]
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add tokencast -- uvx tokencastวางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"tokencast": {
"command": "uvx",
"args": [
"tokencast"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"tokencast": {
"type": "stdio",
"command": "uvx",
"args": [
"tokencast"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 6 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub krulewis ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.1.1) เข้า registry 7 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย
ในหมวดเดียวกันมี Context7, Codebase Memory, Exa
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
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:
/plugin marketplace add krulewis/tokencast
/plugin install tokencast@tokencast
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:
pip install tokencast
Or with uvx (no install required — runs directly from PyPI):
uvx tokencast
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:
{
"mcpServers": { "tokencast": { "command": "tokencast-mcp", "args": [ "--calibration-dir", "/path/to/your/project/calibration", "--project-dir", "/path/to/your/project" ] } } }
Create or update .vscode/mcp.json in your project root:
{
"servers": { "tokencast": { "type": "stdio", "command": "tokencast-mcp", "args": [ "--calibration-dir", "/path/to/your/project/calibration", "--project-dir", "/path/to/your/project" ] } } }
Add to your Windsurf MCP config:
{
"mcpServers": { "tokencast": { "command": "tokencast-mcp", "args": [ "--calibration-dir", "/path/to/your/project/calibration", "--project-dir", "/path/to/your/project" ] } } }
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:
Estimate the cost for: size=M, files=8, complexity=high
Example — report actuals after finishing:
Report session cost: actual_cost=4.20
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:
# Clone the repo (anywhere — it doesn't need to live inside your project)
git clone https://github.com/krulewis/tokencast.git
bash tokencast/scripts/install-hooks.sh "/path/to/your-project"
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:
/.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:
## tokencast estimate
Change: size=M, files=5, complexity=medium Calibration: 1.12x from 8 prior runs
| Step | Model | Optimistic | Expected | Pessimistic |
|---|---|---|---|---|
| Research Agent | Sonnet | $0.60 | $1.17 | $4.47 |
| Architect Agent | Opus | $0.67 | $1.18 | $3.97 |
| ... | ... | ... | ... | ... |
| TOTAL | $3.37 | $6.26 | $22.64 |
| 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).
from tokencast import estimate_cost, report_session, report_step_cost
from tokencast import get_calibration_status, get_cost_history
result = estimate_cost( {"size": "M", "files": 5, "complexity": "medium"}, calibration_dir="./calibration", )
report_session({"actual_cost": 4.20}, calibration_dir="./calibration")
status = get_calibration_status({}, calibration_dir="./calibration")
history = get_cost_history({"window": "30d"}, calibration_dir="./calibration")
report_step_cost( {"step_name": "Research Agent", "cost": 0.85}, calibration_dir="./calibration", )
In Claude Code with SKILL.md installed, you can invoke explicitly:
/tokencast size=L files=12 complexity=high
/tokencast steps=implement,test,qa /tokencast review_cycles=3 /tokencast review_cycles=0
SKILL.md — Skill definition (auto-trigger, algorithm)
references/pricing.md — Model prices, cache rates, step→model map references/heuristics.md — Token budgets, pipeline decompositions, multipliers references/examples.md — Worked examples with arithmetic references/calibration-algorithm.md — Detailed calibration algorithm reference docs/ide-configs/ — Per-IDE MCP config examples src/tokencast/ — Core estimation engine (Python package) src/tokencast_mcp/ — MCP server (Python package) scripts/ install-hooks.sh — One-time project setup (skill mode) disable.sh — Remove from project (skill mode) tokencast-learn.sh — Stop hook: auto-captures actuals (skill mode) tokencast-track.sh — PostToolUse hook: nudges estimation after plans sum-session-tokens.py — Parses session JSONL for actual costs update-factors.py — Computes calibration factors from history calibration/ — Per-user local data (gitignored) history.jsonl — Estimate vs actual records factors.json — Learned correction factors active-estimate.json — Transient marker for current estimate
references/heuristics.md)last_updated in references/pricing.mdMIT