Model Context Protocol (MCP) endpoint for executing commands in isolated Docker containers.
/mcp
JSON-RPC endpoint for calling Computer Use tools
/mcp
Information about available MCP tools
MCP endpoints require Bearer token:
Authorization: Bearer YOUR_API_KEY
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token: Bearer <API_KEY> |
X-Chat-Id | Yes | Unique session/chat ID. Determines Docker container. |
X-User-Email | No | User email for git config |
X-User-Name | No | User name for git config |
X-Gitlab-Token | No | GitLab token for git/glab authentication |
X-Gitlab-Host | No | GitLab host (default: gitlab.com) |
X-Anthropic-Api-Key | No | Anthropic API key for sub_agent |
X-Anthropic-Base-Url | No | Anthropic base URL |
curl -X POST https://localhost:8081/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <MCP_API_KEY>" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'
curl -X POST https://localhost:8081/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <MCP_API_KEY>" \
-H "X-Chat-Id: my-session-123" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "bash_tool",
"arguments": {
"command": "echo Hello from container",
"description": "Test command"
}
}
}'
/files/{chat_id}/{filename}
Download file from container outputs directory
/files/{chat_id}/archive
Download all files as ZIP archive
/api/uploads/{chat_id}/{filename}
Upload file to container uploads directory
/api/uploads/{chat_id}/manifest
Get manifest of uploaded files (filename → MD5)
Access MCP tools through LiteLLM API (api.anthropic.com):
| Header | Description |
|---|---|
X-OpenWebUI-Chat-Id | Unique chat ID (container isolation) |
X-OpenWebUI-User-Email | User email |
curl -X POST https://api.anthropic.com/v1/chat/completions \
-H "Authorization: Bearer <API_KEY>" \
-H "X-OpenWebUI-Chat-Id: my-chat-123" \
-H "X-OpenWebUI-User-Email: user@example.com" \
-H "Content-Type: application/json" \
-d '{
"model": "claude/claude-sonnet-4-5",
"messages": [{"role": "user", "content": "Run ls -la"}]
}'
curl -X POST https://api.anthropic.com/mcp/docker_ai/list_tools \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
┌─────────────────────────────────────────────────────────────────┐
│ Docker Host │
│ │
│ ┌──────────────────┐ ┌─────────────────────────────────┐ │
│ │ File Server │ │ Docker Containers │ │
│ │ (this service) │ │ │ │
│ │ │ │ ┌─────────────────────────┐ │ │
│ │ POST /mcp ──────┼──────┼──│ owui-chat-{chat_id} │ │ │
│ │ │ │ │ - bash_tool │ │ │
│ │ GET /files/* ───┼──────┼──│ - view │ │ │
│ │ │ │ │ - create_file │ │ │
│ │ │ │ │ - str_replace │ │ │
│ └──────────────────┘ │ └─────────────────────────┘ │ │
│ │ │ │ │
│ │ │ ┌─────────────────────────┐ │ │
│ ▼ │ │ owui-chat-{other_id} │ │ │
│ /var/run/docker.sock │ └─────────────────────────┘ │ │
│ └─────────────────────────────────┘ │
│ │
│ /data/{chat_id}/ │
│ ├── uploads/ (files from user) │
│ └── outputs/ (files created by AI) │
└─────────────────────────────────────────────────────────────────┘