TypnoAI
Nederlands Sign in

Claude Code

Claude Code can talk to Typno AI through the Anthropic-style API.

Anthropic does not support running Claude Code on models other than Claude. It works, but features that depend on Claude (extended thinking, prompt caching, the built-in web search) are not available, and tool use is as good as the model you pick.

Setup

Put this in ~/.claude/settings.json, or export the same variables in your shell:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://dev.typno.ai",
    "ANTHROPIC_AUTH_TOKEN": "tpk-...",
    "ANTHROPIC_MODEL": "glm5.3-754b",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm5.3-754b",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm5.3-754b",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "mistral4-119b",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  }
}
  • ANTHROPIC_AUTH_TOKEN sends the key as a bearer token. Do not also set ANTHROPIC_API_KEY.
  • The three DEFAULT_*_MODEL variables decide which model the aliases opus, sonnet and haiku use. The Haiku one also runs background tasks, so pick a cheap model there.
  • Use a model with tool support; see Models.
  • Claude Code assumes a context of 200K tokens for models it does not know. Set CLAUDE_CODE_MAX_CONTEXT_TOKENS if your model has less.

Start claude and check with /status that the base address is https://dev.typno.ai.

MCP server

claude mcp add --transport http typno https://dev.typno.ai/mcp --header "Authorization: Bearer tpk-..."

In a project's .mcp.json, do not reuse ANTHROPIC_AUTH_TOKEN for the header (it is not expanded there). Use your own variable:

{
  "mcpServers": {
    "typno": {
      "type": "http",
      "url": "https://dev.typno.ai/mcp",
      "headers": { "Authorization": "Bearer ${TYPNO_API_KEY}" }
    }
  }
}