OpenClaw Model Router MCP

OpenClaw Model Router MCP

Routes model requests to Sol, Terra, or Luna via OpenClaw Gateway's Codex auth profile, with strict validation and no fallback.

Category
Visit Server

README

OpenClaw Model Router MCP

日本語

An OpenClaw-native MCP server that plans and, when explicitly enabled by the operator, executes bounded task routing across Sol, Terra, and Luna while keeping final judgment, memory, verification, and responsibility with Sol.

Version 0.4.0-rc.11 is a public release candidate. Execution remains disabled by default.

Sol, Terra, and Luna routing and reference allocation

What it does

  • Sol owns architecture, risk decisions, context, memory, result collection, final QC, and responsibility.
  • Terra is intended for general work, drafting, and organization.
  • Luna is intended for routine tasks, short copy, and classification.
  • Terra and Luna results return to Sol for verification; they do not independently own the final answer.
  • Server-side safety gates may keep work on Sol or require approval, but cannot weaken the policy chosen by the operator.

The reference workload mix shown above is Sol 25% / Terra 45% / Luna 30%. Under the diagram's stated assumptions, that mix is estimated at 63.5% of the Sol-only reference cost, or approximately 36.5% lower. This is an illustrative estimate, not a pricing or usage-limit guarantee. Actual availability, limits, token use, and pricing may differ.

The allocation and savings estimate describe the intended execution mode only when the operator explicitly enables execution. With the default configuration, execute_task is hidden and disabled, so installing the package alone does not produce that allocation or savings.

Safety and authentication model

The router uses the OpenClaw Gateway's existing Codex auth profile. It never accepts provider credentials, never sends provider HTTP requests itself, and never falls back to another transport.

The adapter invokes openclaw agent through the running Gateway and verifies all of the following before accepting output:

  • provider/model match the requested Sol, Terra, or Luna model;
  • agentHarnessId=codex and authMode=auth-profile;
  • no model fallback was used;
  • the dedicated agent tool policy contains no tool other than sessions_yield;
  • OpenClaw returned measured token usage.

If any check fails, the router stops. There is no alternate provider path.

Requirements

  • Node.js 20 or newer.
  • OpenClaw 2026.6.10 or newer with working Codex authentication.
  • A dedicated OpenClaw agent with only the harmless sessions_yield tool available. On OpenClaw 2026.6.10, explicitly set tools.deny=["session_status"] because the read-only core tool is otherwise auto-exposed.
  • MODEL_ROUTER_OPENCLAW_AGENT set to that agent id.
  • No provider credential is required by this package.

Install

npm install -g openclaw-model-router-mcp@next

Or run it without a global install:

npx openclaw-model-router-mcp@next

Local checks and CLI

npm run check
npm test
openclaw-model-router-cli estimate "Draft a safe implementation plan"
MODEL_ROUTER_OPENCLAW_AGENT=model-router openclaw-model-router-cli plan "Draft a safe implementation plan"

estimate_task is deterministic and does not invoke a model. plan_task invokes Sol through OpenClaw but never executes planned subtasks. execute_task remains hidden and disabled by default; a client request cannot enable it.

Usage and accounting

OpenClaw is the source of truth for the executed model and token usage. USD fields are explicitly labeled configured reference estimates and are never presented as invoices or actual billing.

The routing fields and the model IDs passed to openclaw agent use the configured OpenClaw model IDs openai/gpt-5.6-*. The adapter still requires the Codex harness and an OpenClaw auth profile in the returned runtime metadata; it never falls back to a direct provider call or API key.

Release status

This package uses the npm next dist-tag because it is a release candidate. Review the safety model and test it in an isolated OpenClaw agent before enabling execution.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured