mcp · lakecode + claude

Claude plans the work. lakecode remembers it.

Claude Code is a great coding agent — and it starts every session cold, planning its own context from scratch. One install plugs it into lakecode's governed substrate over MCP: grounded answers out of your org's memory, findings back into it. Same Claude — now it remembers.

Prefer email? Reach the founder directly.

Local mode ships today; the hosted endpoint is rolling out to beta orgs — the bundle is installed with you at onboarding.

zsh
~/payments-api on ⎇ main
claude mcp add lakecode --transport http https://engine.lakecode.ai/mcp
8 tools at init · Bearer lk_ · tenant-scoped
 
~/payments-api on ⎇ main
lakecode mcp install # policy + prefetch hook
CLAUDE.md policy snippet written
prefetch hook registered
grounded from the first turn
best friends since mcp add
claude + lakecode, mid-session

Read grounded. Do the work. Write it back.

Inside a normal Claude Code session, the substrate is just there. Claude pulls cited org knowledge before it edits, and records what it learns when it's done — without you pasting a thing.

claude code · payments-api
claude "fix the checkout 500s during retry storms"
 
↳ lakecode query_substrate("retry storm · checkout 500")
← 2 claims · payments-api
retries must use idempotency keys — conf 0.92 · reviewed
outbound User-Agent required — INC-4471 · conf 0.95
 
grounded — applying idempotent-key-only retries + the gateway header
edited client.ts, gateway.ts · tests green
 
↳ lakecode record_finding("retries must carry an idempotency key")
proposed · gated (dedup 0.90) · attributed to claude-code · → review queue

The same claims your engineers cite in the console — read by Claude over MCP, and written back through the same governance. Nothing it records becomes org truth until a human approves it.

dynamic workflows

Fan out a dozen agents. Each reads warm — and writes memory.

Claude Code runs dynamic, multi-agent workflows — a dozen sub-agents auditing, migrating, or researching in parallel. Cold, every one re-derives the same context from scratch; warm, each reads it straight from the substrate — so the saving lands on every agent and scales with how wide you fan out. And the work doesn't evaporate into a transcript: each agent's output is already in the substrate's shape — entity, claim, evidence, confidence, source — so it ingests as-is, deduped and gated. The wider you fan out, the more you save and the more you bank.

claude · workflowagent · authagent · gatewayagent · sessionsagent · billingsubstrateclaims · entitiesprovenance

what each agent emits

entitypayments.gatewayclaimretries are idempotent-key onlyevidenceINC-4471confidence0.95sourcesession #412

↓ ingests as-is · deduped · gated · governed

Most agents leave a transcript or a diff you have to mine later. A lakecode workflow emits findings already in the substrate's shape — so the work is the memory.

Per session, a warm substrate runs ~22–26% fewer tool calls than cold; across a fan-out, that saving lands once per agent. Writes still clear the same dedup-and-gate path, so memory compounds instead of flooding — see the efficiency benchmark.

the bundle, not a checkbox

Three pieces make Claude reach for org memory.

Bare availability isn't adoption: without the policy snippet, models elect to read the substrate 0% of the time. mcp add alone is a checkbox — the bundle is what gets Claude grounded.

1 · the server

claude mcp add over streamable HTTP with a Bearer lk_ key. 20 tools local, an 8-tool sidecar cut hosted — available at init, tenant-scoped reads and writes.

reachability probe: all-green incl. headless/cron · remote smoke: auth 401, catalog, tenant isolation · 2026-06

2 · the policy snippet

One block in your CLAUDE.md. It's the reads lever: unprompted substrate election goes from 0% → 91% — Claude starts checking org memory because it decided to, not because you pasted context.

election re-probe (H4) · 2026-06 · model-pinned: fable

3 · the prefetch hook

Tool election happens mid-turn — after Claude has already started deciding. The hook injects grounding before that: a guaranteed grounded first turn, covering cold starts, the pre-decision window, and turns where it never elects.

Tier-1 analog: −22% tool calls at identical correctness · 2026-06-04 · CC-specific validation (P1/P2) pre-registered, pending

4 · later · the stop-hook

A write floor for cold-start users and abruptly-ended sessions. Deliberately demoted on the data: real multi-turn Claude sessions already record routinely — 109 records across the dogfood window without it.

re-scoped down by the election addendum · 2026-06-10

the write path

What Claude learns flows back — gated, attributed, reviewable.

Claude doesn't just read org memory. What it discovers in a session goes back into the substrate — through the same governance as every other write.

Gated.

Every write clears the G1–G5 gates: 0.90 dedup on both write paths, rate caps, evidence-keyed confidence. The substrate stays squeaky-clean — junk doesn't pile up just because an agent got chatty.

Attributed & isolated.

Contributor and client attribution on every write (Claude's writes land as claude-code), inside lk_ tenant namespaces — cross-tenant isolation smoked end-to-end.

Durable & reviewable.

Retry → dead-letter → redrive: a spooled write is an accepted write, never silently lost. Everything lands in the console's review queue with its provenance.

proof · measured on claude

Same Claude, grounded — and cheaper.

The pairing is measured, not asserted. Pinned to the model, dated, with the caveats attached.

6/6 = 6/6

Coding parity with Claude Code — bug-fixes byte-identical. lakecode adds memory, not regressions.

coding-bench v1 · 2026-06 · same model both arms · small generic fixture, n=1 per task

−27% cost

~22–26% fewer tool calls at identical correctness, warm vs cold substrate — a grounded Claude does less flailing.

auto-prime + write-back A/Bs · 2026-06-04 · claude-sonnet-4-6 both arms · execution-bound tasks

Claude Code gets the full bundle today — server + CLAUDE.md snippet + prefetch hook. Anything else that speaks MCP (Cursor, headless/cron) can read the substrate too, but how well each uses injected grounding is unmeasured until the pre-registered P1/P2 and head-to-head runs land. Bearer lk_ covers Claude Code today; OAuth for web connectors is v1.