n8n MCP Backup Server
Allows backup, listing, and restoration of n8n workflows and credentials via the n8n API.
Allows backup, listing, and restoration of PostgreSQL databases using pg_dump and pg_restore.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@n8n MCP Backup ServerTake a backup of my n8n workflows"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
n8n MCP Backup Server
An MCP (Model Context Protocol) server that lets an AI assistant (Claude Desktop) back up, list, and restore n8n workflows and PostgreSQL databases — all through natural language commands.
"Take a backup of my n8n workflows" → Claude calls the MCP tool → backup uploaded to S3.
What it does
Tool | Description |
| Exports all n8n workflows and credentials to a timestamped JSON and uploads to S3 |
| Lists available backups in S3, newest first with sizes |
| Downloads a backup from S3 and imports workflows back into n8n |
| Streams a |
| Lists available Postgres backups in S3 |
| Downloads a Postgres backup from S3 and restores via |
Related MCP server: n8n Workflow Builder
Architecture
Claude Desktop
│
│ stdio (MCP)
▼
mcp-server (FastMCP)
│
├──► n8n API (export / import workflows)
├──► S3 Storage (store / retrieve backup files)
└──► PostgreSQL (pg_dump / pg_restore)All services run as Docker containers and communicate over an internal Docker network. S3 storage defaults to Garage (self-hosted) but works with any S3-compatible backend (AWS S3, MinIO, etc.).
Tech Stack
Python + FastMCP — MCP server with stdio transport
boto3 — S3-compatible storage client
requests — n8n REST API calls
Docker Compose — orchestrates all services
Garage v1.3.1 — self-hosted S3-compatible object storage
PostgreSQL 16 — database with backup/restore support
Quick Start
1. Clone the repo
git clone https://github.com/TameemAlkadiki/n8n-mcp-backup.git
cd n8n-mcp-backup2. Configure environment
cp .env.example .envOpen .env and fill in all required values. See Configuration below.
3. Set up Garage (S3 storage)
Place your garage.toml at ./garage/config/garage.toml.
See the Garage quick-start guide for setup instructions.
4. Start all services
docker compose up -d5. Initialize Garage buckets
After first boot, create the S3 buckets:
# Apply cluster layout
docker exec garage /garage layout assign -z default -c 1G <NODE_ID>
docker exec garage /garage layout apply --version 1
# Create buckets
docker exec garage /garage bucket create n8n-backup
docker exec garage /garage bucket create postgres-backup
# Create access key and allow bucket access
docker exec garage /garage key create mcp-key
docker exec garage /garage bucket allow n8n-backup --read --write --key mcp-key
docker exec garage /garage bucket allow postgres-backup --read --write --key mcp-keyCopy the generated key ID and secret into your .env as S3_ACCESS_KEY_ID and S3_SECRET_ACCESS_KEY, then restart:
docker compose restart mcp-server6. Connect Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"n8n-backup": {
"command": "docker",
"args": ["exec", "-i", "mcp_backup_server", "python", "server.py"]
}
}
}Restart Claude Desktop. You can now say:
"Take a backup of my n8n workflows"
"List available backups"
"Restore the backup from yesterday"
"Take a Postgres backup"
Configuration
All configuration is via environment variables in .env. Copy .env.example to get started.
Variable | Required | Description |
| ✅ | 32-byte hex key for n8n credential encryption |
| ✅ | n8n API key (Settings → n8n API → Create) |
| optional | n8n base URL (default: |
| ✅ | Garage cluster RPC secret |
| ✅ | Garage admin API token (for web UI) |
| ✅ | S3 access key ID |
| ✅ | S3 secret access key |
| optional | S3 endpoint (default: |
| optional | S3 region (default: |
| optional | Bucket for n8n backups (default: |
| optional | Bucket for Postgres backups (default: |
| ✅ | PostgreSQL database name |
| ✅ | PostgreSQL user |
| ✅ | PostgreSQL password |
| optional | Postgres host (default: |
| optional | Postgres port (default: |
Project Structure
n8n-mcp-backup/
├── server.py # FastMCP server — all 6 tools
├── docker-compose.yml # All services: n8n, mcp-server, garage, postgres
├── Dockerfile # MCP server container build
├── requirements.txt # Python dependencies
├── .env.example # Environment variable template
└── garage/
└── config/
└── garage.toml # Garage storage config (not included — see setup)Notes
Credentials are not restored by
restore_backup— n8n's API does not expose credential secrets on export. After restoring workflows, re-enter credentials manually in n8n Settings → Credentials.Multipart upload is used for Postgres backups, meaning no temporary files are written to disk — the dump streams directly from
pg_dumpto S3.The MCP server uses stdio transport — it is spawned per-session by Claude Desktop via
docker exec, not run as a persistent HTTP service.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/TameemAlkadiki/n8n-mcp-backup'
If you have feedback or need assistance with the MCP directory API, please join our Discord server