Harness setup
The fastest path is the CLI, which writes the right config for you:
npx @lunaroute/cli setup <harness>Supported harnesses: pi, claude-code, opencode, openclaw, hermes,
copilot-cli, and generic (any OpenAI-compatible client).
Manual setup
Section titled “Manual setup”For any MCP client that accepts a remote server, add:
{ "mcpServers": { "lunaroute": { "url": "https://mcp.lunaroute.com/mcp", "headers": { "LUNAROUTE-API-KEY": "lr_..." } } }}Claude Code
Section titled “Claude Code”Claude Code passes custom headers via ANTHROPIC_CUSTOM_HEADERS, which is how
the LUNAROUTE-API-KEY header reaches inference. lunaroute setup claude-code
wires both the model endpoint and the MCP server.
Generic OpenAI-compatible clients
Section titled “Generic OpenAI-compatible clients”Point the client’s base URL at https://gw.lunaroute.com/v1 and set the API key
to your lr_ key. lunaroute setup generic prints the exact environment
variables, including an export LUNAROUTE_API_KEY=… line.
Unsupported harnesses
Section titled “Unsupported harnesses”Cursor and Cline can talk to any MCP server, but LunaRoute does not ship a supported setup flow for them — treat their configuration as community/unsupported. Windsurf and Continue are not supported.
If your client can only use a static bearer token for MCP, use
Authorization: Bearer lr_….