Skip to main content

MCP server for Duplicati backup management

Project description

Duplicati MCP Server

MCP (Model Context Protocol) server for managing Duplicati backups from an LLM.

Version française / French version

Architecture

The server wraps the Duplicati REST API and exposes it via the MCP protocol. Two transports are supported:

  • stdio — for local use via Claude Code (no network, no port)
  • Streamable HTTP — for Docker deployment, accessible over the network

Getting Started

Local use with Claude Code (stdio)

The simplest way to get started. The .mcp.json at the project root handles everything:

# Install uv if needed
brew install uv

# Claude Code will auto-detect .mcp.json and launch the server

Set your Duplicati URL and password in .mcp.json:

{
  "mcpServers": {
    "duplicati": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "duplicati-mcp"],
      "env": {
        "DUPLICATI_URL": "http://localhost:8200",
        "DUPLICATI_PASSWORD": "your-password",
        "DUPLICATI_READONLY": ""
      }
    }
  }
}

With Docker Compose (Docker Hub image)

# Edit DUPLICATI_URL and DUPLICATI_PASSWORD in docker-compose.yml, then:
docker compose up -d

With Docker Compose (local build)

# Edit docker-compose.yml: comment out `image:` and uncomment `build: .`
docker compose up -d --build

Direct Docker usage

docker run -d \
  --name duplicati-mcp-server \
  -p 3000:3000 \
  -e DUPLICATI_URL=http://your-duplicati-host:8200 \
  -e DUPLICATI_PASSWORD=your-password \
  kcofoni/duplicati-mcp:latest

Verification

# Check that the server is running
docker logs duplicati-mcp-server

# Test the MCP endpoint
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'

Client Configuration

Claude Code — local (stdio)

For local use without Docker, add to your project .mcp.json:

{
  "mcpServers": {
    "duplicati": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "duplicati-mcp"],
      "env": {
        "DUPLICATI_URL": "http://localhost:8200",
        "DUPLICATI_READONLY": ""
      }
    }
  }
}

Credentials are loaded from the .env file at the project root (see Getting Started).

Claude Code — Docker/remote (HTTP)

Add to your .mcp.json:

{
  "mcpServers": {
    "duplicati": {
      "type": "http",
      "url": "http://your-host:3000/mcp"
    }
  }
}

Claude Desktop

Claude Desktop requires mcp-proxy as a bridge to HTTP servers. Add to your configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "duplicati": {
      "command": "uvx",
      "args": ["mcp-proxy", "--transport", "streamablehttp", "http://your-host:3000/mcp"]
    }
  }
}

Available Tools

Once connected, the LLM has access to:

Backup Jobs

  1. list_backups — List all configured jobs with ID, name, last run date and result
  2. get_backup — Get detailed information about a specific job
  3. run_backup — Trigger a backup job immediately
  4. abort_backup — Abort the currently running backup for a job

Status & Progress

  1. get_progress — Live progress of the active backup task (phase, %, file counts)
  2. get_server_status — Duplicati server state, version and active task

Configuration

  1. export_backup_config — Export a job configuration as JSON
  2. update_backup_config — Update an existing job configuration in place (use with export_backup_config to modify sources, settings, schedule, etc.)
  3. import_backup_config — Import a job configuration from JSON (creates a new job)

Environment Variables

Variable Default Description
DUPLICATI_URL http://localhost:8200 URL of the Duplicati instance
DUPLICATI_PASSWORD (empty) Duplicati web interface password (leave empty if none set)
DUPLICATI_READONLY (empty) Set to true, 1 or yes to disable write operations
MCP_TRANSPORT stdio Transport: stdio or streamable-http
MCP_PORT 3000 Port for Streamable HTTP transport

Read-only Mode

DUPLICATI_READONLY=true disables run_backup, abort_backup, update_backup_config and import_backup_config. All read tools remain active. Useful for safely exploring and analysing backup configurations without any risk of modification.

Docker Hub

docker pull kcofoni/duplicati-mcp:latest

Development

File Structure

duplicati-mcp/
├── src/
│   └── duplicati_mcp/
│       ├── __init__.py
│       ├── __main__.py
│       ├── client.py        # Duplicati REST API client
│       └── server.py        # FastMCP server and tools
├── mcp-publication/         # MCP registry publication files
├── requirements.txt         # Python dependencies
├── pyproject.toml           # Project metadata
├── Dockerfile
├── docker-compose.yml
├── .mcp.json                # Claude Code local config (stdio)
├── test_server.sh           # Docker container smoke test
├── test_mcp.py              # MCP protocol test
├── README.md                # This file (English)
└── README_fr.md             # French documentation

Running Tests

# Smoke test (requires running Docker container)
./test_server.sh

# MCP protocol test (requires running server)
python test_mcp.py
python test_mcp.py localhost:3000

Interactive Tool Testing (local)

uv run mcp dev src/duplicati_mcp/server.py

Troubleshooting

Cannot connect to Duplicati

Check that DUPLICATI_URL is reachable from the container. If both run in Docker, put them on the same network and use the service name as hostname.

Authentication failed

Verify DUPLICATI_PASSWORD matches the password set in Duplicati's web interface. Leave empty if no password is configured.

MCP endpoint not responding

docker ps | grep duplicati-mcp-server
docker logs duplicati-mcp-server

License

This project is licensed under the MIT License — see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

duplicati_mcp-1.0.1.tar.gz (60.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

duplicati_mcp-1.0.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file duplicati_mcp-1.0.1.tar.gz.

File metadata

  • Download URL: duplicati_mcp-1.0.1.tar.gz
  • Upload date:
  • Size: 60.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for duplicati_mcp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 610f710cebd9ba23c40af4de8828d21dc3cae559cf53170449400a0487b8934b
MD5 121d1bf26d734db09c55af3ce2d733ac
BLAKE2b-256 20ea02343afe7a7c0c702dd3e931333c797f7c42919d8fdbb9777e949f175688

See more details on using hashes here.

File details

Details for the file duplicati_mcp-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: duplicati_mcp-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for duplicati_mcp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31bed1f44d5f6a66892d4914866aa2c62cecb19154ade281fdfc9d3c8ac54b31
MD5 db05a4b34833c004e6868a9e7595a882
BLAKE2b-256 f0049d391c7d6708c75541b81b99df1dbc324955492f70e2a495fefefda6d46b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page