offload-mcp
README.md
# offload-mcp ๐ชถ
๐ฉ๐ช [Deutsche Anleitung](README.de.md) ยท โญ If this saves you tokens, please star the repo!
**Stretch your Claude limits.** An MCP server that lets Claude Desktop / Claude Code hand bulky, routine work to **free LLM APIs** โ Groq, Google Gemini, Cerebras, Mistral, NVIDIA NIM, OpenRouter โ and read back only the short result.
- ๐ **`offload_files`** โ "summarize this 8 MB log" โ the file goes to Gemini, Claude only sees the 20-line answer. *This is where most tokens are saved.*
- โ๏ธ **`offload`** โ drafts, translations, boilerplate, simple code.
- ๐ **`offload_batch`** โ the same instruction over 50 items in parallel.
- ๐ **`list_providers`** โ what's configured.
- ๐ฐ **`savings_report`** โ Claude tokens saved, per session and all-time.
- ๐ Automatic fallback: provider rate-limited? Next one takes over.
- ๐ Self-healing models: if a provider retires a model, offload-mcp finds a current free one automatically.
- ๐ฆ **Zero dependencies.** Node โฅ 18, that's it.
- ๐ Messages in your system language (English, German โ more welcome).
## See what it brings ๐ฐ
Every offloaded task ends with a savings line, and Claude shows it to you:
```
Summary: 3 errors found in auth.log (lines 812, 1440, 2977) โฆ
โ via gemini/gemini-2.5-flash
๐ฐ this call: ~11,723 ยท session: ~18,402 ยท total: ~240,118 Claude tokens (โ $3.60)
```
Ask Claude *"how much has offload saved me?"* for a full report. The all-time counter is stored in `~/.offload-mcp/stats.json`.
## How it saves tokens
Without it, Claude reads a 100k-token file into its context. With it, a free model reads the file and Claude gets a ~500-token answer. Your Claude usage goes to *thinking*, not to *reading*.
## โก Quick setup (1 command)
Requires [Node.js](https://nodejs.org). Open a terminal (Windows: `cmd`) and run:
```bash
npx -y github:ok6416411-source/offload-mcp setup
```
A window opens in your browser โ paste your free API keys โ **Save**. Restart Claude Desktop. Done.
(Claude Code is configured automatically too, if installed.)
Or just tell Claude Code: *"Run `npx -y github:ok6416411-source/offload-mcp setup` for me."*
## Manual setup
### 1. Get at least one free API key
| Provider | Get a key | Good at |
|---|---|---|
| Groq | https://console.groq.com/keys | very fast |
| Google Gemini | https://aistudio.google.com/apikey | huge context (whole files) |
| Cerebras | https://cloud.cerebras.ai | very fast |
| Mistral | https://console.mistral.ai/api-keys | multilingual |
| NVIDIA NIM | https://build.nvidia.com | many open models |
| OpenRouter | https://openrouter.ai/keys | many `:free` models |
More keys = more free capacity and better fallback. Free-tier limits are set by each provider and change over time.
### 2. Add to Claude Desktop
Open *Settings โ Developer โ Edit Config* (`claude_desktop_config.json`):
```json
{
"mcpServers": {
"offload": {
"command": "npx",
"args": ["-y", "github:ok6416411-source/offload-mcp"],
"env": {
"GEMINI_API_KEY": "...",
"GROQ_API_KEY": "..."
}
}
}
}
```
Restart Claude Desktop. Ask: *"list your offload providers"*.
**Claude Code:** `claude mcp add offload -e GEMINI_API_KEY=... -- npx -y github:ok6416411-source/offload-mcp`
### 3. Tell Claude to use it (optional but recommended)
Add to your project instructions / `CLAUDE.md`:
> For large files, logs or bulk text tasks, use the offload tools instead of reading content yourself.
## Configuration
| Env var | Effect |
|---|---|
| `OFFLOAD_ORDER` | Provider priority, e.g. `gemini,groq,cerebras` |
| `OFFLOAD_<ID>_MODEL` | Override a model, e.g. `OFFLOAD_GROQ_MODEL=...` |
| `OFFLOAD_MAX_FILE_CHARS` | Cap for `offload_files` input (default 400000) |
| `OFFLOAD_LANG` | Message language (`en`, `de`). Default: your system language |
| `OFFLOAD_NO_STAR=1` | Hide the one-time โญ reminder |
## Honest notes
- Free models are weaker than Claude. Offload *grunt work*, keep reasoning with Claude.
- Files you offload are sent to that provider. Don't offload secrets; check each provider's data policy (some free tiers may use data for training).
- Respect each provider's terms โ one account per provider, no key farming.
## Development
```bash
npm test
```
PRs welcome โ especially new providers (any OpenAI-compatible endpoint is a ~8-line addition in `src/providers.js`).
## License
MIT
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues