Metadata-Version: 2.4
Name: actionboard-mcp
Version: 0.1.0
Summary: ActionBoard MCP server (stdio) and `ab` CLI: fetch and submit missions from any MCP client.
License: MIT
Project-URL: Repository, https://github.com/Cloudscockpit/ab-mission-command-center
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: mcp<3,>=2.3
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"

# actionboard-mcp

Connect any MCP client (Claude Code, Claude Desktop, Cursor, Codex, Antigravity, OpenCode) to ActionBoard with your own LLM subscription. This package is the only ActionBoard client code in the repository. It ships three entry points:

- `actionboard-mcp`: an MCP server over stdio
- `ab`: a CLI over the same core that prints one JSON object per command
- `actionboard-cli`: the full CLI they are built on (`configure` for direct AppSync/AWS mode, password login, `missions --delete`)

The backend lives in `actionboard_mcp/actionboard_cli/`. It handles browser sign-in, OS keychain token storage, the edge proxy, Pod token exchange and presigned S3 uploads, using only the Python 3.9+ standard library.

## Tools

| Tool | What it does |
|---|---|
| `ab_auth_status` | Login state, token store, active Pod/Board and sync mode. It never returns tokens. |
| `ab_login(provider?)` | Opens the ActionBoard sign-in page in your browser and blocks until you finish (up to 5 min). It never takes a password. |
| `ab_list_pods` | Lists your Pods. |
| `ab_list_boards(pod_id)` | Lists Boards in a Pod (exchanges a Pod token on first use). |
| `ab_select_board(pod_id, board_id, sync?)` | Saves the active Pod/Board (and `ask`/`auto`/`off` sync) to `.actionboard/config.json`. |
| `ab_list_assigned(pod_id?, board_id?, invitation_status?, statuses?, search?, ...)` | Lists only the Board's missions assigned to your ActionAssist profile (`assignedAgentProfileId`), plus your invitations. |
| `ab_fetch_mission(...)` | Writes one of your assigned missions' brief, plan and attachments to `docs/missions/<date>-<slug>/` and returns paths, not contents. |
| `ab_submit_mission(...)` | Uploads a mission folder (needs an ActionAssist Profile; without one nothing is uploaded). Unchanged files are skipped. With `mission-report.md` the mission goes to `REVIEWING` once every linked action item is `Done`. `dry_run` previews the upload. |
| `ab_create_mission_actionlist(board_id, title, items, mission_id?)` | Creates 1 ActionList with an ActionItem per plan step, each assigned to you, and links it in `.actionboard/config.json`. |
| `ab_update_action_item(action_item_id, actionlist_id, title, status, item_type, board_id?, tags?)` | Updates an ActionItem, for example to `Done`. |

Mission files go to the mission's own board folder. Set `ACTIONBOARD_MISSIONS_FOLDER_HIERARCHY=1` in
the server's environment to file them under `Missions/<mission-name>/` instead (`phase` applies only then).

Fetched `mission-brief.md` / `mission-plan.md` keep the `BEGIN/END ACTIONBOARD_UNTRUSTED_…` markers. `ab_fetch_mission` returns `"untrusted_content": true`, which tells the model to treat that content as data, not instructions. `mission_dir` and `out_dir` must be inside the project directory.

## Install in your MCP client

