not-first/autorestic-mcp
If you are the rightful owner of autorestic-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Autorestic MCP Server is designed to manage and query autorestic backup repositories, providing AI language models with easy access to repository information.
Autorestic MCP Server
[!IMPORTANT] This MCP server assumes you have correctly set up autorestic on your machine, and have a valid pre-existing config file.
An MCP (Model Context Protocol) server for managing and querying autorestic backup repositories. This server allows AI language models to easily access information about restic repositories through autorestic's command interface.
High Seas Demo
I've been advised to put a nice demo video here showing this project's functionality! Demo Video
Available Tools
This MCP server exposes the following tools for interacting with Autorestic repositories:
- list-backends: Lists the configured backend names from your Autorestic configuration. Call this first to discover valid backend identifiers.
- get-repository-stats: Retrieves overall repository statistics for a given backend.
- get-repository-config: Returns the full configuration details for a specific backend, including paths, types, and custom settings defined in
.autorestic.yml
. - list-snapshots: Lists all snapshots for a backend, returning snapshot IDs, creation timestamps, and metadata.
- get-latest-snapshot: Fetches metadata for the most recent snapshot, including its ID and timestamp.
Usage
[!WARNING] These instructions assume you already have autorestic set up and functioning on your machine. If you don't, see the full Setup section.
To install the package globally, run:
npm install -g autorestic-mcp
autorestic-mcp /path/to/.autorestic.yml
Alternatively, you can use it without global installation via npx
:
npx autorestic-mcp /path/to/.autorestic.yml
Example Configuration
You can integrate the MCP server into any supported services by using their configuration. For VSCode, use:
{
"servers": {
"autorestic": {
"command": "npx",
"args": [
"autorestic-mcp",
"/path/to/.autorestic.yml"
],
"type": "stdio"
}
}
}
Replace /path/to/.autorestic.yml
with the path to your Autorestic configuration file.
Full Setup (For Demo Testing)
- Install autorestic using
wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | bash
- Create a new file in
~/.autorestic.yml
and add this content:
locations:
mydata:
from: FOLDER/TO/BACKUP/HERE
to: local
backends:
local:
type: local
path: FOLDER/TO/STORE/BACKUPS/HERE
- Run
autorestic check
to initialise the restic repository. Due to a bug in the software, it may add a key calledforgetoption
into your config file. If it does, simply remove it. - Done! Continue with the usage instructions above.