blackfoil avatar

Claude Token Saver Mcp

blackfoil/claude-token-saver-mcp

Routes routine coding tasks to a local Ollama instance instead of burning Claude API tokens. Exposes tools like offload_work for boilerplate generation, compress_context for text summarization, and auto_setup to download and preload models based on your RAM. Built-in prompt injection detection and credential sanitization handle the security surface. The cost_dashboard tool tracks your actual token savings across sessions. Designed for the common pattern where 40% of your Claude Code requests are simple enough for a local 7B model to handle. Falls back to cloud if Ollama is unavailable. Comes with 736 tests and explicit tier recommendations for phi4, qwen2.5-coder 7B, or 32B depending on available memory.

GitHub stars
4
tools
11
transport
STDIO
last updated
Mar 31, 2026

Tools

11 tools

Public tool metadata for what this MCP can expose to an agent.

offload_workコード生成・リファクタリングをローカルで実行

コード生成・リファクタリングをローカルで実行

No parameter schema in public metadata yet.

compress_context長大なテキストをローカルで要約

長大なテキストをローカルで要約

No parameter schema in public metadata yet.

auto_setup最適モデルの推奨 → DL → プリロードをワンステップで

最適モデルの推奨 → DL → プリロードをワンステップで

No parameter schema in public metadata yet.

batch_offload複数タスクを一括投入(順次 / 並列)

複数タスクを一括投入(順次 / 並列)

No parameter schema in public metadata yet.

cost_dashboard累計節約額・モデル使用統計

累計節約額・モデル使用統計

No parameter schema in public metadata yet.

get_metricsサーバーメトリクス(JSON / Prometheus)

サーバーメトリクス(JSON / Prometheus)

No parameter schema in public metadata yet.

recommend_modelタスクカテゴリ別の最適モデル推奨

タスクカテゴリ別の最適モデル推奨

No parameter schema in public metadata yet.

pull_modelOllama モデルのダウンロード

Ollama モデルのダウンロード

No parameter schema in public metadata yet.

preload_modelVRAM へのプリロード

VRAM へのプリロード

No parameter schema in public metadata yet.

list_loaded_modelsロード中モデルの一覧

ロード中モデルの一覧

No parameter schema in public metadata yet.

configure_model_selectorモデルセレクターのランタイム設定

モデルセレクターのランタイム設定

No parameter schema in public metadata yet.

Sponsors

Readme

English | 日本語

CI npm Coverage License

claude-token-saver-mcp

claude-token-saver-mcp banner

Beta — 個人利用向け。736 テスト / カバレッジ 97%。

Claude Code の「それ、ローカルでよくない?」を自動化する MCP サーバー。

ボイラープレート生成、テスト作成、テキスト要約 — Cloud API に投げるまでもない定型タスクを、手元の Ollama でさばきます。セキュリティ対策込み。

モチベーション

Claude Code の API 利用を分析してみたら、リクエストの約 40% は定型的なコード生成やテキスト処理でした。この手のタスクは 7B クラスのローカルモデルでも実用的な品質が出ます。「推論は Cloud、作業は Local」— この振り分けを MCP で自動化したのがこのツールです。


View the full README on GitHub

Details

Repository
github.com/blackfoil/claude-token-saver-mcp
Category
AI & LLM Tools
Package
claude-token-saver-mcp
Transport
STDIO
Registry
MCP registry, active

Related AI & LLM Tools MCP servers

View all
1j-east avatarPixel Surgeonj-east/pixel-surgeon-mcpAI image and video generation, editing, and region repair via Gemini, OpenAI, and Grok.4stars
2lore-context avatarLore Contextlore-context/lore-contextGoverned AI-agent memory, Evidence Ledger traces, evals, and portable context tools.4stars
3n24q02m avatarImagine Mcpn24q02m/imagine-mcpMCP server for image/video understanding & generation (Gemini/OpenAI/Grok)4stars
4madezmedia avatarAcmi Mcpmadezmedia/acmiPersistent agent memory via ACMI — Profile/Signals/Timeline. 16 tools on Upstash Redis.3stars
5auctalis avatarLogic Serverauctalis/nocturnusaiAgent reasoning, memory, and token-optimized context for AI applications.2stars
6alfredoizdev avatarContextforge Mcpalfredoizdev/contextforge-mcpPersistent memory MCP server for Claude Code, Cursor, and GitHub Copilot.2stars