Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
{
"name": "arcane-mcp-server",
"source": ".",
"description": "Docker infrastructure management with 180+ MCP tools, workflow guidance, and safety guardrails",
"version": "2.1.0",
"description": "Docker infrastructure management with 170+ MCP tools, workflow guidance, and safety guardrails",
"version": "3.0.0",
"keywords": ["docker", "containers", "infrastructure", "devops", "compose", "swarm"]
}
]
Expand Down
4 changes: 2 additions & 2 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "arcane-mcp-server",
"version": "2.1.0",
"description": "Docker infrastructure management with 180+ MCP tools, workflow guidance, and safety guardrails. Connects to the Arcane Docker Management platform.",
"version": "3.0.0",
"description": "Docker infrastructure management with 170+ MCP tools, workflow guidance, and safety guardrails. Connects to the Arcane Docker Management platform.",
"author": "RandomSynergy",
"license": "MIT",
"homepage": "https://github.com/RandomSynergy17/Arcane-MCP-Server",
Expand Down
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,53 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.0] - 2026-07-11

Compatibility release for **Arcane v2** (tested against v2.3.2, OpenAPI spec refreshed from v1.17.0). Tool count stays at **180** (removed tools whose endpoints no longer exist, added notification-delete and activity-tracking tools). No v1 compatibility shims — installs running Arcane v1.x should stay on `2.x` of this server.

### Removed (endpoints gone in Arcane v2)
- `arcane_dashboard_get_action_items` — `/dashboard/action-items` no longer exists.
- `arcane_event_create` — `POST /events` no longer exists.
- `arcane_updater_update_container` — `/updater/containers/{id}` was dropped; use `arcane_container_update` instead.
- `arcane_notification_apprise_get` / `arcane_notification_apprise_update` / `arcane_notification_apprise_test` — Apprise config was replaced by the per-provider notification model.
- `arcane_swarm_get_service_logs` — v2 streams all logs over WebSocket only (no REST endpoint).

### Added
- `arcane_notification_delete_settings` — delete a provider's notification settings (`DELETE /notifications/settings/{provider}`).
- `arcane_activity_list` / `arcane_activity_get` — track Arcane v2's background activities (image update checks, updater runs, prunes, scans), including progress and messages.
- `arcane_container_get_logs` / `arcane_project_get_logs` / `arcane_swarm_get_service_logs` — log access via Arcane's WebSocket log streams (v2 has no REST log endpoints). Fetch-and-close semantics with `tail`, `since`, `timestamps`, and a `maxLines` cap; live following works incrementally by passing the newest seen timestamp as `since` on the next call. Adds the `ws` dependency (custom auth headers on the upgrade request); ANSI color codes are stripped.
- `arcane_project_update_services` — the dedicated project update action (`POST /projects/{id}/update-services`, permission `projects:update`): pulls latest images and recreates services (optionally a subset). Runs in the background; track via the activity tools. Preferred over manual pull + redeploy, which require `projects:deploy`.
- `arcane_project_list` supports v2's `updates` filter (`has_update`, `up_to_date`, `error`, `unknown`) plus a `status` filter, and shows per-project update info including exactly which image refs are outdated (same data as the dashboard's update overview). `arcane_project_get` shows it too.

