Noureddine RAMDI / Meridian: a local proxy bridging Claude Code SDK and Anthropic-compatible AI tools

Created Sat, 23 May 2026 20:41:14 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

rynfar/meridian

Meridian addresses a common annoyance for developers working with Claude Max’s Claude Code SDK: how to use it with third-party coding tools expecting standard Anthropic or OpenAI APIs. Instead of hacks or binary patching, Meridian acts as a local proxy that translates the native query() interface into a drop-in Anthropic-compatible API. This removes friction and unlocks compatibility with tools like OpenCode, Cline, Aider, Droid, Pi, Crush, and more.

what Meridian does and how it works

At its core, Meridian is a TypeScript-based local proxy server running on port 3456. It listens for Anthropic or OpenAI-compatible API calls and translates them into the native Claude Code SDK query() calls. This means developers can keep their existing Claude Max subscription and SDK setup, while using any third-party coding tool that expects a standard Anthropic API endpoint.

Under the hood, Meridian maintains session persistence, enabling reliable conversation continuity across requests. It supports server-sent events (SSE) streaming for real-time response delivery and concurrent subagent routing. This concurrency allows Meridian to route requests to different Claude Code subagents — for example, the sonnet and opus models — handling rate limit budgets and model selection automatically.

The proxy also manages automatic OAuth token refreshes, removing the need for manual intervention or insecure hacks. Configuration is handled through a web UI accessible at /settings, making it easier to tweak without diving into config files.

Beyond basic proxying, Meridian includes an experimental SDK feature toggle system. This exposes Claude Code features like memory, dreaming, and CLAUDE.md to any connected agent, broadening the possibilities for advanced AI coding assistants.

The project supports self-hosted and declarative deployments with a Nix flake and a Home Manager module. It also exposes Prometheus metrics for observability, which is valuable in production or multi-agent orchestration environments.

technical strengths and design tradeoffs

Meridian’s standout technical feature is its ability to act as a transparent compatibility layer, wrapping the Claude Code SDK’s documented query() method without requiring invasive OAuth interception or binary patching. This design keeps the SDK as the authoritative gatekeeper for caching, rate limits, and authentication.

The session persistence and subagent routing mechanisms indicate careful attention to real-world usage patterns where multiple models and agents must cooperate seamlessly. For instance, subagents automatically use different models with context window sizes (200k tokens for sonnet and 1M for opus) to optimize cost and performance.

The proxy’s local execution model is both a strength and a limitation. Running locally means developers retain control, security, and privacy. However, it also means the proxy must be manually set up and maintained on each machine using it. The presence of a web UI and declarative deployment options mitigates this complexity somewhat.

The codebase, being TypeScript, benefits from strong typing and modern JavaScript ecosystem tooling, improving maintainability and DX. The proxy’s integration with ecosystem tools like OpenCode and Crush through plugins and provider configurations shows practical compatibility focus.

One tradeoff is that Meridian depends heavily on the Claude Code SDK’s stability and behavior. Any breaking changes in the SDK could require updates in the proxy. Also, advanced SDK features exposed via the toggle system are experimental, so users should be cautious in production.

quick start with Meridian and OpenCode

Meridian’s README provides clear commands for setup:

# Add a profile token (paste the token from `claude setup-token`)
meridian profile add ci --oauth-token

# One-time setup to add the Meridian plugin to OpenCode
meridian setup

# Start OpenCode with Meridian acting as Anthropic API proxy
ANTHROPIC_API_KEY=x ANTHROPIC_BASE_URL=http://127.0.0.1:3456 opencode

The meridian setup command injects the Meridian plugin into OpenCode’s global config. This plugin enables session tracking, safe model defaults, and subagent model selection, ensuring that OpenCode requests route correctly to Claude Code through Meridian.

Alternatively, environment variables can be set in your shell profile for persistent use:

export ANTHROPIC_API_KEY=x
export ANTHROPIC_BASE_URL=http://127.0.0.1:3456

Meridian also supports integration with oh-my-opencagent (OMO), a multi-agent orchestration layer on top of OpenCode. Meridian detects OMO automatically and manages subagent routing and context leakage prevention.

For the Crush tool, a provider can be added to ~/.config/crush/crush.json pointing to Meridian’s local API, enabling similar proxy benefits.

verdict

Meridian is a pragmatic and well-architected solution for developers and teams using Claude Max and wanting seamless integration with third-party AI coding tools expecting Anthropic-compatible APIs. It solves a real problem without resorting to brittle OAuth hacks or binary patches.

Its local proxy architecture prioritizes control and security, while the session persistence, SSE streaming, and subagent routing features reflect practical real-world usage. The experimental feature toggles hint at future extensibility.

That said, Meridian requires some setup and maintenance, especially since it runs locally. It also depends on the Claude Code SDK’s stability and may require updates if the SDK changes significantly.

If you’re building or using advanced multi-agent AI coding workflows with Claude Max, Meridian deserves a close look. It streamlines your developer experience by bridging ecosystem gaps cleanly and transparently.


→ GitHub Repo: rynfar/meridian ⭐ 1,288 · TypeScript