Connects Claude to your self-hosted or cloud-based Seafile storage
Seafile MCP Server
A Model Context Protocol (MCP) server that connects Claude to your Seafile file storage. This lets you ask Claude to browse, search, read, and manage files on your self-hosted Seafile server using natural language.
What is Seafile?
Seafile is an open-source, self-hosted file sync and share platform - similar to Dropbox or Google Drive, but you control your own data. It's popular for personal use, teams, and enterprises who want privacy and control over their files.
Why Seafile?
- Self-hosted: Your files stay on your own server
- Privacy-focused: No third-party access to your data
- Fast sync: Efficient file synchronization across devices
- Libraries: Organize files into encrypted or unencrypted libraries
- Cross-platform: Apps for Windows, Mac, Linux, iOS, Android
Don't have Seafile yet? Here's how to get started:
| Option | Description | Link |
|---|---|---|
| Seafile Cloud | Hosted by Seafile (easiest) | cloud.seafile.com |
| Docker Install | Self-host with Docker (recommended) | Docker Guide |
| Manual Install | Self-host on Linux server | Manual Guide |
| Synology NAS | Run on Synology NAS | Synology Package |
| UGREEN NAS | Run on UGREEN NAS via Docker | Docker Guide |
| Raspberry Pi | Self-host on a Pi | Pi Guide |
Why This MCP Server?
- Direct connection - Connects straight to your Seafile server, no middleman
- Privacy-first - Your data never leaves your infrastructure
- Free & open source - No subscriptions, no vendor lock-in
- Full control - Inspect, modify, and extend the code as needed
- Self-hosted - Runs locally alongside your self-hosted Seafile
What can you do with this MCP server?
Once set up, you can ask Claude things like:
Document Lookups
- "What are my flight details for the Hawaii trip?"
- "When is my car rental pickup?"
- "Find my tax files from 2024"
- "What's in my Immigration folder?"
- "Show me my recent receipts"
- "List all of Mom's travel folders"
- "Find Dad's visa documents"
Organization
- "Create a new folder called '2025 Taxes'"
- "Move the completed trip to Archive"
- "What's in my 'Ideas' folder?"
Quick Search
- "Find all PDFs related to insurance"
- "Which folders were modified this month?"
- "Do I have a copy of my lease agreement?"
Features
| Feature | Description |
|---|---|
| Browse Libraries | List all libraries, view library details |
| Navigate Folders | List directory contents at any path |
| Read Files | Read text file contents directly |
| File Operations | Create, rename, move, copy, delete files and folders |
| Download Links | Generate download links for any file |
| Upload Links | Get upload links for directories |
| Search | Search for files across libraries (if enabled on your server) |
Prerequisites
Before you start, make sure you have:
- Python 3.10 or higher - Check with
python3 --version - A Seafile server - Either self-hosted or a Seafile cloud account
- Claude Desktop app or Claude Code CLI - Where you'll use this MCP server
Installation
Step 1: Clone or Download This Repository
# Option A: Clone with git
git clone https://github.com/setugk/seafile-mcp.git
cd seafile-mcp
# Option B: Or download and extract the ZIP, then cd into it
Step 2: Create a Virtual Environment
A virtual environment keeps this project's dependencies isolated from your system Python.
# Create the virtual environment
python3 -m venv venv
# Activate it
# On macOS/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
You should see (venv) at the start of your terminal prompt. This means the virtual environment is active.
Step 3: Install Dependencies
pip install -r requirements.txt
This installs:
mcp- The Model Context Protocol libraryhttpx- For making HTTP requests to Seafilepython-dotenv- For loading configuration from.env
Step 4: Get Your Seafile API Token
You need an API token to authenticate with your Seafile server.
Option A: Using the Seafile Web Interface
- Log into your Seafile web interface
- Click your avatar/profile icon in the top right
- Go to Settings → Web API Auth Token
- Click Generate Token or copy your existing token
Option B: Using curl (Command Line)
c
Tools (7)
browse_librariesList all libraries and view library detailsnavigate_foldersList directory contents at any pathread_filesRead text file contents directlyfile_operationsCreate, rename, move, copy, delete files and foldersdownload_linksGenerate download links for any fileupload_linksGet upload links for directoriessearchSearch for files across librariesEnvironment Variables
SEAFILE_URLrequiredThe URL of your Seafile server (e.g., https://cloud.seafile.com)SEAFILE_TOKENrequiredWeb API Auth Token from Seafile settingsConfiguration
{
"mcpServers": {
"seafile": {
"command": "python3",
"args": ["/path/to/seafile-mcp/main.py"],
"env": {
"SEAFILE_URL": "https://your-seafile-server.com",
"SEAFILE_TOKEN": "your-api-token"
}
}
}
}