CCM
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Claude Code Marketplaces

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Skill index
  • MCP index
  • Marketplace index
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by mertbuilds.com

Independent project, not affiliated with Anthropic
blackfoil avatar

Claude Token Saver Mcp

blackfoil/claude-token-saver-mcp
4STDIOregistry active
Summary

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.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
inference shell
inference shell
create and run specialised agents in minutes
build now →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
inference shell
inference shell
create and run specialised agents in minutes
build now →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →

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 で自動化したのがこのツールです。

ローカル LLM はどこまで来たか

ローカル LLM の進化は速いです。2024 年の Llama 3 から 2025 年の Qwen3 まで、わずか 1 年でコード生成ベンチマーク (HumanEval) のスコアは 60% → 85% に跳ね上がりました。

この調子なら、Agent ワークフローにローカル LLM が当たり前に組み込まれる日もそう遠くないでしょう。claude-token-saver-mcp は Cloud と Local を使い分けるための土台を提供します。

しくみ

MCP (Model Context Protocol) は Claude Code が外部ツールを呼び出すための標準プロトコルです。このサーバーを登録すると、Claude Code がタスクの内容を見て、定型的な処理を自動的にローカル LLM へ回します。

Claude Code ──MCP──▶ token-saver ──HTTP──▶ Ollama (ローカル)
     │                                         │
     │  「定型タスクだ → ローカルに振ろう」        │
     │                                         │
     └─── 高度な推論・設計判断は Cloud で継続 ───┘

Ollama が落ちていたり応答が遅い場合は Cloud API にフォールバック可能です。

30 秒セットアップ

前提: Node.js 20+ と Ollama がインストール済みであること。

0. Ollama を起動

ollama serve

1. プロジェクトルートに .mcp.json を作成

{
  "mcpServers": {
    "token-saver": { "command": "npx", "args": ["-y", "claude-token-saver-mcp"] }
  }
}

2. Claude Code を起動して、こう頼む

コーディング用にローカルLLMをセットアップして

RAM に応じた最適モデルが推奨 → ダウンロード(約 4GB)→ プリロードまで自動で走ります。

3. 動作確認

TypeScript で配列をシャッフルする関数を書いて

「ローカルLLM(qwen2.5-coder:…)で生成しました」のようにローカルモデル名が表示されれば OK。 出ない場合は ollama list でモデルを確認し、トラブルシューティング を参照してください。

ソースからビルドする場合
git clone https://github.com/BlackFoil/claude-token-saver-mcp.git
cd claude-token-saver-mcp
npm ci && npm run build

プロジェクトルートの .mcp.json に追加:

{
  "mcpServers": {
    "token-saver": {
      "command": "node",
      "args": ["/path/to/claude-token-saver-mcp/dist/server.js"]
    }
  }
}

特徴

  • ローカル完結 — 定型タスクは Cloud API を使わずに処理できる
  • 自動モデル選択 — RAM を検出して最適なモデルを推奨・DL・プリロード(auto_setup)
  • セキュリティ内蔵 — プロンプトインジェクション検知 + 出力サニタイズ
  • コスト可視化 — 節約額をリアルタイムで追跡(定型タスク比率 40% なら月 $50〜80 程度の削減が目安)
  • Cloud フォールバック — Ollama が落ちても Cloud に自動切り替え可能

使用例

あなた: 「ソート関数を書いて」    → offload_work がローカルで生成     💰 $0.02 節約
あなた: 「このログを要約して」    → compress_context がローカルで圧縮  💰 $0.05 節約
あなた: 「コスト節約を見せて」    → cost_dashboard: 累計 $47.89 節約
あなた: 「3つのAPIを一括実装して」 → batch_offload: 3 タスクを順次処理

ローカル品質の実際

ローカル 7B モデルの出力は Claude に及びません。それは前提です。ただ、定型タスクに限れば十分実用的です。

タスクローカル品質向き不向き
ボイラープレート生成★★★★☆✅ 得意
ユニットテスト作成★★★★☆✅ 得意
テキスト要約★★★★☆✅ 得意
単純なリファクタリング★★★☆☆✅ 実用的
アーキテクチャ設計★★☆☆☆❌ Cloud に任せるべき
複雑なデバッグ★★☆☆☆❌ Cloud に任せるべき

