bhauman / bhauman/clojure-mcp

OrcaRouter provider support for ClojureMCP

Open
#165 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Clojure
Stars
775
Forks
83
PR merge metrics
No merged PRs in 30d

Description

ClojureMCP solves a problem Clojure developers know well: generic coding assistants are unreliable at the language's structure. The project's answer is a REPL connection that repairs delimiters before evaluation, plus structure-aware editing built on parinfer, cljfmt, and clj-rewrite that targets forms by type and name instead of text matching. That is what makes an LLM trustworthy enough to edit and validate code in a live nREPL.

ClojureMCP also exposes a configurable model layer. Its agent tools — `dispatch_agent`, `architect`, `code_critique` — read the `:models` map in `.clojure-mcp/config.edn`, where a provider is an OpenAI-compatible `:base-url` plus an API key (Mistral ships exactly that way as `:provider :openai`). An extra OpenAI-compatible provider therefore means more real model choice for agent-tool users, with no new provider client to maintain.

## Proposal: add OrcaRouter as an optional provider

I'm an engineer on the OrcaRouter team, and I'd like to propose supporting [OrcaRouter](https://www.orcarouter.ai) as an optional model provider for ClojureMCP. This would not replace or alter any existing provider — the Anthropic, OpenAI, Google, and Mistral entries and their env-var keys would stay as they are. It would simply let users who want it point their model configuration at OrcaRouter.

For ClojureMCP's users, the most relevant OrcaRouter capabilities are:

- **Multiple chat and reasoning models behind one endpoint**, so agent tools can reach different models without maintaining several per-provider configs.
- **Automatic model routing with provider failover**, which matters during long `dispatch_agent` runs where a single provider outage would otherwise abort the work.
- **Usage tracking and budgets**, which keep the API charges the README warns about predictable when agent tools are used regularly.

OrcaRouter exposes an OpenAI-compatible API and uses standard API-key authentication. The expected integration point is the model-configuration path in `doc/model-configuration.md`: users would add a `:models` entry with an OrcaRouter `:base-url` and an API key via the documented `[:env "VAR"]` pattern. Nothing is implemented or tested here — this is a proposal to gauge interest before any code.

OrcaRouter is already part of the open-source LLM ecosystem, with integrations alongside projects such as goose, promptfoo, and models.dev / OpenCode.

One transparent note: OrcaRouter runs an optional open-source partner program in which approved OSS projects can receive a 5% revenue share from OrcaRouter usage attributed to their integration. Participation is not a prerequisite for integrating, and I'm happy to follow whatever disclosure or governance rules the project prefers.

You can see other open-source projects we work with at https://www.orcarouter.ai/built-with. Would ClojureMCP supporting OrcaRouter as an optional provider be of interest? If so, I'd be glad to submit an implementation PR once you approve the direction.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with doc/model-configuration.md and the existing :models configuration described there, especially the OpenAI-compatible :base-url and [:env "VAR"] patterns. Confirm how an optional OrcaRouter entry can be documented or wired without changing existing providers; done means users can configure it while current provider entries remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
ai
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.