{"_id":"@ask149/mcp-orchestrator","_rev":"6-4b245f9b68bf86248fa8814b67773974","name":"@ask149/mcp-orchestrator","dist-tags":{"latest":"1.1.5"},"versions":{"1.0.0":{"name":"@ask149/mcp-orchestrator","version":"1.0.0","keywords":["mcp","copilot","orchestrator","parallel","subagents"],"author":{"name":"Ashish Kshirsagar"},"license":"MIT","_id":"@ask149/mcp-orchestrator@1.0.0","maintainers":[{"name":"ask149","email":"ashishkshirsagar10@gmail.com"}],"homepage":"https://github.com/Ask149/orchestrator#readme","bugs":{"url":"https://github.com/Ask149/orchestrator/issues"},"bin":{"mcp-orchestrator":"dist/index.js"},"dist":{"shasum":"feeaad654fecc691291cd9ac9aef1fd13135b8e1","tarball":"https://registry.npmjs.org/@ask149/mcp-orchestrator/-/mcp-orchestrator-1.0.0.tgz","fileCount":27,"integrity":"sha512-kCowTHDIemCIH13SYPXBk8RDEWHw6nvHM5hawdan3fLcJRfV1h9HfER8iEqUhv75ahwVtG9uBgC/MgxC31aPWw==","signatures":[{"sig":"MEQCID75goXAEoO4buyD1KII41ZTP/tR3QncgbWOtEHxTP10AiB5j7L9QyCMmWYZSxHkdc9Ml7qtD7dlbRb54IztWatr0w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88682},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"5342f81de22090da693800bb0de239d248a4e062","scripts":{"dev":"tsx src/index.ts","test":"jest","build":"tsc","start":"node dist/index.js","test:watch":"jest --watch","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"ask149","email":"ashishkshirsagar10@gmail.com"},"repository":{"url":"git+https://github.com/Ask149/orchestrator.git","type":"git"},"_npmVersion":"10.2.3","description":"MCP server for spawning parallel Copilot sub-agents with context passing","directories":{},"_nodeVersion":"20.10.0","dependencies":{"zod":"^3.22.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","jest":"^29.7.0","ts-jest":"^29.1.1","typescript":"^5.3.0","@types/jest":"^29.5.7","@types/node":"^20.0.0","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-orchestrator_1.0.0_1770156347752_0.34683803481341635","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@ask149/mcp-orchestrator","version":"1.1.0","keywords":["mcp","copilot","orchestrator","parallel","subagents"],"author":{"name":"Ashish Kshirsagar"},"license":"MIT","_id":"@ask149/mcp-orchestrator@1.1.0","maintainers":[{"name":"ask149","email":"ashishkshirsagar10@gmail.com"}],"homepage":"https://github.com/Ask149/orchestrator#readme","bugs":{"url":"https://github.com/Ask149/orchestrator/issues"},"bin":{"mcp-orchestrator":"dist/index.js","mcp-orchestrator-health":"dist/health.js"},"dist":{"shasum":"17556ad1f125a9ac8d876acca04bca0edf570982","tarball":"https://registry.npmjs.org/@ask149/mcp-orchestrator/-/mcp-orchestrator-1.1.0.tgz","fileCount":39,"integrity":"sha512-HmUNtjkRfb9bRBICZk+qmoMw+TBf5K3nuGrc0SeLZlMjoU9nRoe0ZpdL6H1xXGuVp2ou5HNf1u4J5c5ITE+MHw==","signatures":[{"sig":"MEYCIQDv+ESLOM1hCEwFKly2UhNjOLY6OI2/npoY/5D2RCJV/QIhAPztP6yucVmKMBSkpR+9/tHSTr1aG72to5pbRKVjohnR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":129495},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"1689d09967c0f81cd52f06657125ca9eed6549d6","scripts":{"dev":"tsx src/index.ts","test":"jest","build":"tsc","start":"node dist/index.js","health":"node dist/health.js","test:watch":"jest --watch","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"ask149","email":"ashishkshirsagar10@gmail.com"},"repository":{"url":"git+https://github.com/Ask149/orchestrator.git","type":"git"},"_npmVersion":"10.2.3","description":"MCP server for spawning parallel Copilot sub-agents with context passing","directories":{},"_nodeVersion":"20.10.0","dependencies":{"zod":"^3.22.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","jest":"^29.7.0","ts-jest":"^29.1.1","typescript":"^5.3.0","@types/jest":"^29.5.7","@types/node":"^20.0.0","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-orchestrator_1.1.0_1770173359365_0.7593305313848773","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@ask149/mcp-orchestrator","version":"1.1.2","keywords":["mcp","copilot","orchestrator","parallel","subagents"],"author":{"name":"Ashish Kshirsagar"},"license":"MIT","_id":"@ask149/mcp-orchestrator@1.1.2","maintainers":[{"name":"ask149","email":"ashishkshirsagar10@gmail.com"}],"homepage":"https://github.com/Ask149/orchestrator#readme","bugs":{"url":"https://github.com/Ask149/orchestrator/issues"},"bin":{"mcp-orchestrator":"dist/index.js","mcp-orchestrator-health":"dist/health.js"},"dist":{"shasum":"1a579442c03bfe3d9e8880bf903fbbcd1c199e98","tarball":"https://registry.npmjs.org/@ask149/mcp-orchestrator/-/mcp-orchestrator-1.1.2.tgz","fileCount":39,"integrity":"sha512-MQ+ZuaAi854lhCCfombiMhbaRX5mgsui328/CB2hQObCZ4S/IXG61tIjLNrlzwiAhyFxWSaK1AjCLxJgzfPcCA==","signatures":[{"sig":"MEUCIQChlft/tC9v+CpFMYrqVWpK4EMuPfFZt7E9v4PZwfkkdAIgR6nphisNNbtYMkRzSDSWj4LTqZLAp41BX1lFKFhHg78=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":150831},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"6ca09acb3d32fbb7c45ce024c1e1a72aeef5aac0","scripts":{"dev":"tsx src/index.ts","test":"jest","build":"tsc","start":"node dist/index.js","health":"node dist/health.js","test:watch":"jest --watch","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"ask149","email":"ashishkshirsagar10@gmail.com"},"repository":{"url":"git+https://github.com/Ask149/orchestrator.git","type":"git"},"_npmVersion":"10.2.3","description":"MCP server for spawning parallel Copilot sub-agents with context passing","directories":{},"_nodeVersion":"20.10.0","dependencies":{"zod":"^3.22.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","jest":"^29.7.0","ts-jest":"^29.1.1","typescript":"^5.3.0","@types/jest":"^29.5.7","@types/node":"^20.0.0","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-orchestrator_1.1.2_1770174960939_0.2691229730158553","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@ask149/mcp-orchestrator","version":"1.1.3","keywords":["mcp","copilot","orchestrator","parallel","subagents"],"author":{"name":"Ashish Kshirsagar"},"license":"MIT","_id":"@ask149/mcp-orchestrator@1.1.3","maintainers":[{"name":"ask149","email":"ashishkshirsagar10@gmail.com"}],"homepage":"https://github.com/Ask149/orchestrator#readme","bugs":{"url":"https://github.com/Ask149/orchestrator/issues"},"bin":{"mcp-orchestrator":"dist/index.js","mcp-orchestrator-health":"dist/health.js"},"dist":{"shasum":"1c811b73390a460edf1af40b48cdb3c834624b8b","tarball":"https://registry.npmjs.org/@ask149/mcp-orchestrator/-/mcp-orchestrator-1.1.3.tgz","fileCount":39,"integrity":"sha512-e7kFMqBdEo0LoKwSrYcVX0Zi6erQojnx2DMM0cA3b8zGctX0p95XSqe6O7eTo4O7D0vMlXoDMclTfXIui7+t5g==","signatures":[{"sig":"MEYCIQCkbW9ZanDDzf6ljBsSRLAxvjvRiJvEmph1rgU55MiViAIhAMZs1kMGIlr/fo8lLMN0b/2iG1CruGjH+heNnkZTcdXh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":163283},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"6868680c150d29098a04312c4d9929184c2d7841","scripts":{"dev":"tsx src/index.ts","test":"jest","build":"tsc","start":"node dist/index.js","health":"node dist/health.js","test:watch":"jest --watch","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"ask149","email":"ashishkshirsagar10@gmail.com"},"repository":{"url":"git+https://github.com/Ask149/orchestrator.git","type":"git"},"_npmVersion":"10.2.3","description":"MCP server for spawning parallel Copilot sub-agents with context passing","directories":{},"_nodeVersion":"20.10.0","dependencies":{"zod":"^3.22.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","jest":"^29.7.0","ts-jest":"^29.1.1","typescript":"^5.3.0","@types/jest":"^29.5.7","@types/node":"^20.0.0","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-orchestrator_1.1.3_1770511625633_0.9596129687408037","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"@ask149/mcp-orchestrator","version":"1.1.4","keywords":["mcp","copilot","orchestrator","parallel","subagents"],"author":{"name":"Ashish Kshirsagar"},"license":"MIT","_id":"@ask149/mcp-orchestrator@1.1.4","maintainers":[{"name":"ask149","email":"ashishkshirsagar10@gmail.com"}],"homepage":"https://github.com/Ask149/orchestrator#readme","bugs":{"url":"https://github.com/Ask149/orchestrator/issues"},"bin":{"mcp-orchestrator":"dist/index.js","mcp-orchestrator-health":"dist/health.js"},"dist":{"shasum":"c3e3a5c08de28786558cf2b92c058776d8c36d0b","tarball":"https://registry.npmjs.org/@ask149/mcp-orchestrator/-/mcp-orchestrator-1.1.4.tgz","fileCount":39,"integrity":"sha512-0dpC1sI3yxsvXbALoLxAtKtoSf4yWfAD+pMT68ewh0gzpSlDZ/+MHR2FJ0DNbqsCQDFQ80AqOm4mul/EERMDxA==","signatures":[{"sig":"MEUCIBJG+mSXEBLBygBkRjOHY3PlhW0+tRMa8fl1ncXJreKuAiEA3lyuxTkecY1dEty4edJ27IWCnRV3aMiVefJ4YHNmTlE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":171230},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"c2386a30db2ace1309820e11fbb50862ef072252","scripts":{"dev":"tsx src/index.ts","test":"jest","build":"tsc","start":"node dist/index.js","health":"node dist/health.js","test:watch":"jest --watch","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"ask149","email":"ashishkshirsagar10@gmail.com"},"repository":{"url":"git+https://github.com/Ask149/orchestrator.git","type":"git"},"_npmVersion":"10.2.3","description":"MCP server for spawning parallel Copilot sub-agents with context passing","directories":{},"_nodeVersion":"20.10.0","dependencies":{"zod":"^3.22.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","jest":"^29.7.0","ts-jest":"^29.1.1","typescript":"^5.3.0","@types/jest":"^29.5.7","@types/node":"^20.0.0","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-orchestrator_1.1.4_1770512815769_0.0766746643056766","host":"s3://npm-registry-packages-npm-production"}},"1.1.5":{"name":"@ask149/mcp-orchestrator","version":"1.1.5","description":"MCP server for spawning parallel Copilot sub-agents with context passing","type":"module","main":"dist/index.js","bin":{"mcp-orchestrator":"dist/index.js","mcp-orchestrator-health":"dist/health.js"},"repository":{"type":"git","url":"git+https://github.com/Ask149/orchestrator.git"},"bugs":{"url":"https://github.com/Ask149/orchestrator/issues"},"homepage":"https://github.com/Ask149/orchestrator#readme","scripts":{"build":"tsc","start":"node dist/index.js","dev":"tsx src/index.ts","health":"node dist/health.js","test":"jest","test:watch":"jest --watch","prepublishOnly":"npm run build && npm test"},"keywords":["mcp","copilot","claude","orchestrator","parallel","subagents","ai-agent","model-context-protocol","multi-agent","automation","cli","coding-agent"],"author":{"name":"Ashish Kshirsagar"},"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","zod":"^3.22.0"},"devDependencies":{"@jest/globals":"^29.7.0","@types/jest":"^29.5.7","@types/node":"^20.0.0","jest":"^29.7.0","ts-jest":"^29.1.1","tsx":"^4.7.0","typescript":"^5.3.0"},"engines":{"node":">=18.0.0"},"_id":"@ask149/mcp-orchestrator@1.1.5","gitHead":"f36953d7a38e747c58a296876a89808732904ed8","types":"./dist/index.d.ts","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-YESULiu53lpg3HoYwtg8GTMIYJEXGRyY6yT01NbFSdOMc8vFbdVLkt111sXgBR05i2V19hg/JF9P9t1IqgcUCQ==","shasum":"d19be8fb3a2b7e2376a5c877bbd1783b1db2ce0d","tarball":"https://registry.npmjs.org/@ask149/mcp-orchestrator/-/mcp-orchestrator-1.1.5.tgz","fileCount":39,"unpackedSize":181030,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICE5kgNf1C6w9yCiHLv1bfCeVNmzmGSPyD9V04ZEmnm6AiEA3vZruRwmWOnKQxRbHjwNj04t6Jn3okhgMRlhBtk32KQ="}]},"_npmUser":{"name":"ask149","email":"ashishkshirsagar10@gmail.com"},"directories":{},"maintainers":[{"name":"ask149","email":"ashishkshirsagar10@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-orchestrator_1.1.5_1770710091254_0.1761421099185434"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-03T22:05:47.552Z","modified":"2026-02-10T07:54:51.543Z","1.0.0":"2026-02-03T22:05:47.894Z","1.1.0":"2026-02-04T02:49:19.536Z","1.1.2":"2026-02-04T03:16:01.084Z","1.1.3":"2026-02-08T00:47:05.771Z","1.1.4":"2026-02-08T01:06:55.921Z","1.1.5":"2026-02-10T07:54:51.417Z"},"bugs":{"url":"https://github.com/Ask149/orchestrator/issues"},"author":{"name":"Ashish Kshirsagar"},"license":"MIT","homepage":"https://github.com/Ask149/orchestrator#readme","keywords":["mcp","copilot","claude","orchestrator","parallel","subagents","ai-agent","model-context-protocol","multi-agent","automation","cli","coding-agent"],"repository":{"type":"git","url":"git+https://github.com/Ask149/orchestrator.git"},"description":"MCP server for spawning parallel Copilot sub-agents with context passing","maintainers":[{"name":"ask149","email":"ashishkshirsagar10@gmail.com"}],"readme":"# 🐙 MCP Orchestrator\n\n[![npm version](https://img.shields.io/npm/v/@ask149/mcp-orchestrator)](https://www.npmjs.com/package/@ask149/mcp-orchestrator)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org)\n[![Twitter Follow](https://img.shields.io/twitter/follow/iodevz_ai?style=social)](https://twitter.com/iodevz_ai)\n\n> **Turn one AI agent into a team.** Cross-platform MCP server for spawning parallel sub-agents with multi-CLI backend support.\n\n<!-- TODO: Add demo GIF here -->\n<!-- ![Demo](assets/demo.gif) -->\n\n## Platform Support\n\n- **macOS** (Intel & Apple Silicon)\n- **Linux** (x86-64 & ARM64)\n- **Windows** (x64 & ARM64)\n\n**Windows setup:** See [WINDOWS_VALIDATION.md](WINDOWS_VALIDATION.md)\n\n## Features\n\n- **Multi-CLI backends** — Support for GitHub Copilot CLI and Claude Code CLI\n- **Parallel execution** — Run multiple sub-agents simultaneously\n- **Context passing** — Pass file contents (full/summary/grep) to sub-agents\n- **MCP server filtering** — Specify which MCP servers each sub-agent can use\n- **MCP Resources** — Expose logs and config as readable MCP resources\n- **Timeout handling** — Per-task and global timeouts\n- **Audit logging** — All executions logged to `~/.config/orchestrator/logs/`\n\n## Quick Demo\n\n**Spawn 3 parallel sub-agents for job research:**\n\n```bash\n# Via job-search-automation workspace\ncd /path/to/job-search-automation\nma parallel \\\n  \"search LinkedIn for SDE-2 roles\" \\\n  \"search Reddit for remote jobs\" \\\n  \"research top companies for tech stack\"\n```\n\n**Expected output:**\n```\n🐙 SPAWNING PARALLEL TASKS\n==========================\n\nTasks (3 total):\n  1. search LinkedIn for SDE-2 roles\n  2. search Reddit for remote jobs\n  3. research top companies for tech stack\n\n⏳ Spawning sub-agents via Orchestrator...\n[Sub-Agent 1] LinkedIn search in progress...\n[Sub-Agent 2] Reddit search in progress...\n[Sub-Agent 3] Company research in progress...\n✅ Parallel execution complete\n```\n\n## Installation\n\n**For detailed setup instructions, see [SETUP.md](SETUP.md).**\n\nQuick start:\n\n```bash\ngit clone https://github.com/Ask149/orchestrator.git\ncd orchestrator\nnpm install\nnpm run build\n```\n\n## Configuration\n\nConfig files live at:\n\n- **macOS/Linux:** `~/.config/orchestrator/`\n- **Windows:** `%LOCALAPPDATA%\\\\orchestrator\\\\` (falls back to `%APPDATA%`)\n\n```\n<config-dir>/\n├── config.json          # CLI backend configuration\n├── mcp-subagent.json    # MCP servers available to sub-agents\n└── logs/                # Execution audit logs (JSONL)\n```\n\n### CLI Backend Configuration (config.json)\n\n```json\n{\n  \"cli\": {\n    \"backend\": \"copilot\",\n\n    \"copilot\": {\n      \"command\": \"copilot\",\n      \"allowAllTools\": false,\n      \"allowAllPaths\": false,\n      \"model\": null\n    },\n\n    \"claude\": {\n      \"command\": \"claude\",\n      \"allowAllTools\": false,\n      \"maxTurns\": 10,\n      \"model\": null\n    }\n  }\n}\n```\n\nDefaults are secure: `allowAllTools` and `allowAllPaths` are `false`. Enable explicitly for unattended runs.\n\n### Supported CLI Backends\n\n| Backend | CLI | Description |\n|---------|-----|-------------|\n| `copilot` | GitHub Copilot CLI | `copilot -p \"prompt\" [--allow-all-tools] [--allow-all-paths]` |\n| `claude` | Claude Code CLI | `claude -p \"prompt\" [--dangerously-skip-permissions] --output-format stream-json` |\n\n> **Note:** Sub-agents run **without** the `--agent` flag. Custom agents restrict the available toolset (e.g., to only `report_intent`, `update_todo`). By omitting `--agent`, sub-agents get full access to Copilot's built-in tools: `bash`, `view`, `edit`, `create`, `grep`.\n\n### Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `COPILOT_CLI` | `copilot` | Path to Copilot CLI |\n| `CLAUDE_CLI` | `claude` | Path to Claude Code CLI |\n| `ORCHESTRATOR_DEFAULT_BACKEND` | `copilot` | Default CLI backend (`copilot` or `claude`) |\n| `ORCHESTRATOR_WORKSPACE` | cwd | Default workspace for tasks |\n| `LOG_LEVEL` | `INFO` | Logging level: `DEBUG`, `INFO`, `WARN`, `ERROR` |\n\n### Smart Timeout Configuration\n\nThe orchestrator automatically selects appropriate timeouts based on MCP servers requested:\n\n| MCP Server | Default Timeout | Reason |\n|------------|-----------------|--------|\n| `filesystem`, `memory` | 30s | Fast local operations |\n| `github`, `google-tasks` | 60s | API calls + auth overhead |\n| `google-calendar`, `leetcode` | 90s | OAuth + complex APIs |\n| `playwright` | **120s** | Browser startup + page rendering |\n\n**Logic:** `effective_timeout = max(task.timeout_seconds, recommended_for_servers, default)`\n\nOverride with explicit `timeout_seconds` in task definition when needed.\n\n## Usage\n\n### Tool: `spawn_subagents`\n\nSpawn parallel sub-agents for complex tasks.\n\n**Parameters:**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `tasks` | array | Yes | Array of sub-agent tasks (max 10) |\n| `default_timeout_seconds` | number | No | Default timeout (default: 120) |\n| `default_workspace` | string | No | Default working directory |\n\n**Task Properties:**\n\n| Property | Type | Required | Description |\n|----------|------|----------|-------------|\n| `id` | string | Yes | Unique task identifier |\n| `prompt` | string | Yes | Task prompt for sub-agent |\n| `context` | object | No | File/data context to pass |\n| `mcp_servers` | array | No | MCP servers to enable |\n| `workspace` | string | No | Working directory |\n| `timeout_seconds` | number | No | Task timeout |\n| `cli_backend` | string | No | Override CLI backend (`copilot` or `claude`) |\n\n### Example: Parallel Research\n\n```json\n{\n  \"tasks\": [\n    {\n      \"id\": \"stripe\",\n      \"prompt\": \"Find SDE-2 roles at Stripe\",\n      \"mcp_servers\": [\"playwright\"]\n    },\n    {\n      \"id\": \"google\",\n      \"prompt\": \"Find SDE-2 roles at Google\",\n      \"mcp_servers\": [\"playwright\"]\n    },\n    {\n      \"id\": \"meta\",\n      \"prompt\": \"Find SDE-2 roles at Meta\",\n      \"mcp_servers\": [\"playwright\"],\n      \"cli_backend\": \"claude\"\n    }\n  ]\n}\n```\n\n### Example: Context Passing\n\n```json\n{\n  \"tasks\": [\n    {\n      \"id\": \"analyze\",\n      \"prompt\": \"Analyze this file and summarize\",\n      \"context\": {\n        \"files\": [\n          { \"path\": \"src/main.ts\", \"mode\": \"full\" },\n          { \"path\": \"README.md\", \"mode\": \"summary\" },\n          { \"path\": \"src/\", \"mode\": \"grep\", \"pattern\": \"TODO|FIXME\" }\n        ]\n      }\n    }\n  ]\n}\n```\n\n## MCP Server Configuration (mcp-subagent.json)\n\nDefine MCP servers available to sub-agents.\n\n> **⚠️ IMPORTANT:** For Copilot CLI in `-p` (programmatic) mode, MCP servers **must** be configured in the default config location. The `--additional-mcp-config` flag only **augments** (adds to) this default config. Servers not in the default location will not load in `-p` mode.\n>\n> **Config location:**\n> - **macOS/Linux:** `~/.copilot/mcp-config.json`\n> - **Windows:** `%USERPROFILE%\\.copilot\\mcp-config.json` (e.g., `C:\\Users\\username\\.copilot\\mcp-config.json`)\n\n**Required fields for CLI compatibility:**\n\n| Field | Copilot CLI | Claude CLI | Description |\n|-------|-------------|------------|-------------|\n| `type` | **Required** | Optional | `\"local\"`, `\"stdio\"`, `\"http\"`, or `\"sse\"` |\n| `tools` | **Required** | Optional | Array of tool names or `[\"*\"]` for all |\n| `command` | Required | Required | Executable path |\n| `args` | Required | Required | Command arguments |\n\n**macOS/Linux:**\n\n```json\n{\n  \"mcpServers\": {\n    \"playwright\": {\n      \"type\": \"local\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@playwright/mcp@latest\"],\n      \"tools\": [\"*\"]\n    }\n  }\n}\n```\n\n**Windows (requires `cmd /c` wrapper for npx):**\n\n```json\n{\n  \"mcpServers\": {\n    \"playwright\": {\n      \"type\": \"local\",\n      \"command\": \"cmd\",\n      \"args\": [\"/c\", \"npx\", \"-y\", \"@playwright/mcp@latest\"],\n      \"tools\": [\"*\"]\n    }\n  }\n}\n```\n\n> **Windows Users:** Without `cmd /c`, you'll encounter \"Connection closed\" errors because Windows cannot directly execute `npx`. See [WINDOWS_VALIDATION.md](WINDOWS_VALIDATION.md) for details.\n\n## MCP Integration\n\n### Job Search Automation (Recommended)\n\nUse the `ma` CLI for integrated job search workflows:\n\n```bash\ncd /path/to/job-search-automation\nma parallel \"search LinkedIn for SDE-2\" \"search Reddit for remote jobs\"\n```\n\nSee [automation/ORCHESTRATOR.md](../job-search-automation/automation/ORCHESTRATOR.md) in job-search-automation workspace for complete usage guide with workflows and examples.\n\n### Standalone: VS Code / Cline\n\nAdd to your MCP settings to use as a standalone server:\n\n```json\n{\n  \"mcpServers\": {\n    \"orchestrator\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/orchestrator/dist/index.js\"],\n      \"env\": {\n        \"ORCHESTRATOR_WORKSPACE\": \"/path/to/your/workspace\"\n      }\n    }\n  }\n}\n```\n\n## Audit Logs\n\nExecution logs are written to `<config-dir>/logs/orchestrator.jsonl`:\n\n```jsonl\n{\"timestamp\":\"2026-02-01T10:00:00.000Z\",\"level\":\"INFO\",\"message\":\"Spawning 3 sub-agents\",\"taskIds\":[\"stripe\",\"google\",\"meta\"]}\n```\n\n## Production Features\n\n### Health Check\n\nVerify CLI backends are available before deployment:\n\n```bash\nnpm run health\n# or\nnpx mcp-orchestrator-health\n```\n\nReturns JSON with backend availability and exit code 0 if at least one backend is available.\n\n### Graceful Shutdown\n\nServer waits up to 30 seconds for active tasks to complete on `SIGTERM`/`SIGINT`.\n\n### Automatic Retry\n\nTransient failures (timeout, connection reset) are automatically retried once with a 2s delay.\n\n### Log Rotation\n\nApplication logs auto-rotate at 10MB:\n- `~/.config/orchestrator/logs/orchestrator.jsonl`\n\n## MCP Resources (v1.1.0+)\n\nThe orchestrator exposes its logs and configuration as MCP resources:\n\n| Resource URI | Description |\n|--------------|-------------|\n| `logs://orchestrator/app` | Application logs in JSONL format |\n| `logs://orchestrator/recent` | Tail of application logs (last ~200 lines) |\n| `config://orchestrator/current` | Current CLI and MCP server configuration |\n| `health://orchestrator/status` | Health status snapshot (same as `check_health`) |\n| `state://orchestrator/active_tasks` | In-flight task IDs tracked for graceful shutdown |\n\nUse these resources to inspect orchestrator state without direct file access.\n\n### Tool: `check_health`\n\nVerify orchestrator health via MCP (alternative to CLI `npm run health`):\n\n```json\n{\n  \"healthy\": true,\n  \"timestamp\": \"2026-02-03T10:00:00.000Z\",\n  \"platform\": \"darwin-arm64\",\n  \"backends\": {\n    \"copilot\": { \"available\": true, \"version\": \"1.0.0\" },\n    \"claude\": { \"available\": false, \"error\": \"not found\" }\n  }\n}\n```\n\n## Development\n\n```bash\n# Build\nnpm run build\n\n# Watch mode\nnpm run watch\n\n# Type check\nnpx tsc --noEmit\n\n# Run smoke tests\nnpm test\n\n# Watch tests\nnpm test:watch\n```\n\n## Known Limitations\n\n### Playwright MCP & Browser Automation\n\n| Issue | Description | Mitigation |\n|-------|-------------|------------|\n| **Chrome profile lock** | Chrome locks `--user-data-dir` to one process. If Chrome is already running with the same profile (e.g., VS Code's Playwright MCP), sub-agents cannot use Playwright MCP tools. | The orchestrator auto-generates isolated temp profiles per sub-agent (`/tmp/pw-profile-{taskId}`). If the MCP still fails, the `BROWSER_AUTOMATION_FALLBACK` prompt instructs sub-agents to use `chromium.launch({ headless: true })` via the Playwright npm package directly. |\n| **Parallel browser concurrency** | Multiple sub-agents requesting Playwright spawn separate browser instances, which increases memory/CPU usage. | Limit parallel Playwright tasks to 2-3 at a time. |\n| **No headless mode in MCP** | Playwright MCP launches a visible browser window by default, which steals focus and fails in CI/CD. | Pass `--headless` in the Playwright MCP args in `mcp-subagent.json`, or rely on the npm fallback which uses headless by default. |\n| **No output streaming** | Sub-agents buffer all stdout until process exit. For long Playwright tasks, there's no progress indication. | Use shorter, focused prompts. Complex multi-page workflows should be split into separate tasks. |\n\n### Claude CLI Backend\n\n| Issue | Description | Mitigation |\n|-------|-------------|------------|\n| **Auth not auto-detected** | `claude --version` succeeds without auth, but prompts fail with \"Invalid API key\". | The health check now runs a quick prompt to validate auth. Run `claude login` to fix. |\n| **Stricter MCP schema** | Claude CLI rejects `type` and `tools` fields in MCP config. | The orchestrator auto-strips these fields when generating Claude-compatible configs. |\n\n## Testing\n\nCross-platform smoke tests validate:\n- Config path resolution (macOS/Linux/Windows)\n- Temp file handling\n- Secure permission defaults\n- Grep implementation (no Unix deps)\n- Platform-specific spawn behavior\n\nRun tests with: `npm test`\n\n## License\n\nMIT\n","readmeFilename":"README.md"}