
maxh8086/tokenfrugal
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Offload routine coding to a local LLM (Ollama/OpenAI-compatible) via an MCP gateway with Docker tools, 280+ personas and a Neo4j task plan. Save Claude/Codex tokens.
Обзор
Keywords: MCP server, Model Context Protocol, local LLM, Ollama, token saving, reduce Claude Code usage, Codex, LM Studio, vLLM, AI agents, Docker MCP router, offline coding assistant. Coding is evolving from a primary execution skill to an orchestration skill. To test this shift, I built this latest project entirely using AI coding agents. The takeaway? When AI handles the syntax, your ability to think deeply, design robust architectures, and drive creative solutions becomes your true competitive advantage. Check out the results and let me know your thoughts: linkedin.com/in/vpavtekar You talk to one big cloud model (Claude Code, Codex, ...). It hands small jobs to a free local model and gets back a short summary. - Each task runs on local model. The two models never run together and never talk to each other. - A model writes code and edits files. A model reads, analyses and browses.
README
Показан фрагмент оригинального README. Открыть оригинал.
TokenFrugal
Hand routine coding work to a free local LLM, and keep your paid cloud model for planning and hard decisions.
TokenFrugal is an MCP server. Your cloud agent (Claude Code, Codex, Cursor or any MCP client) calls one tool, dispatch_task(agent, task). A local model does the work and returns a summary of up to 5000 tokens, so your cloud quota pays for thinking, not for boilerplate.
Why TokenFrugal
- Lower token spend. Tests, docstrings, lint fixes, file edits and log reading go to a local model. The cloud agent only sees a short summary.
- Private by default. Local models run on your machine. Only summaries and a
task_idreturn to the cloud agent. - No surprise bills. A failed task returns a short error and a
task_idyou can resume. Nothing falls back silently to the cloud. - Small models that stay on track. Each role gets a tool allowlist of 4-6 tools, and runs one model at a time.
- Visible and auditable. A live dashboard shows every tool call, and the task log is stored locally.
Use cases
- Stretching a limited subscription. Your seat has tight limits. Send unit tests, docstrings and boilerplate to
builder, and keep the cloud model for design and review. - Triaging logs and test output. Ask the
analyzerordebuggerrole to read a long log or failing test run and return the root cause in a few lines. - Reviewing and scanning code before a merge. The
reviewerrole checks a diff, and thesecurityrole runs SonarQube rules, all on local models. - Working on confidential code. For client or internal code that must not leave the machine, the source stays local and only summaries reach the cloud agent.
- Documentation, design and browser checks. Route docs to
docs, UI mock-ups todesigner, and page audits tobrowser, each with its own persona and tools.
Install (Windows, macOS, Linux)
You need Python 3.11+, git, Docker, and Ollama (or any OpenAI-compatible LLM API). Pick your agent below: each has the steps, then a prompt you can paste into the agent to do the install for you.
Install the router
git clone https://github.com/maxh8086/tokenfrugal.git
cd tokenfrugal
python -m venv .venv
Activate the environment:
- Windows (PowerShell):
.venv\Scripts\Activate.ps1 - macOS / Linux:
source .venv/bin/activate
Then install and check:
pip install -r requirements.txt
cp .env.example .env # Windows: copy .env.example .env, then set TOKENFRUGAL_LLM_URL
python scripts/doctor.py # checks everything and prints the fix commands
Note the full path to the venv’s Python for the next step: .venv\Scripts\python.exe on Windows, .venv/bin/python on macOS and Linux.
Connect Claude Code
Run from inside the tokenfrugal folder, replacing the placeholder with your venv Python path:
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{ "mcpServers": { "tokenfrugal": { "type": "stdio", "command": "<path-to-venv-python>", "args": ["-m", "router.server"], "cwd": "<path-to>/tokenfrugal" } } }