@zhixuan92/multi-model-agent-mcp 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +25 -20
  2. package/package.json +7 -3
package/README.md CHANGED
@@ -2,22 +2,9 @@
2
2
 
3
3
  MCP stdio server for [`multi-model-agent`](https://github.com/zhixuan312/multi-model-agent). Exposes one tool — `delegate_tasks` — that runs work in parallel across multiple LLM providers (Claude, Codex, OpenAI-compatible) and auto-routes each task to the cheapest provider that can handle it.
4
4
 
5
- ## Install
5
+ ## How it works
6
6
 
7
- ```bash
8
- # Run without installing
9
- npx @zhixuan92/multi-model-agent-mcp serve
10
-
11
- # Or install globally
12
- npm install -g @zhixuan92/multi-model-agent-mcp
13
- multi-model-agent serve
14
- ```
15
-
16
- If you plan to use `openai-compatible` providers, also install the optional peer dependencies:
17
-
18
- ```bash
19
- npm install -g @zhixuan92/multi-model-agent-mcp @openai/agents openai
20
- ```
7
+ You don't run this server yourself. Your MCP client (Claude Code, Claude Desktop, Cursor, …) spawns it over stdio whenever a session starts, using the config snippet below. No install step, no long-running process to manage — `npx` fetches the latest version on demand.
21
8
 
22
9
  Requires Node `>= 22`.
23
10
 
@@ -63,24 +50,28 @@ Provider auth:
63
50
  - **`claude`** uses `ANTHROPIC_API_KEY` if set, otherwise the local Claude auth flow
64
51
  - **`openai-compatible`** uses `apiKeyEnv` (preferred) or inline `apiKey`
65
52
 
66
- ## Register with an MCP client
53
+ ## Setup
67
54
 
68
55
  ### Claude Code
69
56
 
57
+ One command — the client will spawn the server on demand. Use `-s user` so the server is available in **every** project on your machine, not just the directory where you ran the command:
58
+
70
59
  ```bash
71
- claude mcp add multi-model-agent -- npx @zhixuan92/multi-model-agent-mcp serve
60
+ claude mcp add multi-model-agent -s user -- npx -y @zhixuan92/multi-model-agent-mcp serve
72
61
  ```
73
62
 
74
63
  If your providers need environment variables:
75
64
 
76
65
  ```bash
77
- claude mcp add multi-model-agent \
66
+ claude mcp add multi-model-agent -s user \
78
67
  -e OPENAI_API_KEY=sk-... \
79
68
  -e ANTHROPIC_API_KEY=sk-ant-... \
80
69
  -e MINIMAX_API_KEY=... \
81
- -- npx @zhixuan92/multi-model-agent-mcp serve
70
+ -- npx -y @zhixuan92/multi-model-agent-mcp serve
82
71
  ```
83
72
 
73
+ Without `-s user`, `claude mcp add` defaults to local scope and only registers the server in the current project.
74
+
84
75
  ### Claude Desktop
85
76
 
86
77
  Add to `claude_desktop_config.json`:
@@ -90,7 +81,7 @@ Add to `claude_desktop_config.json`:
90
81
  "mcpServers": {
91
82
  "multi-model-agent": {
92
83
  "command": "npx",
93
- "args": ["@zhixuan92/multi-model-agent-mcp", "serve"],
84
+ "args": ["-y", "@zhixuan92/multi-model-agent-mcp", "serve"],
94
85
  "env": {
95
86
  "OPENAI_API_KEY": "sk-...",
96
87
  "ANTHROPIC_API_KEY": "sk-ant-...",
@@ -103,6 +94,20 @@ Add to `claude_desktop_config.json`:
103
94
 
104
95
  Restart your MCP client after changing config.
105
96
 
97
+ ## Recommended: delegation rule for Claude Code
98
+
99
+ Claude Code's native `Task` / `Agent` subagents inherit your parent session's expensive model and eat its context window. We ship a drop-in rule file that teaches Claude Code **when** to delegate work through `delegate_tasks` instead — mechanical edits go to free providers, reasoning-tier work escalates only when needed, and independent tasks run in parallel.
100
+
101
+ Install globally:
102
+
103
+ ```bash
104
+ mkdir -p ~/.claude/rules
105
+ curl -o ~/.claude/rules/multi-model-delegation.md \
106
+ https://raw.githubusercontent.com/zhixuan312/multi-model-agent/HEAD/docs/claude-code-delegation-rule.md
107
+ ```
108
+
109
+ Restart Claude Code after installing. The full rule — judgment-vs-labor principle, decision procedure, provider routing table, dispatch shape, verification, escalation ladder — lives at [`docs/claude-code-delegation-rule.md`](https://github.com/zhixuan312/multi-model-agent/blob/HEAD/docs/claude-code-delegation-rule.md). Read that file before adapting it to your own provider names.
110
+
106
111
  ## The `delegate_tasks` tool
107
112
 
108
113
  Accepts an array of tasks and runs them concurrently. Auto-routes each task by capability filter → quality tier filter → cheapest remaining provider, or pin a task to a specific provider.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhixuan92/multi-model-agent-mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "MCP server for multi-model-agent. Exposes a delegate_tasks tool that routes work to Claude, Codex, or OpenAI-compatible sub-agents based on capability, quality tier, and cost.",
@@ -23,7 +23,9 @@
23
23
  },
24
24
  "homepage": "https://github.com/zhixuan312/multi-model-agent#readme",
25
25
  "bugs": "https://github.com/zhixuan312/multi-model-agent/issues",
26
- "files": ["dist"],
26
+ "files": [
27
+ "dist"
28
+ ],
27
29
  "main": "./dist/index.js",
28
30
  "types": "./dist/index.d.ts",
29
31
  "bin": {
@@ -43,7 +45,9 @@
43
45
  "build": "tsc && chmod +x dist/cli.js",
44
46
  "prepublishOnly": "npm run build"
45
47
  },
46
- "engines": { "node": ">=22.0.0" },
48
+ "engines": {
49
+ "node": ">=22.0.0"
50
+ },
47
51
  "dependencies": {
48
52
  "@zhixuan92/multi-model-agent-core": "^0.1.1",
49
53
  "@modelcontextprotocol/sdk": "^1.0.0",