MCP server that delegates simple Claude Code / Codex / Wibey tasks to a local LLM via langchain4j and langgraph4j.
An MCP server that lets Claude Code / Codex / Wibey (or any MCP-compliant coding agent) delegate simple, well-scoped tasks to your local LLM — code snippets, isolated refactors, documentation, code reviews, basic Q&A — so you spend premium tokens on coordination and architecture, not on work a local model can already do.
This is a complete rewrite in Java on langchain4j (local LLM client), langgraph4j (orchestration), and the official MCP Java SDK (stdio server).
Credit for the original idea and the Python/FastMCP prototype goes to csabakecskemeti/cctokensavermcp — this project builds on that concept with a graph-based classify/delegate/escalate flow, server-side file reading, timeouts, and actionable errors.
The server exposes two MCP tools — querylocalllm and querylocalllmwithcontext — that Claude Code is instructed to try first for simple subtasks. Every call runs through a small langgraph4j graph instead of just forwarding straight to the model:
classify makes a cheap, low-temperature call to the local model to judge whether the task is actually simple enough for it. If not, escalate returns a structured ESCALATE: ... message telling Claude Code to handle the task itself — so a task that's too complex for the local model comes back as a clear signal, not a low-quality answer.
- Server-side file reading. Both tools accept an optional filepaths array. The server reads the files itself and passes their content straight to the local LLM — Claude Code passes a path instead of Read()-ing the file into its own context first. This is where the real token savings on large f
From the project README.
Add the radar badge to your README — it shows your project was picked up by MCP Radar and links to this page:
[](https://mcp.liqiwa.com/s/jackandjac--token-saver-mcp-java.html)
AI-driven knowledge training platform with pluggable schedulers, Codex Skill integration, and optional Anki/FSRS support.
2005selene2005-a11y/susu-phone-agentAndroid device bridge for Claude Code via MCP + Shizuku. No root, no model polling.
Naptila/recaf-mcpAn MCP server for headless Recaf analysis, decompilation, search, bytecode patching, and JVM/Android reverse engineering.
ultramancode/spring-ai-privacy-guardrailsPrivacy guardrails for Spring AI: request-scoped PII tokenization and least-privilege disclosure across model/tool calls, with Presidio and JVM-local OpenNLP.
TikyParkinson/mcp-agent-guardrails-spring-boot-starterSecurity & governance guardrails for MCP agents in Java — audit trail, agent-to-tool authorization, prompt-injection detection and rate limiting as a zero-config Spring Boot starter.
twz007/java-obs-agentFramework-agnostic Java observability sidecar agent: chat with a live JVM via MCP/web UI (metrics, slow calls, errors, logs, thread dumps, method traces). Self-hosted, attachable (Arthas-style). Apach
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.