Put Claude Code on Slancha — MCP delegate for research offload + ccshim that routes /v1/messages through Slancha's OSS-tier routing.
Project description
slancha-dogfood
Put Claude Code on Slancha. Two ways:
slancha-delegate— an MCP tool that any Claude Code session can install in one line. Your research-class subagent dispatches (file exploration, multi-source synthesis) route to Slancha's OSS models on your OpenRouter key instead of burning Anthropic quota.claude-slancha— a launcher that routes all of Claude Code's inference through a local Starlette shim → Slancha. Your dailyclaudesession runs on cheap OSS-tier models, the heavy turns automatically pin a strong tool-caller.
Status: v0.5.0. This is the consumption side of Slancha — the SaaS product lives in slancha-api. Both surfaces here are BYOK (Slancha holds no house keys): the Slancha key is yours, the OSS routes bill your OpenRouter account, and the funded Anthropic path billing is Slancha-side.
Cost honesty (read this first). Because both surfaces are BYOK on the OSS path, every dispatch lands on your OpenRouter dashboard. The convergence work (see numbers below) cut typical Claude Code turn costs ~71% on the OSS path, and the delegate's deep-research convergence rate is 100% on the validation prompt — but you should set an OpenRouter spend cap before installing. See
docs/CONSUMING_SLANCHA.md§ Cost expectations.
What you actually get (benched 2026-05-29, n≥10 each)
| surface | metric | result |
|---|---|---|
claude-slancha (ccshim) |
input cost vs unswapped default | ~71% cheaper ($1.74 → ~$0.50 per Mtok input on most turns) |
claude-slancha (ccshim) |
per-turn prefill weight | ~halved (tool-defs were 66% of a turn; MCP-strip drops ~98 unused tools) |
slancha-delegate (deep Cat C synth) |
convergence rate on Slancha | 100% (was 30% before this session's work) |
slancha-delegate (deep Cat C synth) |
mean wall-clock per dispatch | ~172s (down from ~322s baseline) |
Source: SESSION_LOG_2026_05_27_CLAUDE_SLANCHA_EMPTY_FIX.md at repo root. Method: kimi-k2.6 @ 200k budget, fixed Cat C prompt, env-controlled arms, scripts/bench_convergence.py.
Install — 5 minutes
Prerequisites
- Mac or Linux, Python 3.12+,
uv(orpipx). - Claude Code installed (
claudeon PATH). - A Slancha API key —
SLANCHA_API_KEY. - An OpenRouter API key — Slancha is BYOK; OSS-tier routes use yours. Set a spend cap on it at https://openrouter.ai/settings before continuing.
Option A — just the slancha-delegate MCP tool
This is the lighter install. Your existing Claude Code keeps using Anthropic; only research-class subagent dispatches offload to Slancha.
uv tool install slancha-dogfood # or: pipx install slancha-dogfood
claude mcp add slancha-delegate -- slancha-delegate-mcp
Then in any Claude Code session, ask it to run a research task — it should call mcp__slancha-delegate__slancha_delegate instead of spawning an Agent subagent.
Option B — full claude-slancha (CC on Slancha)
This routes all of Claude Code's inference through Slancha. Heavier setup; cheaper running cost.
uv tool install slancha-dogfood
# Run the shim in one terminal (it must stay up):
slancha-ccshim
# In another terminal:
claude-slancha
For long-running use, install the shim under launchd — see docs/CCSHIM.md.
Configuration
Both surfaces read from ~/.slancha-test/.env or env vars:
SLANCHA_API_KEY=sk-slancha-...
OPENROUTER_API_KEY=sk-or-v1-...
For the full env-knob list (model tier overrides, tool-strip allowlist, sampling temperature, convergence thresholds), see docs/CONSUMING_SLANCHA.md.
Verify it's working
# slancha-delegate (MCP) — your usage log should show successes routed to Slancha:
slancha-delegate-mcp --help # confirms the entry point exists
python -m slancha_dogfood.usage_log # after a few dispatches, shows route= / cost_usd / by_employee
# claude-slancha (shim) — health probe + a one-turn smoke test:
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8787/ # -> 200
claude-slancha -p "say hi"
Docs map
docs/CONSUMING_SLANCHA.md— long-form setup, every env knob, the bench numbers in full, how to override defaults per task.docs/CCSHIM.md— shim internals, the launchd plist, theSLANCHA_CC_*knobs in depth.docs/blog-claude-code-on-slancha.md— narrative example: a real CC session running on Slancha, what it cost, what it shipped.SESSION_LOG_2026_05_27_CLAUDE_SLANCHA_EMPTY_FIX.md— engineering log: the empties fix, the cost-incident diagnoses, the convergence A/B → 100%.
Development
git clone https://github.com/SlanchaAi/slancha-dogfood
cd slancha-dogfood
uv venv && source .venv/bin/activate
uv pip install -e ".[dev,ccshim]"
pytest -q # 73 tests, all green
uv run ruff check # lint
What this is not
This repo is consumption-side tooling for Slancha. It is not the Slancha product itself (that's slancha-api), not an agent framework, and not a hosted service. Non-Claude-Code clients (Cursor, Aider, …) are out of scope for now.
License
See LICENSE (or contact the maintainer — Slancha is currently private-source).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slancha_dogfood-0.5.3.tar.gz.
File metadata
- Download URL: slancha_dogfood-0.5.3.tar.gz
- Upload date:
- Size: 235.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e80aafbdc3367251a80d77a520e4d5ee953beed296e4b9112694eec4d5cfaa7d
|
|
| MD5 |
44153c1a957035cce75dbec566ad45ba
|
|
| BLAKE2b-256 |
e9168979d4dd818d008ba7280bbc446c350c399c578f4765bbd54c6014b9783d
|
File details
Details for the file slancha_dogfood-0.5.3-py3-none-any.whl.
File metadata
- Download URL: slancha_dogfood-0.5.3-py3-none-any.whl
- Upload date:
- Size: 56.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad4ef77a0766bb3a0415828dca16a42635d5d0ebe8ef993b89f9606e70d96305
|
|
| MD5 |
6e82c1498c7de41974d7cba81748e106
|
|
| BLAKE2b-256 |
75adcef48634d63a0d9e0b046b8e2f78e77ad1b5fae44b3e7c146e847ce621f8
|