1. Conduid
  2. RAG
  3. Openclaw MCP Router
MCP server · RAG

Openclaw MCP Router

OpenClaw MCP router plugin for Model Context Protocol (MCP): semantic tool search and dynamic tool calling to reduce prompt bloat

37Low

Scored 6 months ago · breakdown

About Openclaw MCP Router

Openclaw MCP Router is an MCP server in the RAG category: openClaw MCP router plugin for Model Context Protocol (MCP): semantic tool search and dynamic tool calling to reduce prompt bloat.

Install

Claude Code
claude mcp add openclaw-mcp-router -- npx -y openclaw-mcp-router
npx
npx -y openclaw-mcp-router

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Openclaw MCP Router

Powered by Claude · Grounded in docs

I know everything about Openclaw MCP Router. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

OpenClaw MCP Router 🚀

OpenClaw MCP Router is a dynamic MCP (Model Context Protocol) tool router for OpenClaw. It uses semantic search to discover the right MCP tools at runtime, so agents avoid loading huge tool catalogs into the system prompt.

Instead of injecting every MCP schema up front, it provides two lightweight meta-tools:

  • mcp_search → discover the right tool at runtime
  • mcp_call → execute as JSON fallback

This cuts context bloat, improves tool selection quality, and reduces token cost on large MCP server inventories.


Keywords

OpenClaw plugin, MCP router, Model Context Protocol, tool discovery, semantic tool search, AI agent tooling, LanceDB, Ollama embeddings.

Why this exists

Large MCP catalogs are expensive in prompt space.

  • Token waste: tens of thousands of tokens before first user turn
  • Reasoning quality loss: "lost in the middle" on oversized prompts
  • Higher cost: more prompt tokens every turn

MCP Router applies Anthropic's tool-search pattern so only relevant tools are surfaced when needed.

Refs:


Core model

1) Index time (reindex)

  • Connect to configured MCP servers
  • List tools
  • Embed tool text
  • Store vectors in LanceDB
  • Register tool→server ownership
  • (Optional) generate CLI artifacts via mcporter generate-cli

2) Runtime (mcp_search)

  • Semantic search over indexed tools
  • Default schema verbosity is adaptive:
    • if mcporter is available: compact cards by default
    • if mcporter is not available: include JSON params by default
  • Full JSON schema can always be forced with include_schema=true

3) Execute (mcp_call)

  • JSON-based execution path (classic MCP params flow)

CLI-first behavior (new)

Router is now optimized for a CLI-first workflow:

  • Prefer: mcporter call <server>.<tool> ...
  • Fallback: mcp_call(tool_name, params_json)

mcp_search adapts to environment: compact when mcporter is present, schema-forward when it is not (so agents can drive mcp_call reliably).


Use cases

  • Route large MCP tool catalogs without prompt bloat
  • Improve tool selection for coding and automation agents
  • Keep system prompts small while preserving broad MCP capability
  • Enable CLI-first MCP execution with JSON fallback

Quick start

Prerequisites

ollama pull embeddinggemma

Install

openclaw plugins install openclaw-mcp-router

Setup + index

openclaw openclaw-mcp-router setup
openclaw openclaw-mcp-router reindex

The setup wizard auto-detects whether mcporter is installed and suggests a sensible default for mcp_search schema verbosity.


Key configuration

In ~/.openclaw/openclaw.json under plugins.entries.openclaw-mcp-router.config:

{
  "search": {
    "topK": 5,
    "minScore": 0.3
    // includeParametersDefault optional:
    // true  -> always include params
    // false -> always compact
    // unset -> auto (based on mcporter availability)
  },
  "indexer": {
    "connectTimeout": 60000,
    "maxRetries": 3,
    "initialRetryDelay": 2000,
    "maxRetryDelay": 30000,
    "maxChunkChars": 500,
    "overlapChars": 100,
    "generateCliArtifacts": false
  }
}

Notes

  • search.includeParametersDefault is optional; if omitted, router auto-decides based on mcporter availability.
  • indexer.generateCliArtifacts=true enables best-effort per-server mcporter generate-cli during reindex.
  • mcp_call stays the classic JSON meta-tool (no backend mode flag).

Server management

openclaw openclaw-mcp-router control
openclaw openclaw-mcp-router list
openclaw openclaw-mcp-router add <name> <command-or-url> [...]
openclaw openclaw-mcp-router reindex

MCPorter inspiration

Huge thanks to @steipete and mcporter for the CLI-first MCP execution model inspiration.


Documentation

  • Architecture + flow details: docs/CLI_FIRST_WORKFLOW.md
  • Plugin config schema: openclaw.plugin.json
  • Skill usage examples: skills/mcp-router/

Contributing

PRs welcome — especially around:

  • better reranking
  • hybrid retrieval (vector + lexical)

PR hygiene:

  • keep README + docs in sync for every behavior/config/workflow change
  • keep skills/ guidance in sync when user-facing behavior changes
  • run test suite before opening PR

License

MIT

GitHub SEO checklist

  • Set repo description to include: OpenClaw, MCP, Model Context Protocol, semantic search
  • Add GitHub topics (see .github/topics.txt)
  • Pin this repository on your profile if it's a flagship plugin
  • Link this repo from related blog posts, docs, and demos

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Openclaw MCP Router

How do I install Openclaw MCP Router?

Run claude mcp add openclaw-mcp-router -- npx -y openclaw-mcp-router, then add the server to your MCP client's configuration.

Is Openclaw MCP Router safe to use with an AI agent?

Its trust score is 37 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Openclaw MCP Router still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.