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.2.tar.gz (235.7 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.2-py3-none-any.whl (55.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slancha_dogfood-0.5.2.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

Hashes for slancha_dogfood-0.5.2.tar.gz
Algorithm Hash digest
SHA256 5eb89d3b67b5077fb8d9b9b89a3aa090b30b2e1f2b85c93e99ebedd0cb487c07
MD5 32d3e0e2b3a23931c2032a5b169559de
BLAKE2b-256 0be63723b90cbcea9b487f05764cd3cdadb7ebd8ce5471ef737a2d62f8b26067

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slancha_dogfood-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 55.5 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4fcfd17e96aa378707469a106c6ab36671b5ea097a0fb3f6a48de78112204e5e
MD5 609bda86f47a75a3beee554d6573113d
BLAKE2b-256 720ac45ef9b79bef15b2371575abccdcdd254c45479735de6dac28e5f292971e

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