Five minutes from zero to your coding agent calling lettuce — no CLI, no
local setup.
1. Sign up
Create an account at
uselettuce.dev/signup with
email + password. The first person to sign in owns a new account; invite
teammates later from the Team page.
2. Generate an API key
API keys (cwz_…) are what your coding agents present to lettuce — one
per agent / machine / teammate is fine.
Click New key
Give it a recognisable name — e.g. claude-code-macbook or
cursor-work-laptop.
Copy the key
The full cwz_… value is shown once, right after you create it.
Copy it into your password manager now — you cannot retrieve it later.
Keys are stored hashed. A lost key cannot be recovered — revoke it from
the same page and create a new one.
3. Add a repo
Open uselettuce.dev/repos,
click Add repo, give it a name and a git URL.
Name: my-repo
Git URL: https://github.com/you/repo.git
Status moves pending → ready — usually within a minute. After that,
the repo stays current automatically when you push.
Public repos only for now. Private-repo support is on the roadmap.
4. Connect your agent
Pick the snippet for the agent you use. All point at the same endpoint,
https://diet.uselettuce.dev/mcp, with your cwz_… key in the
Authorization header.
Claude Code
claude mcp add --transport http lettuce https://diet.uselettuce.dev/mcp \
--header "Authorization: Bearer cwz_<your-key>"
Cursor
Save to .cursor/mcp.json in your project (or ~/.cursor/mcp.json
globally):
{
"mcpServers": {
"lettuce": {
"url": "https://diet.uselettuce.dev/mcp",
"headers": { "Authorization": "Bearer cwz_<your-key>" }
}
}
}
Full per-agent details (VS Code, Windsurf, Cline, mcp-remote) on the
Connect your agent page.
5. Tell the agent to use it
Agents won’t reach for a new tool unprompted. Drop this into the repo’s
CLAUDE.md (or your agent’s equivalent system prompt). This is the exact
protocol Lettuce is benchmarked with — the discipline is what makes the
graph save tokens instead of doubling them:
# Codebase navigation — use the Lettuce MCP
This repo is indexed by Lettuce. For any "where is X / how does Y work /
who calls Z" question, use the Lettuce MCP instead of grepping.
1. Call `mcp__lettuce__understand(task='<the question>', repo='<repo>')`
ONCE. It returns ranked candidate symbols with code, top caller/callee,
docs hits, a `confidence` score, and a `next_step_hint`.
2. Branch on `next_step_hint.action`:
- `answer_now` → answer from the response. Don't grep,
don't re-read "to verify" — the code
returned is identical to what's on disk.
- `answer_or_read_snippet` → answer, unless you need one file fully —
then call `mcp__lettuce__read_snippet` ONCE.
- `read_snippet_then_answer` → call `read_snippet` ONCE on the top
candidate, then answer.
- `bail_to_grep` → the graph missed; grep with the suggested
`grep_terms`, then answer.
3. After at most 2 Lettuce calls (understand + at most one read_snippet),
answer. Re-grepping or re-reading what `understand` already returned only
adds cost, not correctness. If the graph genuinely missed it, say so
rather than chasing with grep.
The exact location per agent (CLAUDE.md, .cursor/rules,
.github/copilot-instructions.md, Windsurf rules, Cline custom
instructions, …) is on the Agent instructions
page.
Ask: “Who calls process_payment, and what would break if I rename it?”
— your agent should now call a lettuce tool to answer it.