### Fixed (after testing against a live v2.3.2 instance)
- Paginated list tools printed `Found undefined …`: v2 renamed `pagination.total` to `pagination.totalItems` — updated all 16 list modules.
- Image `created` is a Unix timestamp in v2 and was printed raw — now formatted as an ISO date.
- `arcane_image_update_check_all` / `arcane_image_check_updates_all` blocked until every image was checked, which hit the MCP request timeout — and the client's timeout retry then started duplicate server-side checks. Both tools now fire the check in the background (via a new no-retry `postInBackground` client helper) and return immediately, pointing at `arcane_activity_list` / the update summary for results.
- Image tools 404'd when given a name like `amir20/dozzle:latest` — the v2 API only accepts image IDs in paths (a `/` in the name breaks the route). Tools taking an `imageId` (`arcane_image_get`, `arcane_image_delete`, vulnerability scan/result/summary/list) now resolve names to IDs via the image list.
- `arcane_image_get` crashed with `Invalid time value`: the detail endpoint returns `created` as an ISO string (the list returns a Unix timestamp) — each is now formatted correctly.
- **Full response-shape audit** of all 26 modules against the v2 spec plus a live smoke test of every read-only tool (`scripts/live-smoke.mjs`). This fixed ~60 further v2 field/wrapper mismatches, including: container list `names`/detail `state` object ("undefined"/"[object Object]" output), dashboard snapshot (new v2 structure incl. aggregated action items), port mappings (`hostPort`/`containerPort`/`isPublished`), container/project counts (`totalContainers`/`totalProjects` etc.), `/version` (`currentVersion`), auth login/me/refresh (wrapped responses, `isGlobalAdmin`), jobs (flat `JobscheduleConfig`, `jobs` array), webhooks (actionType/target model instead of events), environments (test/pair/version/create fields), networks (create `options` nesting, counts/prune wrappers, `containersList`), volumes (Docker-cased `usageData`, `isDirectory`, mkdir query param), gitops (`composePath`, `lastSync*` fields, branches/files shapes), registries (`registryType`/`token`/`description` model), templates (`type` filter, required `envContent`), swarm (Docker `ServiceSpec` create/update with version index, `runningReplicas`, tasks/nodes endpoints), vulnerability scanner status (`available`) and image options (string list), builds (`tags`/`platforms`/`errorMessage`/`output`, multipart workspace upload), image pull (server-side registry credentials), settings categories/search shapes.
- `arcane_oidc_get_config` reports "OIDC is not configured" instead of a server 500 on instances without OIDC.

### Changed (breaking, follows Arcane v2 API)
- **Notifications** rebuilt on the provider model (`discord`, `email`, `telegram`, `signal`, `slack`, `ntfy`, `pushover`, `matrix`, `generic`): `get_settings` lists providers (or one via `provider`), `update_settings` takes `provider` + `enabled` + `config`, `test` now requires a `provider`.
- **Vulnerabilities**: scan result moved to `GET .../images/{id}/vulnerabilities` (list moved to `/vulnerabilities/list`); `ignore` is now `POST /vulnerabilities/ignore` and requires `pkgName`; `unignore` takes the ignore-entry ID (shown by `list_ignored`); all displays use the v2 field names (`vulnerabilityId`, `pkgName`, severity summary object).
- **Image updates**: check endpoints return `hasUpdate`/`currentVersion`/`latestVersion`; batch check uses `POST /image-updates/check-batch` with `imageRefs` (was `check-multiple` + `imageIds`); batch/check-all responses are keyed by image reference; summary reports `imagesWithUpdates`/`digestUpdates`/`errorsCount`.
- **Updater**: `run` supports `forceUpdate` and `resourceIds`; result shape follows v2 (`checked`/`items` with resource-level results); `status` now reports in-flight container/project updates; history uses `AutoUpdateRecord` (resource + old/new image version maps).
- **System**: docker info moved to `/system/docker/info` and returns Docker's native (PascalCase) fields; `system prune` sends the v2 per-resource body (`{containers, images, networks, volumes, buildCache}` with `mode`) and gained a `buildCache` option; image prune sends `mode`/`dangling` and reads the wrapped response.
- **Projects**: destroy moved to `DELETE /projects/{id}/destroy` (body `removeVolumes`/`removeFiles`, new `removeFiles` param).
- **Volume backups**: delete and file listing are no longer volume-scoped (`/volumes/backups/{backupId}[/files]`); backups no longer expose a `filename`; file listing returns plain paths.
- **Templates**: global variables moved to `/environments/{id}/templates/variables` (now requires `environmentId`; PUT sends a `{key, value}` list).
- **Users**: `role` was removed from create/update (v2 uses role assignments); tools accept `displayName`/`email`/`password` and display `isGlobalAdmin`.
- **Settings**: environment settings return a key/value list; public settings are environment-scoped now (`environmentId` required).
- **Events**: list filters by `severity` instead of `resourceType`; display uses `title`/`description`/`severity` (v2 dropped `message`).
- **Environments**: deployment snippets moved to `/environments/{id}/deployment` (`dockerRun` field).
- **Builds**: `arcane_build_image` follows the v2 `BuildRequest` (`contextDir` required, `dockerfileInline` for inline content, `tags`/`platforms` arrays, `noCache`); Git-URL builds were dropped by the API.
- **Auth**: login/refresh responses are unwrapped from the `{success, data}` envelope.
- `ArcaneClient.delete()` accepts an optional JSON body (needed for `projects/{id}/destroy`).
- OpenAPI spec (`_docs/arcane_api_docs.{json,yaml}`) and generated types refreshed to v2.3.2.

