Skip to main content

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 daily claude session 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 (or pipx).
  • Claude Code installed (claude on PATH).
  • A Slancha API keySLANCHA_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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slancha_dogfood-0.5.1.tar.gz (235.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slancha_dogfood-0.5.1-py3-none-any.whl (55.4 kB view details)

Uploaded Python 3

File details

Details for the file slancha_dogfood-0.5.1.tar.gz.

File metadata

  • Download URL: slancha_dogfood-0.5.1.tar.gz
  • Upload date:
  • Size: 235.6 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

Hashes for slancha_dogfood-0.5.1.tar.gz
Algorithm Hash digest
SHA256 c7a00539dc32e8ee20c366a4db34e9eee973ce1e67426f8e2cc917d9daee6e10
MD5 d892732975477dd511cfe79baa6d046a
BLAKE2b-256 5b74c23bf25e1410dd7f196939aeec9b260d9a3fd952f7ee8aaec4e73344728f

See more details on using hashes here.

File details

Details for the file slancha_dogfood-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: slancha_dogfood-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 55.4 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

Hashes for slancha_dogfood-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d44c2754987633d774337eaa21954660699f5e46e513049f1680eea76ba4d895
MD5 4d59c32e7ae99fb341ecb4ce64bef0a0
BLAKE2b-256 8171db6e4a5591e84d8c835c687f09c2c5b802e8cbb77fba6b9f8262d9c3f69b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page