ME

martian-engineering/maniple

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

49 stars 12 forks 质量 64 趋势 17

MCP 服务器,用于通过 iTerm2 或 tmux 编排 Claude Code 或 Codex 会话

概览

一个MCP服务器,允许一个Claude Code会话通过终端后端(tmux或iTerm2)生成并管理一组其他Claude代码(或Codex)会话。 Maniple 是一个 MCP 服务器和一组 slash 命令,允许 Claude Code 编排一个由其他 Claude Code 或 Codex 会话组成的“团队”。它使用终端后端(tmux 或 iTerm2)来生成新的终端会话,并在其中运行 Claude 代码或代码。 - 许多开发任务可以逻辑并行化,但对于注意力有限的人类来说,管理这种并行性很困难。而 Claude 在这方面非常有效。- 将实现交付给工作者,给实现代理一个新的上下文窗口(更智能),同时保持管理者的上下文无实现细节。- 有时你希望 Claude Code 去研究某事或回答问题,同时不阻塞主线程。- Maniple 生成真实的 Claude 代码或 Codex 会话。

概述(AI 翻译)

一个MCP服务器,允许一个Claude Code会话通过终端后端(tmux或iTerm2)生成并管理一组其他Claude代码(或Codex)会话。

引言

maniple 是一个MCP服务器和一组斜干命令,允许Claude Code编排一组其他Claude代码或Codex会话的“团队”。它使用终端后端(tmux 或 iTerm2)来生成新的终端会话并在其中运行Claude代码或Codex。

为什么?

  • 并行性: 许多开发任务可以逻辑并行化,但对于注意力有限的人类来说,管理这种并行性很难。而克劳德在这方面非常有效。
  • 上下文管理: 将实现交付给工作者会给实现代理一个新的上下文窗口(更智能),并保持管理者的上下文中没有实现细节。
  • 背景工作: 有时你希望让Claude Code去研究某件事或回答问题,同时不会阻碍主线工作。
  • 可见性: maniple 会生成真实的克劳德代码或法典会话。你可以观看他们,打断并控制,或者关闭他们。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Maniple MCP Server

An MCP server that allows one Claude Code session to spawn and manage a team of other Claude Code (or Codex) sessions via terminal backends (tmux or iTerm2).

Introduction

maniple is an MCP server and a set of slash commands for allowing Claude Code to orchestrate a “team” of other Claude Code or Codex sessions. It uses terminal backends (tmux or iTerm2) to spawn new terminal sessions and run Claude Code or Codex within them.

Why?

  • Parallelism: Many development tasks can be logically parallelized, but managing that parallelism is difficult for humans with limited attention spans. Claude, meanwhile, is very effective at it.
  • Context management: Offloading implementation to a worker gives the implementing agent a fresh context window (smarter), and keeps the manager’s context free of implementation details.
  • Background work: Sometimes you want to have Claude Code go research something or answer a question without blocking the main thread of work.
  • Visibility: maniple spawns real Claude Code or Codex sessions. You can watch them, interrupt and take control, or close them out.

But, why not just use Claude Code sub-agents, you ask? They’re opaque – they go off and do things and you, the user, cannot effectively monitor their work, interject, or continue a conversation with them. Using a full Claude Code session obviates this problem.

Terminal Backends

maniple supports two terminal backends:

Backend Platform Status
tmux macOS, Linux Primary. Auto-selected when running inside tmux.
iTerm2 macOS only Fully supported. Requires Python API enabled.

Backend selection order:

  1. MANIPLE_TERMINAL_BACKEND environment variable (tmux or iterm)
  2. Config file setting (terminal.backend)
  3. Auto-detect: if TMUX env var is set, use tmux; otherwise iTerm2

Git Worktrees: Isolated Branches per Worker

A key feature of maniple is git worktree support. When spawning workers with use_worktree: true (the default), each worker gets:

  • Its own working directory - A git worktree at {repo}/.worktrees/{name}/
  • Its own branch - Automatically created from the current HEAD
  • Shared repository history - All worktrees share the same .git database, so commits are immediately visible across workers

Worktree naming depends on how workers are spawned:

  • With an issue ID: {repo}/.worktrees/{issue_id}-{badge}/
  • Without: {repo}/.worktrees/{worker-name}-{uuid}-{badge}/

The .worktrees directory is automatically added to .gitignore.

Codex Support

Workers can run either Claude Code or OpenAI Codex. Set agent_type: "codex" in the worker config (or set the default in the config file) to spawn Codex workers instead of Claude Code workers.

Features

  • Spawn Workers: Create Claude Code or Codex sessions with multi-pane layouts
  • Terminal Backends: tmux (cross-platform) and iTerm2 (macOS)
在 GitHub 查看完整 README

安装

uvx --from maniple-mcp@latest maniple
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "maniple": { "command": "uvx", "args": ["--from", "maniple-mcp@latest", "maniple"] } } }