Arcane Docker MCP Server
Enables managing Docker environments through Arcane via natural language, providing tools for containers, images, volumes, networks, and Docker Compose stacks.
README
Arcane Docker MCP Server
A Model Context Protocol (MCP) server for managing Docker environments through Arcane, deployed on Cloudflare Workers.
This MCP server provides Claude Desktop and other MCP clients with tools to manage Docker containers, images, volumes, networks, and Docker Compose stacks via Arcane's REST API.
What This Project Is
Arcane is a Docker management platform that provides a unified API for managing multiple Docker environments. This MCP server exposes Arcane's functionality as MCP tools, allowing you to interact with your Docker infrastructure through natural language conversations with Claude.
Built on Cloudflare Workers using the official Cloudflare agents package, this server provides a scalable, globally distributed way to manage your Docker resources.
Available Tools
| Tool Name | Description | Required Inputs |
|---|---|---|
arcane_environment_list |
List all Docker environments managed by Arcane | search?, limit? |
arcane_environment_get |
Get details of a specific environment | environmentId?, environmentName? |
arcane_environment_create |
Create a new Docker environment | name, apiUrl, accessToken?, enabled?, isEdge? |
arcane_environment_update |
Update an existing environment | environmentId?/environmentName?, name?, apiUrl?, etc. |
arcane_environment_delete |
Delete a Docker environment | environmentId?/environmentName? |
arcane_stack_list |
List Docker Compose stacks in an environment | environmentId?/environmentName?, search? |
arcane_stack_get |
Get details of a specific stack | environmentId?/environmentName?, stackId?/stackName? |
arcane_stack_deploy |
Deploy a new Docker Compose stack | environmentId?/environmentName?, name, composeContent |
arcane_stack_update |
Update an existing stack | environmentId?/environmentName?, stackId?/stackName? |
arcane_stack_start |
Start a Docker Compose stack | environmentId?/environmentName?, stackId?/stackName? |
arcane_stack_stop |
Stop a Docker Compose stack | environmentId?/environmentName?, stackId?/stackName? |
arcane_stack_restart |
Restart a Docker Compose stack | environmentId?/environmentName?, stackId?/stackName? |
arcane_stack_pull |
Pull images for a stack | environmentId?/environmentName?, stackId?/stackName? |
arcane_stack_delete |
Delete a Docker Compose stack | environmentId?/environmentName?, stackId?/stackName? |
arcane_container_list |
List all containers in an environment | environmentId?/environmentName? |
arcane_container_get |
Get details of a specific container | environmentId?/environmentName?, containerId?/containerName? |
arcane_container_start |
Start a container | environmentId?/environmentName?, containerId?/containerName? |
arcane_container_stop |
Stop a container | environmentId?/environmentName?, containerId?/containerName? |
arcane_container_restart |
Restart a container | environmentId?/environmentName?, containerId?/containerName? |
arcane_container_kill |
Force kill a container | environmentId?/environmentName?, containerId?/containerName? |
arcane_image_list |
List all Docker images in an environment | environmentId?/environmentName? |
arcane_image_pull |
Pull a Docker image | environmentId?/environmentName?, imageName |
arcane_image_remove |
Remove a Docker image | environmentId?/environmentName?, imageId |
arcane_image_prune |
Remove unused Docker images | environmentId?/environmentName? |
arcane_volume_list |
List all Docker volumes in an environment | environmentId?/environmentName? |
arcane_volume_inspect |
Get details of a specific volume | environmentId?/environmentName?, volumeName |
arcane_volume_remove |
Remove a Docker volume | environmentId?/environmentName?, volumeName |
arcane_volume_prune |
Remove unused Docker volumes | environmentId?/environmentName? |
arcane_network_list |
List all Docker networks in an environment | environmentId?/environmentName? |
arcane_network_inspect |
Get details of a specific network | environmentId?/environmentName?, networkId |
arcane_network_remove |
Remove a Docker network | environmentId?/environmentName?, networkId |
arcane_network_prune |
Remove unused Docker networks | environmentId?/environmentName? |
arcane_template_list |
List all Docker Compose templates | search?, limit? |
arcane_template_get |
Get details of a specific template | templateId |
arcane_template_create |
Create a new template | name, composeContent, description?, etc. |
arcane_template_update |
Update an existing template | templateId, name?, composeContent?, etc. |
arcane_template_delete |
Delete a template | templateId |
arcane_version |
Get the Arcane server version | - |
Note: For tools that accept both *Id and *Name parameters (e.g., environmentId vs environmentName), you only need to provide one. The server will automatically resolve names to IDs via API calls.
Local Development Setup
Prerequisites
- Bun runtime
- An Arcane instance running on port 3552 (or any accessible port)
- An Arcane API key
Setup Steps
- Clone the repository
git clone https://github.com/your-username/arcane-mcp-server.git
cd arcane-mcp-server
- Install dependencies
bun install
- Configure local secrets
Copy the example environment file and fill in your values:
cp .dev.vars.example .dev.vars
Edit .dev.vars with your Arcane API key:
ARCANE_API_KEY=your-api-key-here
- Start the dev server
bun run dev
The server will start on http://localhost:8788.
- Connect with MCP Inspector
In a second terminal:
bunx @modelcontextprotocol/inspector@latest
Connect the inspector to http://localhost:8788/mcp to verify:
- All tools appear under List Tools
arcane_environment_listreturns real data from your Arcane instancearcane_stack_listwithenvironmentName(not ID) works via name resolutionarcane_container_logsreturns log content- Invalid tool inputs return proper error responses
Connecting Claude Desktop via mcp-remote
To use this MCP server with Claude Desktop, configure it in your Claude Desktop settings:
- Install the
mcp-remoteclient if you haven't already:
bunx @modelcontextprotocol/inspector@latest
- Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"arcane": {
"command": "bunx",
"args": ["mcp-remote", "https://arcane-mcp-server.<account>.workers.dev/mcp"]
}
}
}
Replace <account> with your Cloudflare account identifier.
Connecting OpenCode
To use this MCP server with OpenCode, configure it in your OpenCode settings:
- Open OpenCode Settings → MCP Servers
- Add a new MCP server with the following configuration:
{
"name": "Arcane",
"url": "https://arcane-mcp-server.<account>.workers.dev/mcp",
"transport": "sse"
}
Replace <account> with your Cloudflare account identifier.
OpenCode Usage Examples
Once connected, you can interact with your Arcane Docker infrastructure through natural language conversations in OpenCode:
Example 1: List environments
User: Show me all my Docker environments
OpenCode: [Calls arcane_environment_list]
Here are your Docker environments:
- production (connected)
- staging (connected)
- dev (connected)
Example 2: Deploy a stack using a template
User: Deploy a WordPress stack to my production environment
OpenCode: [Calls arcane_template_list, then arcane_stack_deploy]
Deploying WordPress to production...
Stack 'wordpress' deployed successfully in environment 'production'
Example 3: Start/stop containers
User: Stop the database container in staging
OpenCode: [Calls arcane_environment_list, arcane_container_list, then arcane_container_stop]
Container 'db' stopped successfully in environment 'staging'
Example 4: Pull and prune images
User: Pull the latest nginx image and clean up unused images
OpenCode: [Calls arcane_image_pull, then arcane_image_prune]
Pulled nginx:latest...
Pruned 3 unused images, reclaimed 1.2GB
Example 5: Inspect a volume
User: Show me details of the data volume
OpenCode: [Calls arcane_volume_inspect]
Volume 'data' details:
- Driver: local
- Mountpoint: /var/lib/docker/volumes/data
- Created: 2024-01-15T10:30:00Z
- Size: 5.2GB
Secrets Setup
Secrets are managed through the Cloudflare Dashboard:
- Navigate to Cloudflare Dashboard → Workers & Pages
- Select your
arcane-mcp-serverworker - Go to Settings → Variables and Secrets
- Add the following secret (type: Secret):
| Name | Description |
|---|---|
ARCANE_API_KEY |
Your Arcane API key |
The Arcane host and port are configured via the Cloudflare VPC service binding (service_id in wrangler.jsonc) and do not need to be set here.
Deployment via Cloudflare Workers Builds
This project uses Cloudflare Workers Builds for continuous deployment from Git.
Initial Setup
-
Connect your repository
Cloudflare Dashboard → Workers & Pages → Create application → Import a repository → select your GitHub repo.
-
Configure build settings
- Build command:
bun run type-check - Deploy command:
bunx wrangler deploy
- Build command:
-
Set secrets
Follow the Secrets Setup instructions above.
-
Verify Worker name
The
nameinwrangler.jsoncmust exactly match the Worker name in the Cloudflare dashboard. If there's a mismatch, the build will fail.
Deploying
Simply push to your main branch:
git push origin main
Monitor the build: Dashboard → Workers & Pages → your worker → Builds → View build history.
Running Tests
Run the test suite:
bun test
Run tests in watch mode:
bun run test:watch
All tests must pass before pushing to the repository.
Architecture
This project follows the Cloudflare agents package pattern:
- ArcaneAgent (Durable Object): Manages MCP sessions using WebSocket hibernation
- ArcaneClient: Typed HTTP client for the Arcane REST API
- Tool Registrations: MCP tools organized by domain (environments, stacks, containers, etc.)
- Name Resolution: Automatic resolution of resource names to IDs for user-friendly interactions
The Durable Object pattern is required by the agents package and handles:
- WebSocket session management
- Session state persistence
- Both SSE and Streamable HTTP transports automatically
- Cold starts and reconnections seamlessly
License
See LICENSE file for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。