Anthropic Agent SDK Relay — Development skill for Claude Code
Anthropic Messages API endpoint answered by the Claude Agent SDK, so self-hosted n8n can use a Claude subscription instead of per-token API billing.
How to install Anthropic Agent SDK Relay
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open rinukkusu/anthropic-agent-sdk-relay and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Anthropic Agent SDK Relay does
Anthropic Messages API endpoint answered by the Claude Agent SDK, so self-hosted n8n can use a Claude subscription instead of per-token API billing.
Alternatives in Development
- Claude API — Build apps with the Claude API or Anthropic SDK 94.1k ★
- Anthropic SDK Python — PyPI version 3.9k ★
- Google Ads Meta Ads MCP — Google Ads MCP server + Meta Ads MCP (Facebook Ads MCP) + GA4 + Search Console in one hosted remote MCP for Cl 3.2k ★
README
anthropic-agent-sdk-relay
An Anthropic Messages API endpoint that is answered by the Claude Agent SDK instead of the Claude API, so a self-hosted n8n can use a Claude subscription rather than per-token API billing.
Point n8n's Anthropic credential at this service and the Agent node works as usual, tools included.
What it does
n8n Agent node ──POST /v1/messages──▶ relay ──▶ Claude Agent SDK ──▶ Claude
▲ │
└────── tool_use / tool_result ───┘
The interesting part is tool calling. n8n runs its own tools and expects the model to emit `tool_use` blocks; the Agent SDK does the opposite and executes tools itself. The relay closes that gap:
- Every tool the client declares is registered as an in-process MCP tool.
- When Claude calls one, the handler's promise is parked, not resolved.
- The HTTP response ends with
stop_reason: "tool_use"carrying that call. - n8n runs the tool and posts a history ending in
tool_result. - The relay matches the result to the parked promise and the same live session carries on.
Because the session stays open between requests, nothing is replayed and the agent loop never learns that a tool round-trip crossed a network boundary.
Requirements
- Bun 1.2 or newer
- A Claude Pro or Max subscription
- Claude Code credentials reachable by the process (see below)
Quick start
bun install
cp .env.example .env # set RELAY_API_KEY
bun run start
Or pull the published image, built for amd64 and arm64 on every push to `main`:
docker run --rm -p 8787:8787 --env-file .env ghcr.io/rinukkusu/anthropic-agent-sdk-relay:latest
curl http://127.0.0.1:8787/v1/messages -H "x-api-key: $RELAY_API_KEY" -H 'content-type: application/json' -d '{"model":"claude-sonnet-5","max_tokens":256,"messages":[{"role":"user","content":"pong?"}]}'
Authentication
Two separate secrets are in play.
**Callers to the relay** present `RELAY_API_KE
Related Skills
Openclaw Billing Proxy
Route OpenClaw API requests through Claude Code subscription billing instead of Extra Usage
Claude Code Relay
One-click Claude Code on any CLIProxyAPI/CliRelay gateway. Fixes the x-anthropic-billing-header 429/503, runs
Opencode Anthropic Auth Fix
One-command OpenCode fix for Anthropic subscription billing. Installs @ex-machina/opencode-anthropic-auth, pat
Claude Quota Relay
Local failover proxy for Claude Code: rotate between multiple Claude subscription accounts and transparently w
Dario
A local OpenAI- and Anthropic-compatible proxy that brings your Claude Pro/Max subscription to Cursor, Cline,
Q Agent
Self-hosted llama.cpp stack for Qwen + MTP (multi-token prediction): a 125B MoE read from ≥ 80 GB of RAM, or a
Related Agents
Funnelfox API
FunnelFox API specialist: Public API, Billing API, web SDK and webhooks, authentication, funnels, sessions, pr
Openrouter Agent
Runs a model from any of ~60 vendors through OpenRouter's OpenAI-compatible endpoint, billed per token against
Paypal Specialist
PayPal payments + billing — server client, OAuth token cache, Orders v2 checkout and capture, subscriptions, r