{"_id":"@davezhang/autoclaude","name":"@davezhang/autoclaude","dist-tags":{"latest":"5.5.0"},"versions":{"5.5.0":{"name":"@davezhang/autoclaude","version":"5.5.0","description":"AutoClaude — Plan with Claude, Execute Everywhere. MCP bridge connecting Claude Code to Qwen Code, Gemini CLI, and more.","private":false,"type":"module","main":"dist/index.js","bin":{"autoclaude":"dist/index.js"},"keywords":["claude","claude-code","mcp","model-context-protocol","ai","coding","agent","qwen","gemini","codex","aider","bridge","automation","token-savings","headless"],"repository":{"type":"git","url":"git+https://github.com/zhewenzhang/AutoClaude.git"},"homepage":"https://github.com/zhewenzhang/AutoClaude#readme","bugs":{"url":"https://github.com/zhewenzhang/AutoClaude/issues"},"license":"MIT","author":{"name":"zhewenzhang"},"scripts":{"build":"tsc","start":"node dist/index.js","dev":"tsx src/index.ts","prepublishOnly":"npm run build"},"engines":{"node":">=20.0.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","node-notifier":"^10.0.1"},"devDependencies":{"@types/node":"^20.0.0","@types/node-notifier":"^8.0.5","tsx":"^4.19.0","typescript":"^5.0.0"},"gitHead":"a51bdfec8aaa6626d1e2642fffea7c72a615f4df","_id":"@davezhang/autoclaude@5.5.0","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-8Dsx2lj1LQBMs9J38DZT4FIW8nWCD649VAqezFDfTgozfZ7t3+WtqewlHJWH9VE8vCDjfLRgUsMSWPptybGZ6A==","shasum":"cfbec2824899f016efe17bec05c5f15bf3ece5b7","tarball":"https://registry.npmjs.org/@davezhang/autoclaude/-/autoclaude-5.5.0.tgz","fileCount":15,"unpackedSize":159705,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDHICm3JsGULNI4L2gYbJEjpujh7VEmksfg4tVYTa17yAiBlthaI1Lfx8z7sKIyvewlXAI56Ut4rCytk+DYu8/ChQQ=="}]},"_npmUser":{"name":"davezhang","email":"davezhangus@gmail.com"},"directories":{},"maintainers":[{"name":"davezhang","email":"davezhangus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/autoclaude_5.5.0_1778318458118_0.18305212204451737"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-09T09:20:58.021Z","5.5.0":"2026-05-09T09:20:58.272Z","modified":"2026-05-09T09:20:58.523Z"},"maintainers":[{"name":"davezhang","email":"davezhangus@gmail.com"}],"description":"AutoClaude — Plan with Claude, Execute Everywhere. MCP bridge connecting Claude Code to Qwen Code, Gemini CLI, and more.","homepage":"https://github.com/zhewenzhang/AutoClaude#readme","keywords":["claude","claude-code","mcp","model-context-protocol","ai","coding","agent","qwen","gemini","codex","aider","bridge","automation","token-savings","headless"],"repository":{"type":"git","url":"git+https://github.com/zhewenzhang/AutoClaude.git"},"author":{"name":"zhewenzhang"},"bugs":{"url":"https://github.com/zhewenzhang/AutoClaude/issues"},"license":"MIT","readme":"# AutoClaude\r\n\r\n> Plan with Claude. Execute Everywhere. — The MCP bridge that connects Claude Code to Qwen Code & Cursor.\r\n\r\n🌐 **[Landing Page](https://zhewenzhang.github.io/AutoClaude/)** · 📖 [中文说明](README_CN.md)\r\n\r\n📋 [Changelog](CHANGELOG.md) | 📊 [Session Report](SESSION_REPORT.md)\r\n\r\n[![MCP](https://img.shields.io/badge/MCP-Protocol-blue?logo=anthropic)](https://modelcontextprotocol.io)\r\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue?logo=typescript)](https://www.typescriptlang.org)\r\n[![Node.js](https://img.shields.io/badge/Node.js-20%2B-green?logo=node.js)](https://nodejs.org)\r\n[![License](https://img.shields.io/badge/License-MIT-yellow)](LICENSE)\r\n[![Version](https://img.shields.io/badge/version-5.2.0-brightgreen)](https://github.com/zhewenzhang/AutoClaude)\r\n\r\n---\r\n\r\n## What is AutoClaude?\r\n\r\nAutoClaude is an **MCP (Model Context Protocol) Server** that gives Claude Code the ability to dispatch coding tasks to external AI coding agents — **Qwen Code** and **Cursor AI**.\r\n\r\nClaude handles strategy and planning. AutoClaude fires off execution tasks silently in the background. Each tool uses its own token pool, so Claude stays lean while heavy lifting happens elsewhere.\r\n\r\n| Tool | Type | Description |\r\n|------|------|-------------|\r\n| `dispatch_task` | **Unified** | Dispatch to the currently active agent |\r\n| `dispatch_to_qwen` | Legacy | Dispatch specifically to Qwen Code |\r\n| `dispatch_to_cursor` | Legacy | Copy task to clipboard for Cursor |\r\n| `list_agents` | Agent Mgmt | List all available agents + status |\r\n| `switch_agent` | Agent Mgmt | Switch the active agent |\r\n| `add_custom_agent` | Agent Mgmt | Register a custom CLI tool |\r\n| `get_task_report` | Reports | Read standardized execution report |\r\n| `get_savings_report` | Reports | View cumulative token & cost savings |\r\n| `qwen_bridge_status` | System | Check bridge status + config |\r\n\r\n**The workflow**: Claude plans the architecture, writes detailed task files (`QWEN_*.md` / `CURSOR_*.md`), then dispatches them. Qwen Code executes silently in the background, or Cursor picks up the clipboard content. **Claude tokens stay free for planning.**\r\n\r\n## Project Discipline\r\n\r\nAutoClaude enforces a strict **Planner-Executor separation** via `CLAUDE.md`:\r\n\r\n| Role | System | Allowed Actions |\r\n|------|--------|----------------|\r\n| **Planner** | Claude Code | Read files, design architecture, write task files (QWEN_*.md), dispatch, verify |\r\n| **Executor** | AI Agent (Qwen Code, etc.) | File edits, git commits, builds, deployments — all execution |\r\n\r\n> Claude Code reads `CLAUDE.md` on startup and follows these rules automatically. Even one-line fixes go through the agent.\r\n\r\n## Multi-Agent Support (v5.0)\r\n\r\nAutoClaude supports any terminal-invocable AI coding CLI. Choose the tool that matches your subscription and token plan.\r\n\r\n### Built-in Agents\r\n\r\n| Agent | Command | Type | YOLO Flag | Install |\r\n|-------|---------|------|-----------|---------|\r\n| **Qwen Code** | `qwen` | CLI | `-y` | `npm i -g @qwen-code/qwen-code` |\r\n| **Gemini CLI** | `gemini` | CLI | `--yolo` | `npm i -g @google/gemini-cli` |\r\n| **Codex CLI** | `codex` | CLI | `--approval-mode yolo` | `npm i -g @openai/codex` |\r\n| **Aider** | `aider` | CLI | `--yes` | `pip install aider-chat` |\r\n| **OpenCode** | `opencode` | CLI | `-y` | `npm i -g @opencode-ai/cli` |\r\n| **Cline CLI** | `cline` | CLI | `-y` | `npm i -g @cline/cli` |\r\n| **Cursor AI** | `cursor` | Clipboard | — | [cursor.com](https://cursor.com) |\r\n\r\n### Switching Agents\r\n\r\n```\r\nClaude: list_agents → see what's available\r\nUser: \"I want to use Gemini CLI\"\r\nClaude: switch_agent(\"gemini\")\r\nClaude: dispatch_task(\"MY_TASK.md\", \"Build feature X\")\r\n→ AutoClaude pipes task to gemini --yolo in the background\r\n```\r\n\r\n### Adding Custom Agents\r\n\r\n```\r\nClaude: add_custom_agent(\"my-tool\", \"My Agent\", \"my-ai\", \"-y\", \"--text\")\r\n```\r\n\r\nDon't see your tool? Use `add_custom_agent` to register any CLI tool.\r\n\r\n```mermaid\r\nflowchart LR\r\n    A[Claude Code<br/>Planning & Strategy] -->|dispatch_to_qwen| B[AutoClaude<br/>MCP Server]\r\n    A -->|dispatch_to_cursor| B\r\n    B -->|Background spawn + pipe| C[Qwen Code<br/>Headless Execution]\r\n    B -->|Clipboard + Launch| D[Cursor AI<br/>Execution]\r\n    C --> E[Git commits, builds, tests]\r\n    D --> E\r\n```\r\n\r\n## Why This Exists\r\n\r\nClaude Code excels at **planning** — architecture, code review, debugging strategy. But large implementations burn tokens fast. AutoClaude's multi-agent system lets you dispatch to **any AI coding CLI** — Qwen Code, Gemini CLI, Codex, Aider, and more — each with its own token pool. AutoClaude lets you:\r\n\r\n1. **Plan strategically in Claude** (low token usage)\r\n2. **Execute in any agent** (uses their tokens, not Claude's)\r\n3. **Zero manual copy-paste** — AutoClaude handles dispatch, notifications, clipboard, and background execution\r\n4. **YOLO mode by default** — agents auto-approve all actions, no confirmation prompts\r\n5. **Switch agents on the fly** — pick the right tool for each task's needs and your subscription plan\r\n\r\n### 💰 Token Savings\r\n\r\nEvery task is automatically tracked. Use `get_savings_report` in Claude to see your cumulative savings.\r\n\r\n| Metric | Per Task (Average) |\r\n|--------|-------------------|\r\n| Claude tokens (planning) | ~7,000 |\r\n| Equivalent full-Claude | ~25,000 |\r\n| **Tokens saved** | **~18,000 (72%)** |\r\n| **Cost saved** | **~$0.30 (Opus 4.7)** |\r\n\r\n> See [SESSION_REPORT.md](SESSION_REPORT.md) for a real example — 13 tasks, 67% token savings, $3.10 saved in one session.\r\n\r\n> At 100 tasks/month: **$30/month saved**. At 1,000 tasks/month: **$300/month saved**.\r\n\r\n## Installation\r\n\r\n### Quick Install (NPM)\r\n\r\n```bash\r\nnpm install -g autoclaude\r\n```\r\n\r\n### From GitHub\r\n\r\n```bash\r\ngit clone https://github.com/zhewenzhang/AutoClaude.git\r\ncd AutoClaude\r\nnpm install && npm run build\r\n```\r\n\r\n### Configure MCP in Claude Code\r\n\r\nAdd this to your Claude Code settings (`~/.claude/settings.json` or project `.claude/settings.json`):\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"autoclaude\": {\r\n      \"command\": \"node\",\r\n      \"args\": [\"<path-to-AutoClaude>\\\\dist\\\\index.js\"],\r\n      \"env\": {}\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nRestart Claude Code, and the bridge tools become available automatically.\r\n\r\n## Usage\r\n\r\n### 1. Dispatch to Qwen Code (Background)\r\n\r\nAsk Claude to write a task file and dispatch it:\r\n\r\n```\r\nClaude: Write QWEN_IMPLEMENT_AUTH.md with full implementation steps\r\nClaude: Then dispatch_to_qwen(\"QWEN_IMPLEMENT_AUTH.md\", \"Implement OAuth login flow\")\r\n```\r\n\r\nWhat happens (v4.0 headless mode):\r\n- Windows notification pops up: *\"AutoClaude — Implement OAuth login flow\"*\r\n- Voice alert plays: *\"AutoClaude task dispatched\"*\r\n- Qwen Code spawns **silently in the background** with YOLO mode (auto-approve)\r\n- Output is written to `QWEN_IMPLEMENT_AUTH_result.log` beside the task file\r\n- Claude is **free immediately** — continue planning while Qwen executes\r\n\r\nTo watch execution in a visible terminal, set `showTerminal: true` in config.\r\n\r\n### 2. Dispatch to Cursor\r\n\r\n```\r\nClaude: Write CURSOR_REFACTOR.md and call dispatch_to_cursor(\"CURSOR_REFACTOR.md\", \"Refactor database layer\")\r\n```\r\n\r\nWhat happens:\r\n- Task content is **copied to your clipboard**\r\n- Cursor launches in your project directory (if available)\r\n- Windows notification + voice alert fire\r\n- Open Cursor AI chat (`Ctrl+Shift+J`), paste (`Ctrl+V`), done\r\n\r\n### 3. Check AutoClaude Status\r\n\r\n```\r\nClaude: Check if AutoClaude is running\r\n```\r\n\r\nClaude calls `qwen_bridge_status` and reports back the config and available tools.\r\n\r\n## Standardized Output\r\n\r\nEvery task dispatched by AutoClaude produces two files:\r\n\r\n| File | Content |\r\n|------|---------|\r\n| `TASK_NAME_result.log` | Raw execution output from the agent |\r\n| `TASK_NAME_summary.md` | Structured process report with role separation |\r\n\r\n### Process Report Format\r\n\r\nThe `_summary.md` follows a fixed structure:\r\n\r\n```markdown\r\n# Task Report: <task_name>\r\n\r\n| Field | Value |\r\n|-------|-------|\r\n| **Task File** | `QWEN_EXAMPLE.md` |\r\n| **Dispatched** | 2026-05-08T14:30:00.000Z |\r\n| **Agent** | Qwen Code |\r\n| **Mode** | Headless background + YOLO auto-approve |\r\n\r\n---\r\n\r\n## Role Separation\r\n\r\n| Role | System | Responsibility |\r\n|------|--------|----------------|\r\n| Planner | Claude Code | Strategy, architecture, task authoring, verification |\r\n| Dispatcher | AutoClaude | Task validation, dispatch, notification, output capture |\r\n| Executor | Qwen Code | File operations, git, builds, deployments |\r\n\r\n---\r\n\r\n## Execution Log\r\n(Raw agent output...)\r\n\r\n---\r\n\r\n## Completion Status\r\n\r\n| Metric | Value |\r\n|--------|-------|\r\n| **Status** | ✅ Completed |\r\n| **Duration** | 127s |\r\n\r\n## Completion Checklist\r\n\r\n| Step | Role | Status |\r\n|------|------|--------|\r\n| Architecture planning | Claude | ✅ |\r\n| Task file authoring | Claude | ✅ |\r\n| Dispatch | AutoClaude | ✅ |\r\n| git init & config | Qwen Code | ✅ |\r\n| File creation & editing | Qwen Code | ✅ |\r\n| Build & test | Qwen Code | ✅ |\r\n| Commit & push | Qwen Code | ✅ |\r\n| Verification | Claude | ✅ |\r\n```\r\n\r\n### Reading Reports via MCP\r\n\r\nClaude can call `get_task_report(\"QWEN_EXAMPLE.md\")` to read the summary without opening files manually. Use `qwen_bridge_status` to confirm the bridge is running.\r\n\r\n## Terminal Output (v5.2)\r\n\r\nAll bridge responses use Unicode box-drawing and emoji for clarity:\r\n\r\n```\r\n┌─────────────────────────────────────────────────────┐\r\n│              AutoClaude v5.2 — Status               │\r\n├─────────────────────────────────────────────────────┤\r\n│  Active Agent : Qwen Code                           │\r\n│  YOLO Mode    : ✅ ON                               │\r\n│  Terminal     : headless background                │\r\n├─────────────────────────────────────────────────────┤\r\n│  Agents       : 1 enabled / 7 total                │\r\n│  💰 Savings   : 0 tasks · 0 tokens · $0.00         │\r\n└─────────────────────────────────────────────────────┘\r\n```\r\n\r\n## How Dispatch Works (Under the Hood)\r\n\r\n### Qwen Code (v5.2 headless background)\r\n\r\n```\r\n1. Claude calls dispatch_task(\"task.md\") or dispatch_to_qwen(\"task.md\")\r\n        │\r\n2. AutoClaude validates the file exists\r\n        │\r\n3. Sends Windows toast notification + speech alert\r\n        │\r\n4. Spawns the active agent headlessly in the background with YOLO auto-approve\r\n        │\r\n5. Pipes task file content as a batch to the agent's stdin\r\n   Captures stdout/stderr to TASK_NAME_result.log\r\n        │\r\n6. AutoClaude returns \"✅ Dispatched\" to Claude immediately\r\n        │\r\n7. Claude is free. The agent runs headless in the background with YOLO auto-approval.\r\n   Output is written to TASK_NAME_result.log and a structured TASK_NAME_summary.md.\r\n```\r\n\r\n### Cursor\r\n\r\n```\r\n1. Claude calls dispatch_to_cursor(\"task.md\")\r\n        │\r\n2. AutoClaude reads task content → copies to Windows clipboard\r\n        │\r\n3. Sends notification + speech alert\r\n        │\r\n4. Optionally opens Cursor and a terminal banner (if showTerminal is on)\r\n        │\r\n5. AutoClaude returns \"✅ Dispatched\" to Claude immediately\r\n        │\r\n6. User pastes (Ctrl+V) into Cursor AI chat → Cursor executes\r\n```\r\n\r\n## Project Structure\r\n\r\n```\r\nAutoClaude/\r\n├── src/\r\n│   └── index.ts          # AutoClaude MCP Server main program\r\n├── dist/\r\n│   └── index.js          # Compiled output\r\n├── config.json           # Your configuration\r\n├── package.json\r\n├── tsconfig.json\r\n├── index.html            # Landing page (GitHub Pages)\r\n├── README.md             # English documentation\r\n├── README_CN.md          # Chinese documentation\r\n└── .autoclaude_savings.json  # Cumulative token savings tracking\r\n```\r\n\r\n## Tech Stack\r\n\r\n- **Runtime**: Node.js 20+\r\n- **Language**: TypeScript 5.x (compiled to ESM)\r\n- **Protocol**: [Model Context Protocol (MCP)](https://modelcontextprotocol.io)\r\n- **Platform**: Windows (PowerShell, Windows Terminal)\r\n- **Notifications**: Native Windows Toast + System.Speech TTS\r\n- **Execution**: Background spawn with stdin pipe + file descriptor capture\r\n\r\n## Development\r\n\r\n```bash\r\n# Install dependencies\r\nnpm install\r\n\r\n# Build\r\nnpm run build\r\n\r\n# Run locally (for testing)\r\nnpm run dev\r\n\r\n# Test the MCP server manually:\r\necho '{\"jsonrpc\":\"2.0\",\"method\":\"tools/list\",\"id\":1}' | node dist/index.js\r\n```\r\n\r\n## Author\r\n\r\nCreated by [ @zhewenzhang](https://github.com/zhewenzhang)\r\n\r\n## Contributing\r\n\r\nThis project follows a strict **Planner-Executor workflow**. See [CLAUDE.md](CLAUDE.md) for the AI agent rules. Contributions are dispatched through the bridge — not committed directly.\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md","_rev":"1-ec454a1f682cdd50f1bbc1f9521a4f82"}