Seafile MCP Server

$git clone https://github.com/setugk/seafile-mcp.git && cd seafile-mcp && python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt
README.md

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 library
  • httpx - For making HTTP requests to Seafile
  • python-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
  1. Log into your Seafile web interface
  2. Click your avatar/profile icon in the top right
  3. Go to SettingsWeb API Auth Token
  4. Click Generate Token or copy your existing token
Option B: Using curl (Command Line)
c

Tools (7)

browse_librariesList all libraries and view library details
navigate_foldersList directory contents at any path
read_filesRead text file contents directly
file_operationsCreate, rename, move, copy, delete files and folders
download_linksGenerate download links for any file
upload_linksGet upload links for directories
searchSearch for files across libraries

Environment Variables

SEAFILE_URLrequiredThe URL of your Seafile server (e.g., https://cloud.seafile.com)
SEAFILE_TOKENrequiredWeb API Auth Token from Seafile settings

Configuration

claude_desktop_config.json
{
  "mcpServers": {
    "seafile": {
      "command": "python3",
      "args": ["/path/to/seafile-mcp/main.py"],
      "env": {
        "SEAFILE_URL": "https://your-seafile-server.com",
        "SEAFILE_TOKEN": "your-api-token"
      }
    }
  }
}

Try it

What are my flight details for the Hawaii trip in my Seafile storage?
Find all PDFs related to insurance in my libraries.
Create a new folder called '2025 Taxes' in my main library.
Move the completed trip folder to Archive.
Show me the contents of my 'Ideas' folder.

Frequently Asked Questions

How do I install Seafile MCP Server?

Install Seafile MCP Server by running: git clone https://github.com/setugk/seafile-mcp.git && cd seafile-mcp && python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt

What MCP clients work with Seafile MCP Server?

Seafile MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use Seafile MCP Server with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free