Installing the ActionBoard plugin (the Claude Code marketplace plugin, or `actionboard-install` for Codex, OpenCode and Antigravity) registers this server as `actionboard` automatically. It only needs [uv](https://docs.astral.sh/uv/) on the PATH. The snippets below are for setting it up by hand, for example in Cursor or Claude Desktop.

Every snippet runs the server from GitHub with [uv](https://docs.astral.sh/uv/). The server reads and writes `.actionboard/` and `docs/missions/` in its **project directory**. That is the current directory unless you pass `--project-dir` (or set `ACTIONBOARD_PROJECT_DIR`). Clients that don't start servers in your project folder need `--project-dir`.

`ab_login` waits for you to finish signing in. If your client has a short tool timeout, sign in once from a terminal with `ab login` instead (see [CLI](#cli)). The tokens are shared.

### Claude Code

```sh
claude mcp add actionboard --scope project -- \
  uvx --from "git+https://github.com/Cloudscockpit/ab-mission-command-center#subdirectory=packages/actionboard-mcp" actionboard-mcp
```

This writes `.mcp.json` in the project root:

```json
{
  "mcpServers": {
    "actionboard": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/Cloudscockpit/ab-mission-command-center#subdirectory=packages/actionboard-mcp", "actionboard-mcp"]
    }
  }
}
```

### Claude Desktop

Edit `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/`, Windows: `%APPDATA%\Claude\`). Desktop has no project folder, so pass one. If Desktop can't find `uvx`, use its absolute path (`which uvx`).

```json
{
  "mcpServers": {
    "actionboard": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/Cloudscockpit/ab-mission-command-center#subdirectory=packages/actionboard-mcp",
               "actionboard-mcp", "--project-dir", "/absolute/path/to/your/project"]
    }
  }
}
```

### Cursor

`.cursor/mcp.json` in the project:

```json
{
  "mcpServers": {
    "actionboard": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/Cloudscockpit/ab-mission-command-center#subdirectory=packages/actionboard-mcp",
               "actionboard-mcp", "--project-dir", "${workspaceFolder}"]
    }
  }
}
```

### Codex

`~/.codex/config.toml`. The longer tool timeout leaves room for `ab_login`.

```toml
[mcp_servers.actionboard]
command = "uvx"
args = ["--from", "git+https://github.com/Cloudscockpit/ab-mission-command-center#subdirectory=packages/actionboard-mcp",
        "actionboard-mcp", "--project-dir", "/absolute/path/to/your/project"]
tool_timeout_sec = 330
```

### Antigravity

**Agent panel → … → MCP Servers → Manage MCP Servers → View raw config** (`mcp_config.json`):

```json
{
  "mcpServers": {
    "actionboard": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/Cloudscockpit/ab-mission-command-center#subdirectory=packages/actionboard-mcp",
               "actionboard-mcp", "--project-dir", "/absolute/path/to/your/project"]
    }
  }
}
```

## CLI

```sh
uvx --from "git+https://github.com/Cloudscockpit/ab-mission-command-center#subdirectory=packages/actionboard-mcp" ab status
ab login                                   # browser sign-in
ab pods && ab boards --pod <podId>
ab select --pod <podId> --board <boardId> --sync auto
ab assigned
ab fetch --invitation-id <id> --accept --start
ab submit --mission-dir docs/missions/<dir> --dry-run   # --allow-pending-actions submits for review anyway
ab mission-actionlist --title "Plan" --item Recon --item Build --item Test --item Review --item Report
ab action-update --id <itemId> --list <listId> --title Build --status Done --type SWE
ab action-items
ab progress --mission-dir docs/missions/<dir> --comment "wave 1 done"
```

Exit codes: `0` ok, `1` error, `3` not logged in. Errors go to stderr.

## Settings

The server and both CLIs read the same environment: `ACTIONBOARD_CREDENTIALS_FILE`, `ACTIONBOARD_EDGE_PROXY_URL`, `ACTIONBOARD_LOGIN_URL`, `ACTIONBOARD_KEYCHAIN=off` (file storage only), and so on. Tokens live in the OS keychain when one is available. Otherwise they go in `~/.actionboard/credentials.json` (mode 0600).

## Development

```sh
cd packages/actionboard-mcp
uv run --extra dev pytest                       # unit tests (HTTP, AppSync, S3 and keychain mocked)
uv run ab status                                # CLI against your real account
npx @modelcontextprotocol/inspector uv run actionboard-mcp   # poke the server interactively
```

The repository's `tests/report` suite (run with `python -m unittest discover -s tests/report` from the repo root) covers `actionboard_cli` on Python 3.9 and up. Add GraphQL documents to `actionboard_cli/operations.py` so the schema-contract check (`tests/contract`) validates them.

Transport is isolated in `server.py:main()`. A Streamable HTTP entry point can serve the same `mcp` object later.
