deepseek-worker
Reads large files/logs from disk for DeepSeek analysis and writes generated unit tests, mock data, or boilerplate directly to files within the worktree root, with sandboxing against secrets and path escapes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@deepseek-worker analyze logs/api-error.log and summarize the top failures"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
deepseek-worker (v2.0)
MCP Server chạy qua stdio giúp phối hợp an toàn giữa Claude Code, Google Antigravity và DeepSeek API (deepseek-flash, 1M context) trên nhiều Git Worktree — giữ gọn ngữ cảnh gói cá nhân, đồng bộ trạng thái xuyên nhánh không xung đột và tuân thủ nghiêm ngặt Điều khoản dịch vụ (ToS).
Tại sao cần deepseek-worker?
Khi kết hợp nhiều AI coding agent trên cùng một dự án, bạn thường gặp 3 vấn đề:
Lệch trạng thái giữa các Git Worktree: File
HANDOFF.mdnằm trong nhánh Git bị cũ khi hai agent code song song ở hai nhánh khác nhau.Tốn ngược hạn mức (quota) gói cá nhân: Nếu một tool MCP chỉ trả về hàng trăm dòng code/log dưới dạng văn bản, agent chính vẫn phải nuốt hết vào ngữ cảnh của mình.
Rủi ro khóa tài khoản Pro: Tự động bọc vòng lặp CLI gói cá nhân (
agy -p,claude -p) hoặc chia sẻ OAuth token vi phạm ToS.
deepseek-worker giải quyết cả 3 vấn đề bằng thiết kế Path-based I/O + Shared Board trong .git/multi-agent/ + Human-in-the-loop.
Related MCP server: agent-bridge
Kiến trúc tổng thể
flowchart TD
User["Người dùng (Giao việc, chuyển ca & duyệt Merge)"]
subgraph Worktrees["Git Worktrees tách biệt"]
Main["main (Chốt Contract & Bản ổn định)"]
Arch["Worktree Claude Code (Kiến trúc & Backend)"]
UI["Worktree Antigravity (UI & Browser Use)"]
end
subgraph SharedGit["Thư mục Git dùng chung (.git/multi-agent/)"]
Board["board.json + HANDOFF.live.md (Khóa board.lock + rev)"]
end
subgraph MCP["MCP Server: deepseek-worker"]
Analyze["deepseek_analyze_files (Đọc log/file từ đĩa -> tóm tắt <= 30 dòng)"]
Generate["deepseek_generate_to_file (Ghi test/mock thẳng xuống đĩa)"]
Sync["read_board / post_handoff"]
end
DS["DeepSeek API (deepseek-flash 1M)"]
User --> Arch
User --> UI
Arch --> Main
Main --> UI
Arch --> MCP
UI --> MCP
Sync <--> Board
Analyze --> DS
Generate --> DS
Generate --> Worktrees4 MCP Tools cung cấp
Tool | Mục đích | Điểm an toàn / tối ưu |
| Đọc trực tiếp file/log lớn (>300 dòng) từ đĩa và hỏi | Trả về tóm tắt tối đa 30 dòng; chặn |
| Đọc file tham chiếu, gọi | Ghi thẳng xuống đĩa trong biên |
| Đọc bảng tin bàn giao mới nhất từ | Dùng chung tức thời giữa mọi Git Worktree của cùng dự án, tốn $0 API. |
| Ghi trạng thái bàn giao ( | Khóa file độc quyền |
Cài đặt nhanh trong 3 bước
Yêu cầu: Node.js >= 22, Git, và API key từ DeepSeek Platform.
Bước 1: Clone & cài đặt phụ thuộc
git clone https://github.com/nguyentronghieutl2k6-art/deepseek-worker.git
cd deepseek-worker
npm install
npm testBước 2: Chạy trình cài đặt không phá hủy
Xem trước các thay đổi (mặc định --dry-run, không ghi đĩa):
node scripts/install-customizations.js --dry-runÁp dụng cài đặt (chép skill/lệnh /handoff cho Antigravity & Claude Code và gộp deepseek-worker vào ~/.gemini/config/mcp_config.json mà giữ nguyên mọi MCP server và khóa sẵn có):
node scripts/install-customizations.js --applySau đó:
Mở
~/.gemini/config/mcp_config.json, thayYOUR_DEEPSEEK_API_KEYbằng khóa DeepSeek thật của bạn (chmod 600 ~/.gemini/config/mcp_config.json).Đăng ký cho Claude Code bằng lệnh mà trình cài đặt in ra (thay đường dẫn và khóa thật của bạn):
claude mcp add-json --scope user deepseek-worker '{"command":"node","args":["/path/to/deepseek-worker/src/index.js"],"env":{"DEEPSEEK_API_KEY":"YOUR_DEEPSEEK_API_KEY","DEEPSEEK_MODEL":"deepseek-flash"}}'
Bước 3: Gắn quy tắc vào dự án của bạn
Sao chép (hoặc nối vào cuối file sẵn có) các mẫu trong templates/:
templates/AGENTS.multi-agent.md→AGENTS.mdtemplates/CLAUDE.multi-agent.md→CLAUDE.md(nếuCLAUDE.mdđã chứa@AGENTS.mdthì chỉ cần nối vàoAGENTS.md)
Cách dùng hằng ngày (đơn giản, không cần nhớ đường dẫn)
Mở dự án ở chế độ Worktree trên Claude Desktop (tab Code) và Antigravity.
Khi làm xong một chặng ở Claude → gõ
/handoff(Claude tự test → commit nhánh → ghi bảng tin bàn giao).Sang Antigravity → nhắn "Đọc board làm tiếp" → xong việc nhắn "handoff".
Khi gặp log lỗi dài hoặc cần viết nhiều test → nhắn "Nhờ DeepSeek đọc file lỗi này" hoặc "Nhờ DeepSeek viết unit test cho file này".
Nguyên tắc An toàn & Bảo mật
Không bọc CLI gói cá nhân: Không tự động chạy
agy -phayclaude -p.Không đụng chạm OAuth / Bí mật: Sandbox tự động chặn đọc/ghi
.env(cho phép.env.example,.env.sample,.env.template),.credentials.json,*.pem,*.key,id_rsa,id_ed25519,.git/*, cũng như chặn ghi ra ngoàiworktree_rootkể cả qua symlink treo.Kiểm thử tự động:
npm test(27 bài kiểm thử gồm Git Worktree thật, symlink, sandbox, API engine, giao thức MCP quaInMemoryTransport+StdioClientTransportvà trình cài đặt).
Giấy phép
Available Tools
4 toolsdeepseek_analyze_filesA
Read files or logs directly from disk via DeepSeek and return a concise summary capped at 30 lines.
Inputs: question (required), file_paths (required), thinking.
deepseek_generate_to_fileA
Read reference files, generate code/tests/fixtures with DeepSeek directly to output_path inside worktree_root, and return only a short metadata report.
Inputs: instruction (required), output_path (required), worktree_root (required), thinking, +1 more.
post_handoffA
Atomically record a session handoff on the shared git-common-dir board with optimistic rev locking and regenerate HANDOFF.live.md.
Inputs: rev (required), agent (required), next_tasks (required), changed_files (required), +4 more.
read_boardB
Read the shared multi-agent handoff board (/multi-agent/board.json) across all git worktrees.
Inputs: repo_path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The two DeepSeek tools overlap in that both read files, but their outputs differ clearly: one returns a capped summary, the other generates artifacts to a file. read_board and post_handoff are cleanly separated into read and write operations on the same resource.
All names use snake_case and mostly follow verb_noun structure, but the prefix convention is inconsistent: two tools use deepseek_ while the board tools do not. This is readable but not fully predictable.
Four tools is well-scoped for a focused worker that analyzes files, generates outputs, and participates in a handoff board. Each tool has a clear role with no redundant surface area.
The surface covers analysis, generation, and reading/writing the handoff board, which are the core workflows. Minor gaps exist around board lifecycle operations such as listing or clearing handoffs, but agents can work around them.
Maintenance
Related MCP Connectors
Git collaboration for AI agents and people: tasks, hand-offs, reviews, teams, shared memory.
Keeps AI coding agents on one codebase from overwriting each other, and briefs each on its code.
Shared long-term memory & Stop-hook task handoff across Claude Code, Codex, Cursor, and mobile.
Hand off work between AI agents in any tool. Start Devin or Cursor cloud and share memory.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceLocal coordination for coding agents that share a Git working tree.6 npm2MIT
- AlicenseNot gradedqualityAmaintenanceEnables coordinating Claude Code and Codex across separate Git worktrees with shared issue ownership, file reservations, messages, and explicit handoffs.280 PyPI3MIT
- AlicenseAqualityCmaintenanceEnables Claude Code to run cursor-agent tasks in isolated git worktrees, manage asynchronous and parallel jobs, review diffs, and safely apply changes back to the repository.16MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code, Google Antigravity, and OpenAI Codex to share task IDs, recover handoffs, inspect and vote on decisions, assign implementation work to separate Git checkouts, and preserve progress across quota failures.MIT