bayze-mcp is a local-first open-source AI model routing core designed to let users orchestrate models from multiple AI providers through a unified configuration to complete collaborative content generation and review. The project is distributed as the npm package bayze-mcp, with the command bayze, requires Node.js ≥ 22 LTS, is developed in TypeScript (strict), and is licensed under MIT.
Purpose and positioning: The project targets developers and advanced users who need cross-vendor model collaboration, structured review, and auditable processes. It connects via MCP stdio to MCP-supporting clients such as Claude Desktop, Cursor, and Cherry Studio, enabling AI assistants to invoke workflows.
Main capabilities:
- Five collaboration strategies: waterfall (waterfall workflow, draft→mandatory structured review→revision on demand), parallel (multi-model parallel comparison, with an optional judge automatically selecting the best), moa (multi-model aggregation), debate (two-model debate + adjudication, suitable for analysis and decision-making tasks), and revision loops. The example configuration includes 10 workflows, and multiple workflows of the same strategy can coexist.
- Structured review enhancements: supports review_schema output of a claims_checked item-by-item verification checklist; the waterfall revision loop can configure max_revisions and escalate_to for strong-model fallback; the review prompt has a built-in four-item scoring rubric.
- Multi-model collaboration enhancements: parallel mode can configure a judge to automatically select the best and returns an agreement metric (the degree to which multi-model answers corroborate each other, with zero extra calls).
- Local OpenAI-compatible API: provides a localhost OpenAI-compatible endpoint, including SSE streaming and a Web UI dashboard.
- Human approval threshold: an optional approval_threshold_usd configuration requires human approval when the cost exceeds the threshold.
- Three MCP tools: list_workflows, run_workflow (long tasks with step-level progress notifications, cancellable), get_run_summary.
Usage:
- New users can complete configuration via the bayze init interactive wizard: select a provider, paste the Key, automatically generate the configuration and .env, validate, and output the Cherry Studio registration JSON.
- Keys are referenced only via environment variables (env: references); the configuration declares kind: openai-compatible, kind: anthropic, or kind: gemini, and sets api_key_ref.
- Supports BYOK mode (users bring their own model credentials) and Bayze unified API mode (mode: bayze_api, with base_url fixed to https://app.lanwealth.com/v1,OpenAI compatible). The unified API mode requires registration/login to obtain an API Key (starting with lw-); requests are forwarded via the Bayze server to the actual provider, usage-based billing is subject to the platform bill, and when the balance is insufficient a 402 is returned and mapped to insufficient_balance. The two modes can coexist in the same configuration.
- The example configuration uses a mock provider to exercise all paths; real provider adapters have been delivered with contract-level support.
Applicable scenarios: cross-vendor model review (e.g., DeepSeek drafting → Tongyi review → Volcano Ark revision), multi-model answer comparison and selection, analytical decision-making debates, and content generation workflows that require structured review and auditable records.
Limitations and caveats:
- Review workflows are not recommended for simple tasks; they may cost 3-10 times more and take 2-5 times longer, with limited quality improvement.
- Word counts from review models are systematically inaccurate (measured deviations of 11-38 characters); word-count compliance should be based on the engine's deterministic checks.
- The Bayze API channel is 3-5 times slower than direct BYOK connections (one extra gateway hop).
- All prices in the example configuration are placeholder data pending verification; model pricing must be verified from the official pricing pages.
- Cross-vendor review cannot catch errors in shared source materials; the source in claims_checked is self-reported by the reviewer and is not a factual guarantee.
- Items pending manual acceptance include real client registration verification and actual testing on Linux/Windows platforms.
- By default there is no telemetry, no cloud components, and no local listening; when using the unified API mode, requests are forwarded through the server.
Project status: All P0 phases (0-5) + P1 + the main body of P2 are complete, all 144 tests pass, npm audit reports 0 vulnerabilities, clean-install reproducibility via npm ci passes, and real-provider online integration testing passed on 2026-11-03 (mainland China to cross-vendor).