MarkDB
Connect a client

Claude Code

Route Anthropic's Claude Code through MarkDB.

Claude Code speaks the Anthropic Messages API and lets you override its endpoint with ANTHROPIC_BASE_URL. MarkDB serves /v1/messages and dispatches it natively to any provider, so you can run Claude Code against Gemini.

Claude Code anchors its sessions to the project directory you launch it from. Match that with one MarkDB workspace per repo: mint the workspace's key and use it for both the proxy (capture) and the MCP server (recall) in that repo.

Install

npm i -g @anthropic-ai/claude-code

Configure

Set the base URL and your MarkDB key, then choose a model:

export ANTHROPIC_BASE_URL=https://proxy.markdb.cloud
export ANTHROPIC_AUTH_TOKEN=mk_live_xxx

claude -p "create hello.txt with 'hi', then read it back" \
  --model gemini-3.6-flash \
  --dangerously-skip-permissions

Models

Use a gemini-* model to consolidate spend on Gemini, or a claude-* model to route to Anthropic (requires an Anthropic credential on your account). MarkDB picks the provider from the model name.

Recall: add the MCP server to the repo

Claude Code reads a project-scoped .mcp.json from the repo root. Give it the memory tools with the same workspace key:

{
  "mcpServers": {
    "markdb": {
      "type": "http",
      "url": "https://mcp.markdb.cloud/mcp",
      "headers": { "Authorization": "Bearer mk_live_xxx" }
    }
  }
}

Don't commit your key

.mcp.json lives inside the repo. Add it to .gitignore, or keep the key in an environment variable and reference it from your shell configuration.

Verify

Run a multi-turn session (claude -p ... then claude -p --continue ...). The Work log shows the run as one chat thread, and tool calls (Write, Read and so on) are captured as discrete tool_call and tool_result events.

On this page