Skip to main content

claude_pool/
lib.rs

1//! MCP server for managing a pool of Claude CLI slots.
2//!
3//! `claude-pool` manages N Claude CLI instances behind an MCP server interface.
4//! A coordinator (typically an interactive Claude session) calls MCP tools to
5//! submit work, fan out tasks, chain pipelines, and track budgets. The pool
6//! handles slot lifecycle, session resumption, restarts, and shared context.
7//!
8//! # Architecture
9//!
10//! ```text
11//! Coordinator (interactive Claude session)
12//!   +-- .mcp.json includes "claude-pool"
13//!         +-- claude-pool MCP server
14//!               +-- slot-0 (Claude instance)
15//!               +-- slot-1 (Claude instance)
16//!               +-- slot-N
17//! ```
18//!
19//! One server. N slots. Nothing else.
20
21pub mod chain;
22pub mod config;
23pub mod error;
24pub mod pool;
25pub mod skill;
26pub mod store;
27pub mod types;
28pub mod workflow;
29pub mod worktree;
30
31pub use chain::{
32    ChainOptions, ChainProgress, ChainResult, ChainStatus, ChainStep, StepAction,
33    StepFailurePolicy, StepResult, execute_chain,
34};
35pub use error::{Error, Result};
36pub use pool::{DrainSummary, Pool, PoolBuilder, PoolStatus};
37pub use skill::{Skill, SkillArgument, SkillRegistry};
38pub use store::{InMemoryStore, PoolStore};
39pub use types::*;
40pub use workflow::{Workflow, WorkflowArgument, WorkflowRegistry};
41pub use worktree::WorktreeManager;