---

## [2.1.0] - 2026-04-19

### Added
Expand Down
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ npm test # vitest (50 tests)
npm run dev # stdio mode
npm run dev:tcp # HTTP mode
npm run update-api-spec # Refresh OpenAPI spec from live instance
ARCANE_BASE_URL=… ARCANE_API_KEY=… node scripts/live-smoke.mjs [envId] # Run every read-only tool against a live instance; flags undefined/[object Object]/NaN in output
```

## Architecture
Expand All @@ -25,7 +26,7 @@ npm run update-api-spec # Refresh OpenAPI spec from live instance
- `src/config.ts` — Config from env vars > config file > defaults
- `src/constants.ts` — All shared constants (timeouts, limits, versions)

### Tools (180 across 25 modules in `src/tools/`)
### Tools (180 across 26 modules in `src/tools/`)

All tools use `server.registerTool()` with:
- `title` — human-readable name
Expand Down
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Every tool carries **safety annotations** so your AI knows which operations are

---

> **🆕 Recent update — v2.1:** Tool filtering is here. All 180 tools in one turn eats your context window, so you can now pick a preset and ship only what you need. [Details below](#tool-filtering).
> **🆕 Recent update — v3.0:** Full **Arcane v2** support (tested against v2.3.2). Endpoints, payloads, and tool set follow the new API — if you are still on Arcane v1.x, stay on server `2.x`. Breaking changes are listed in the [CHANGELOG](CHANGELOG.md).

## Tool Filtering

Expand Down Expand Up @@ -232,7 +232,7 @@ rm -rf /tmp/arcane

### What the skill teaches Claude:

**Intent mapping** — When you say "what's broken?", Claude knows to call `arcane_dashboard_get` + `arcane_dashboard_get_action_items` instead of listing every container one by one.
**Intent mapping** — When you say "what's broken?", Claude knows to call `arcane_dashboard_get` and drill into recent events instead of listing every container one by one.

**Safety guardrails** — Before running `arcane_volume_prune`, Claude will suggest `arcane_volume_backup_create` first. Before `arcane_updater_run`, it'll do a dry run. Before `arcane_project_destroy`, it confirms twice.

Expand Down Expand Up @@ -273,12 +273,13 @@ And a Claude Code slash command:

## All 180 Tools

### Containers (11)
### Containers (12)

| Tool | Description |
|------|-------------|
| `arcane_container_list` | List containers with filtering and pagination |
| `arcane_container_get` | Get detailed container information |
| `arcane_container_get_logs` | Fetch container logs (incremental follow via `since`) |
| `arcane_container_create` | Create a new container |
| `arcane_container_start` | Start a stopped container |
| `arcane_container_stop` | Stop a running container |
Expand All @@ -299,7 +300,7 @@ And a Claude Code slash command:
| `arcane_swarm_update_service` | Update service configuration |
| `arcane_swarm_delete_service` | Delete a swarm service |
| `arcane_swarm_scale_service` | Scale service replicas |
| `arcane_swarm_get_service_logs` | Get service logs |
| `arcane_swarm_get_service_logs` | Fetch service logs (incremental follow via `since`) |
| `arcane_swarm_init_cluster` | Initialize a new swarm cluster |
| `arcane_swarm_join_cluster` | Join an existing cluster |
| `arcane_swarm_leave_cluster` | Leave the swarm cluster |
Expand All @@ -322,18 +323,20 @@ And a Claude Code slash command:
| `arcane_vulnerability_list_ignored` | List ignored vulnerabilities |
| `arcane_vulnerability_get_image_options` | List scannable images |

### Projects / Docker Compose (12)
### Projects / Docker Compose (14)

| Tool | Description |
|------|-------------|
| `arcane_project_list` | List Docker Compose projects |
| `arcane_project_get` | Get project details |
| `arcane_project_get_logs` | Fetch stack logs (incremental follow via `since`) |
| `arcane_project_create` | Create from compose YAML |
| `arcane_project_update` | Update project configuration |
| `arcane_project_up` | Deploy a project |
| `arcane_project_down` | Stop and remove containers |
| `arcane_project_restart` | Restart all services |
| `arcane_project_redeploy` | Redeploy (down + up) |
| `arcane_project_update_services` | Pull latest images + recreate services (the dedicated update action) |
| `arcane_project_destroy` | Destroy project and volumes |
| `arcane_project_pull_images` | Pull latest images |
| `arcane_project_get_counts` | Get status counts |
Expand All @@ -355,7 +358,7 @@ And a Claude Code slash command:
| `arcane_image_get_update_summary` | Get update summary |
| `arcane_image_update_check` | Check update by reference |
| `arcane_image_update_check_by_id` | Check update by ID |
| `arcane_image_update_check_multiple` | Batch check |
| `arcane_image_update_check_multiple` | Batch check by image reference |
| `arcane_image_update_check_all` | Check all for updates |
| `arcane_image_update_get_summary` | Get update summary |
| `arcane_build_image` | Build from Dockerfile or Git URL |
Expand Down Expand Up @@ -396,7 +399,7 @@ And a Claude Code slash command:
</details>

<details>
<summary><strong>GitOps, Webhooks, Auto-Updater & Dashboard (23 tools)</strong></summary>
<summary><strong>GitOps, Webhooks, Auto-Updater, Dashboard & Activities (23 tools)</strong></summary>

| Tool | Description |
|------|-------------|
Expand All @@ -418,24 +421,24 @@ And a Claude Code slash command:
| `arcane_webhook_update` | Update a webhook |
| `arcane_webhook_delete` | Delete a webhook |
| `arcane_updater_run` | Run auto-updater (dry run supported) |
| `arcane_updater_update_container` | Update single container |
| `arcane_updater_get_status` | Get updater schedule |
| `arcane_updater_get_history` | Get update history |
| `arcane_dashboard_get` | Get dashboard snapshot |
| `arcane_dashboard_get_action_items` | Get action items |
| `arcane_activity_list` | List background activities (update checks, prunes, scans) |
| `arcane_activity_get` | Get activity progress and messages |
</details>

<details>
<summary><strong>Environments, Registries, Auth & More (69 tools)</strong></summary>
<summary><strong>Environments, Registries, Auth & More (66 tools)</strong></summary>

| Category | Tools | What it covers |
|----------|-------|----------------|
| **Environments** | 10 | List, create, update, delete environments. Test connectivity, pair agents, get Docker info, deployment snippets |
| **Container Registries** | 7 | Docker Hub, GHCR, ECR, GCR, ACR. Create, update, delete, test, sync registries |
| **Templates** | 8 | Docker Compose templates with variables. Browse, create, download, manage |
| **Jobs** | 4 | Scheduled tasks. List jobs, get schedules, run on demand |
| **Notifications** | 6 | Alert configuration via Apprise. Get/set settings, test notifications |
| **Events** | 4 | Activity tracking. List events by environment, create, delete |
| **Notifications** | 4 | Alert configuration per provider (Discord, email, Telegram, Slack, ntfy, …). Get/set/delete settings, test notifications |
| **Events** | 3 | Activity tracking. List events globally or by environment, delete |
| **Users** | 5 | User management. List, create, update, delete users |
| **Settings** | 8 | Server configuration and API key management |
| **Authentication** | 8 | Login, logout, JWT token management, OIDC device flow |
Expand Down Expand Up @@ -515,14 +518,14 @@ src/
arcane-client.ts # HTTP client (retry, SSL, size limits)
auth/
auth-manager.ts # JWT auto-refresh + API key auth
tools/ # 25 modules, 180 tools
tools/ # 26 modules, 180 tools
registry.ts # ToolRegistry — captures RegisteredTool handles, applies filter
presets.ts # commonly-used / read-only / minimal / deploy / full / custom
resources/ # 4 MCP Resources
prompts/ # 5 MCP Prompts
types/
arcane-types.ts # Shared interfaces (33 types)
generated/ # Auto-generated from OpenAPI v1.17.0
generated/ # Auto-generated from OpenAPI v2.3.2
utils/
tool-helpers.ts # registerTool wrapper with isError handling
config-watcher.ts # debounced fs.watch on ~/.arcane/config.json → hot reload
Expand Down
2 changes: 1 addition & 1 deletion _docs/arcane_api_docs.json

Large diffs are not rendered by default.

Loading