
jackandjac/token-saver-mcp-java
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
MCP 서버는 langchain4j 및 langgraph4j를 통해 로컬 LLM에 간단한 Claude Code / Codex / Wibey 작업을 위임합니다.
개요
Claude Code / Codex / Wibey (또는 MCP-compliant coding Agent)를 간단하게 해주는 MCP 서버는 로컬 LLM(코드 스니펫, 격리된 Refactors, 문서, 코드 리뷰, 기본 Q&A)에 대한 프리미엄 토큰을 사용하여 로컬 모델이 이미 할 수 없습니다. 이것은 langchain4j (local LLM client), langgraph4j (orchestration) 및 공식 MCP Java SDK (stdio server)에서 Java에서 완전한 리깅입니다. 원래의 아이디어와 Python/FastMCP 프로토 타입에 대한 신용은 csabakecskemeti/cc token saver mcp로 간다. 이 프로젝트는 그래프 기반 classify/delegate/escalate Flow, 서버 측 파일 읽기, timeouts 및 actionable 오류와 같은 개념에 구축됩니다. 서버는 두 개의 MCP 도구를 노출 - query local llm 및 query local llm with context - Claude Code는 간단한 subtasks를 위해 먼저 시도하도록 지시됩니다.
개요(AI 번역)
Claude Code / Codex / Wibey (또는 MCP-compliant coding Agent)를 간단하게 해주는 MCP 서버는 로컬 LLM(코드 스니펫, 격리된 Refactors, 문서, 코드 리뷰, 기본 Q&A)에 대한 프리미엄 토큰을 사용하여 로컬 모델이 이미 할 수 없습니다.
이것은 langchain4j (local LLM client), langgraph4j (orchestration) 및 공식 MCP Java SDK (stdio server)에서 Java에서 완전한 리깅입니다.
원래의 아이디어와 Python/FastMCP 프로토 타입에 대한 신용은 csabakecskemeti/cc token saver mcp로 간다. 이 프로젝트는 그래프 기반 classify/delegate/escalate Flow, 서버 측 파일 읽기, timeouts 및 actionable 오류와 같은 개념에 구축됩니다.
어떻게 작동합니까?
서버는 두 MCP 도구에 노출 - query_local_llm 과 query_local_llm_with_context - 그 Claude Code는 간단한 subtasks를 위해 먼저 시도하도록 지시된다. 모든 통화는 모델에 바로 전달 대신 작은 langgraph4j 그래프를 통해 실행됩니다.
classify는 작업이 실제로 충분하다는 것을 판단하기 위해 지역 모델에 싼 저온 전화를 만듭니다. 그렇지 않다면 escalate는 구조화 된 `ESCALATE를 반환합니다. …
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Token Saver MCP Java
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/cc_token_saver_mcp — this project builds on that concept with a graph-based classify/delegate/escalate flow, server-side file reading, timeouts, and actionable errors.
How it works
The server exposes two MCP tools — query_local_llm and query_local_llm_with_context — 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:
START -> classify -> delegate -> END (task judged within the local model's competence)
\-> escalate -> END (task judged too complex; local LLM never called)
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.
Features
- Server-side file reading. Both tools accept an optional
file_pathsarray. The server reads the files itself and passes their content straight to the local LLM — Claude Code passes a path instead ofRead()-ing the file into its own context first. This is where the real token savings on large files come from. - Bounded waits. Both tools accept an optional
timeout_seconds(default fromLOCAL_LLM_TIMEOUT_SECONDS), enforced with a hard timeout around the call so a stalled local backend can’t hang a tool call indefinitely. - Actionable errors. Backend failures (connection refused, unreachable host, timeout) come back as a clear message naming the configured URL and the next step — e.g. “Local LLM backend unreachable at http://127.0.0.1:8000/v1. Check that it’s running…” — with
isError: trueset correctly, instead of a raw exception string.
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
"mcpServers": {
"token-saver": {
"type": "stdio",
"command": "java",
"args": ["-jar", "<path>/token-saver-mcp-java/target/token-saver-mcp-java.jar"]
}
}