Claude Code がタスクの複雑さを判断して自動で振り分けます。ローカルの品質が足りなければ Cloud で処理されます。

自動ティアリング

RAMTierモデルDL サイズ
< 16 GBLightphi4:latest~2.5 GB
16–48 GBStandardqwen2.5-coder:7b~4.7 GB
> 48 GBUltraqwen2.5-coder:32b~18 GB

ツール一覧

ツール説明
offload_workコード生成・リファクタリングをローカルで実行
compress_context長大なテキストをローカルで要約
auto_setup最適モデルの推奨 → DL → プリロードをワンステップで
batch_offload複数タスクを一括投入(順次 / 並列)
cost_dashboard累計節約額・モデル使用統計
その他のツール(6 件)
ツール説明
get_metricsサーバーメトリクス(JSON / Prometheus)
recommend_modelタスクカテゴリ別の最適モデル推奨
pull_modelOllama モデルのダウンロード
preload_modelVRAM へのプリロード
list_loaded_modelsロード中モデルの一覧
configure_model_selectorモデルセレクターのランタイム設定

セキュリティ

ローカル LLM への入出力を自動で保護します。

  • プロンプトインジェクション検知 — 5 カテゴリ・20 パターンで悪意ある入力をブロック
  • 出力サニタイズ — API キー・パスワード・JWT など 11 パターンを [REDACTED] に置換
  • データプライバシー — 全処理がローカル完結。外部への送信なし

ドキュメント

クイックスタート5 分で始める
ユースケース集具体的な活用例
設定リファレンス全設定項目
FAQよくある質問
トラブルシューティングエラー対応

アーキテクチャ

src/
├── server.ts          # MCP エントリポイント(11 ツール登録)
├── tools/             # offload_work, compress_context, auto_setup, batch_offload 等
├── ollama/            # Ollama クライアント & マルチノードロードバランサー
├── queue/             # FIFO キュー & 優先度キュー(URGENT/HIGH/NORMAL/LOW)
├── model-selector/    # モデル推奨エンジン, ベンチマーク DB, 実行トラッカー
├── validators/        # 入力バリデーション & プロンプトインジェクション検知
├── cost/              # コスト計算 & レポーター
├── metrics/           # Prometheus メトリクス収集
├── persistence/       # ExecutionTracker / BenchmarkStore のファイル永続化
├── config/            # Zod 設定スキーマ & ローダー
├── tiering/           # RAM ベースの自動ティアリング
├── logging/           # 構造化ログヘルパー
└── errors.ts          # CTS-XXXX エラー体系

開発

npm ci
npm test             # 736 テスト(カバレッジ 97%)
npm run typecheck    # 型チェック
npm run lint         # ESLint
npm run build        # プロダクションビルド

対応プラットフォーム: macOS / Linux / Windows(Ollama が動く環境)

コントリビューション歓迎です → CONTRIBUTING.md

ライセンス

Apache License 2.0

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
inference shell
inference shell
create and run specialised agents in minutes
build now →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
Categories
AI & LLM Tools
Registryactive
Packageclaude-token-saver-mcp
TransportSTDIO
UpdatedMar 31, 2026
View on GitHub

Related AI & LLM Tools MCP Servers

View all →
chunxiaoxx avatar
Nautilus Compass

chunxiaoxx/nautilus-compass

Drift-aware cross-agent memory · MCP/A2A · LongMemEval-S 56.6% · 1/15 Zep cost
4
j-east avatar
Pixel Surgeon

io.github.j-east/pixel-surgeon

AI image and video generation, editing, and region repair via Gemini, OpenAI, and Grok.
4
lore-context avatar
Lore Context

io.github.lore-context/lore-context-mcp

Governed AI-agent memory, Evidence Ledger traces, evals, and portable context tools.
4
timmx7 avatar
Styx Mcp Server

io.github.timmx7/styx-mcp-server

MCP server for Styx — intelligent AI routing across OpenAI, Anthropic, Google, and Mistral.
4
dakera-ai avatar
Dakera Mcp

dakera-ai/dakera-mcp

Decay-weighted vector memory for AI agents — 86+ MCP tools via tiered profiles
3
levelsofself avatar
Nervous System - Multi-Agent AI Governance

io.github.levelsofself/nervous-system

Governance layer for multi-agent AI systems with behavioral enforcement and drift detection.
3