Skip to main content
Glama
README.md
# cross-acp

Cross-host multi-CLI swarm orchestration daemon and MCP server over the **Agent Client Protocol (ACP)**.

Orchestrate `agy`, `devin`, `codex`, and `claude` concurrently from any MCP-capable Master Agent (Antigravity IDE, Claude Code, Codex CLI, etc.) with **no API reverse-proxy**, **strict ACP permission interception**, **Git Worktree isolation**, and **Master-Agent-in-the-loop** approvals.

See [DESIGN.md](./DESIGN.md) for the full architecture and design rationale.

## Install as a Versioned CLI Package

### Option 1: Install Directly from GitHub

```bash
npm install -g git+https://github.com/noO0oOo0ob/cross-acp-mcp.git
```

### Option 2: Build & Pack Locally

```bash
git clone https://github.com/noO0oOo0ob/cross-acp-mcp.git
cd cross-acp-mcp
pnpm install
pnpm run pack:pkg
npm install -g ./cross-acp-0.1.0.tgz
```

Verify installation:

```bash
cross-acp --version
cross-acp doctor
```

## Service Lifecycle Commands

```bash
cross-acp start       # Start the background daemon
cross-acp status      # Check version, PID, uptime, MCP URL, launchd status
cross-acp restart     # Restart the daemon cleanly
cross-acp stop        # Stop the running daemon
cross-acp logs [-f]   # View or tail daemon logs

# macOS launchd auto-start on login + crash auto-restart
cross-acp install
cross-acp uninstall
```

## Connecting an MCP Host

### Option A: Streamable HTTP (Recommended)

Read your local Bearer token from `~/.cross-acp/auth.token` and configure your MCP host (`mcp_config.json`):

```json
{
  "mcpServers": {
    "cross-acp": {
      "url": "http://127.0.0.1:4789/mcp",
      "headers": {
        "Authorization": "Bearer <paste-token-from-~/.cross-acp/auth.token>"
      }
    }
  }
}
```

### Option B: Stdio Bridge (Auto-starts Daemon)

For MCP hosts that only support stdio transports:

```json
{
  "mcpServers": {
    "cross-acp": {
      "command": "cross-acp",
      "args": ["mcp-stdio"]
    }
  }
}
```

## Swarm Inspection & Control

```bash
cross-acp ls [--all]
cross-acp logs <agent_id> [-f] [--tail 50]
cross-acp diff <agent_id> [--patch]
cross-acp reply <agent_id> --allow | --allow-always | --deny [--reason "..."] | --message "..."
cross-acp kill <agent_id...> [--cleanup] [--delete-branch]
```

## Custom Policy Rules (`~/.cross-acp/policy.json`)

Rules support `commandRegex`, `pathPrefixes`, and `providers` dimensions. Priority is always:
`Absolute Hard Redlines > policy deny > policy ask_master > policy allow > Permission Preset`.

```json
{
  "rules": [
    {
      "id": "allow-project-build",
      "action": "allow",
      "providers": ["agy", "codex"],
      "commandRegex": "^pnpm\\s+(build|test|lint)\\b"
    },
    {
      "id": "ask-prod-deploy",
      "action": "ask_master",
      "commandRegex": "\\bdeploy\\b.*prod"
    },
    {
      "id": "deny-secrets",
      "action": "deny",
      "pathPrefixes": ["./secrets"]
    }
  ]
}
```