Claude Code
Connect Memtro to Claude Code, and run Memtro on your Claude Code subscription.
Memtro and Claude Code fit together two ways: Claude Code can use Memtro's tools, and Memtro can run on your Claude Code subscription.
Memtro's tools inside Claude Code (MCP)
- Create an API key on Dashboard → API keys.
- Register Memtro as an HTTP MCP server:
claude mcp add --transport http memtro https://platform.memtro.com/api/mcp \
--header "Authorization: Bearer sk-memtro-..."
Add --scope user to make it available in every project. Check it with claude mcp list.
- In a session, ask Claude Code to use it: "Search memtro for what we decided about the Q3 launch", "Through memtro, get Help Scout ticket 2450 and check the customer's orders in the warehouse." The tools are named
mcp__memtro__memtro_search,mcp__memtro__hubspot_search, and so on.
Everything Claude Code looks up this way is anchored into Memtro's memory, and memtro_remember lets it save decisions for the rest of the team.
Running Memtro on your Claude Code subscription
Memtro can run requests through the Claude Code CLI itself, headless, authenticated with your own Claude Code token, the same way a CI job would.
- On a machine where you are signed in to Claude Code, run:
claude setup-token
- Copy the printed token (it starts with
sk-ant-oat01-). - On Dashboard → Providers open Claude Code and paste it. An Anthropic API key works there too and is billed to the API instead.
- Use these model ids:
| Model id | Runs |
|---|---|
claude-code/opus, claude-code/sonnet, claude-code/haiku, claude-code/fable | the current model of that tier, resolved by the CLI |
claude-code/claude-opus-5 (any full id) | that exact model |
auto/claude-code | complexity routing across the Claude Code ladder |
Each request is one headless claude -p run in a sandboxed container: every built-in tool is disabled, Memtro's tools are attached over MCP, text and tool activity stream back as normal. Chat mode allows eight tool turns; agent mode uses your step budget with high effort.
Anthropic's consumer terms restrict using subscription tokens outside Claude Code itself. This feature runs your own subscription through your own Memtro the way the CLI would. It is your call to make, and the Providers page says the same.
Claude Code as the agent engine for API-key models
If you use an Anthropic API key rather than a token, you can still make agent mode run through Claude Code's harness: Dashboard → Routing → Agent mode → Harness: Claude Code, or "memtro": {"engine": "claude-code"} per request. Requests with client-declared tools fall back to the native engine.
Troubleshooting
- invalid x-api-key: you pasted a Claude Code token under Anthropic. Tokens belong under the Claude Code provider; Anthropic takes Console keys (
sk-ant-api03-…). - Claude Code is not available on this server: the engine is temporarily unavailable; retry or use an
anthropic/*model with an API key.