Browse Source

feat(config): grant orchestrator all MCPs by default (#241)

Alvin 1 week ago
parent
commit
8ea3d08bbe

+ 2 - 2
docs/mcps.md

@@ -18,7 +18,7 @@ Built-in Model Context Protocol (MCP) servers ship with oh-my-opencode-slim and
 
 | Agent | Default MCPs |
 |-------|-------------|
-| `orchestrator` | `websearch` |
+| `orchestrator` | `*` |
 | `librarian` | `websearch`, `context7`, `grep_app` |
 | `designer` | none |
 | `oracle` | none |
@@ -53,7 +53,7 @@ Control which MCPs each agent can use via the `mcps` array in your preset config
   "presets": {
     "my-preset": {
       "orchestrator": {
-        "mcps": ["websearch"]
+        "mcps": ["*"]
       },
       "librarian": {
         "mcps": ["websearch", "context7", "grep_app"]

+ 5 - 5
docs/provider-configurations.md

@@ -15,7 +15,7 @@ The installer generates this configuration automatically:
   "preset": "openai",
   "presets": {
     "openai": {
-      "orchestrator": { "model": "openai/gpt-5.4", "variant": "high", "skills": ["*"], "mcps": ["websearch"] },
+      "orchestrator": { "model": "openai/gpt-5.4", "variant": "high", "skills": ["*"], "mcps": ["*"] },
       "oracle": { "model": "openai/gpt-5.4", "variant": "high", "skills": [], "mcps": [] },
       "librarian": { "model": "openai/gpt-5.4-mini", "variant": "low", "skills": [], "mcps": ["websearch", "context7", "grep_app"] },
       "explorer": { "model": "openai/gpt-5.4-mini", "variant": "low", "skills": [], "mcps": [] },
@@ -35,7 +35,7 @@ To use Kimi, add a `kimi` preset and set it as active:
   "preset": "kimi",
   "presets": {
     "kimi": {
-      "orchestrator": { "model": "kimi-for-coding/k2p5", "variant": "high", "skills": ["*"], "mcps": ["websearch"] },
+      "orchestrator": { "model": "kimi-for-coding/k2p5", "variant": "high", "skills": ["*"], "mcps": ["*"] },
       "oracle": { "model": "kimi-for-coding/k2p5", "variant": "high", "skills": [], "mcps": [] },
       "librarian": { "model": "kimi-for-coding/k2p5", "variant": "low", "skills": [], "mcps": ["websearch", "context7", "grep_app"] },
       "explorer": { "model": "kimi-for-coding/k2p5", "variant": "low", "skills": [], "mcps": [] },
@@ -61,7 +61,7 @@ To use GitHub Copilot with Grok Code Fast:
   "preset": "copilot",
   "presets": {
     "copilot": {
-      "orchestrator": { "model": "github-copilot/claude-opus-4.6", "variant": "high", "skills": ["*"], "mcps": ["websearch"] },
+      "orchestrator": { "model": "github-copilot/claude-opus-4.6", "variant": "high", "skills": ["*"], "mcps": ["*"] },
       "oracle": { "model": "github-copilot/claude-opus-4.6", "variant": "high", "skills": [], "mcps": [] },
       "librarian": { "model": "github-copilot/grok-code-fast-1", "variant": "low", "skills": [], "mcps": ["websearch", "context7", "grep_app"] },
       "explorer": { "model": "github-copilot/grok-code-fast-1", "variant": "low", "skills": [], "mcps": [] },
@@ -87,7 +87,7 @@ To use ZAI Coding Plan with GLM 5:
   "preset": "zai-plan",
   "presets": {
     "zai-plan": {
-      "orchestrator": { "model": "zai-coding-plan/glm-5", "variant": "high", "skills": ["*"], "mcps": ["websearch"] },
+      "orchestrator": { "model": "zai-coding-plan/glm-5", "variant": "high", "skills": ["*"], "mcps": ["*"] },
       "oracle": { "model": "zai-coding-plan/glm-5", "variant": "high", "skills": [], "mcps": [] },
       "librarian": { "model": "zai-coding-plan/glm-5", "variant": "low", "skills": [], "mcps": ["websearch", "context7", "grep_app"] },
       "explorer": { "model": "zai-coding-plan/glm-5", "variant": "low", "skills": [], "mcps": [] },
@@ -113,7 +113,7 @@ You can mix models from different providers across agents. Create a custom prese
   "preset": "my-mix",
   "presets": {
     "my-mix": {
-      "orchestrator": { "model": "openai/gpt-5.4", "skills": ["*"], "mcps": ["websearch"] },
+      "orchestrator": { "model": "openai/gpt-5.4", "skills": ["*"], "mcps": ["*"] },
       "oracle": { "model": "openai/gpt-5.4", "variant": "high", "skills": [], "mcps": [] },
       "librarian": { "model": "kimi-for-coding/k2p5", "variant": "low", "skills": [], "mcps": ["websearch", "context7", "grep_app"] },
       "explorer": { "model": "github-copilot/grok-code-fast-1", "variant": "low", "skills": [], "mcps": [] },

+ 1 - 1
src/cli/providers.test.ts

@@ -98,7 +98,7 @@ describe('providers', () => {
     });
 
     const agents = (config.presets as any).openai;
-    expect(agents.orchestrator.mcps).toContain('websearch');
+    expect(agents.orchestrator.mcps).toContain('*');
     expect(agents.librarian.mcps).toContain('websearch');
     expect(agents.librarian.mcps).toContain('context7');
     expect(agents.librarian.mcps).toContain('grep_app');

+ 12 - 1
src/config/agent-mcps.test.ts

@@ -1,5 +1,5 @@
 import { describe, expect, test } from 'bun:test';
-import { parseList } from './agent-mcps';
+import { DEFAULT_AGENT_MCPS, parseList } from './agent-mcps';
 
 describe('parseList', () => {
   test('empty list returns empty array', () => {
@@ -14,6 +14,17 @@ describe('parseList', () => {
     ]);
   });
 
+  test('orchestrator wildcard includes custom mcps too', () => {
+    expect(
+      parseList(DEFAULT_AGENT_MCPS.orchestrator, [
+        'websearch',
+        'context7',
+        'grep_app',
+        'custom-mcp',
+      ]),
+    ).toEqual(['websearch', 'context7', 'grep_app', 'custom-mcp']);
+  });
+
   test('wildcard with exclusions', () => {
     expect(parseList(['*', '!mcp2'], ['mcp1', 'mcp2', 'mcp3'])).toEqual([
       'mcp1',

+ 1 - 1
src/config/agent-mcps.ts

@@ -8,7 +8,7 @@ import {
 /** Default MCPs per agent - "*" means all MCPs, "!item" excludes specific MCPs */
 
 export const DEFAULT_AGENT_MCPS: Record<AgentName, string[]> = {
-  orchestrator: ['websearch'],
+  orchestrator: ['*'],
   designer: [],
   oracle: [],
   librarian: ['websearch', 'context7', 'grep_app'],