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., "@Seafile MCP Serverlist my libraries and search for files containing 'invoice'"
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.
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) | |
Docker Install | Self-host with Docker (recommended) | |
Manual Install | Self-host on Linux server | |
Synology NAS | Run on Synology NAS | |
UGREEN NAS | Run on UGREEN NAS via Docker | |
Raspberry Pi | Self-host on a Pi |
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?
Once set up, you can ask Claude things like:
"List all my libraries"
"Show me what's in my Documents folder"
"Read the contents of notes.txt"
"Create a new folder called 'Projects'"
"Move report.pdf to the Archive folder"
"Search for files containing 'invoice'"
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 --versionA 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
Step 2: Create a Virtual Environment
A virtual environment keeps this project's dependencies isolated from your system Python.
You should see (venv) at the start of your terminal prompt. This means the virtual environment is active.
Step 3: Install Dependencies
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)
Replace:
YOUR_EMAIL- Your Seafile login emailYOUR_PASSWORD- Your Seafile passwordYOUR_SEAFILE_SERVER- Your Seafile server URL (e.g.,cloud.seafile.com)
The response will look like:
Copy the token value (without quotes).
Step 5: Configure Your Credentials
Fill in your values:
Important:
No trailing slash on the URL
No quotes around values
Keep this file secret (it's already in
.gitignore)
Step 6: Test the Server
If everything is set up correctly, the server will start without errors. Press Ctrl+C to stop it.
Connecting to Claude
Choose the method that matches how you use Claude:
Option A: Claude Desktop App
Find your Claude Desktop config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Or in Claude Desktop:
Claudemenu →Settings→Developer→Edit ConfigAdd the MCP server configuration:
If the file is empty or doesn't exist, create it with:
{ "mcpServers": { "seafile": { "command": "/FULL/PATH/TO/seafile-mcp/venv/bin/python", "args": ["/FULL/PATH/TO/seafile-mcp/src/server.py"] } } }If you already have other MCP servers, add
seafileinside the existingmcpServersobject.Important: Replace
/FULL/PATH/TO/with the actual absolute path to where you cloned this repo.Example paths:
macOS:
/Users/yourname/projects/seafile-mcp/venv/bin/pythonWindows:
C:\\Users\\yourname\\projects\\seafile-mcp\\venv\\Scripts\\python.exe
Restart Claude Desktop completely:
Quit Claude Desktop (Cmd+Q on Mac, Alt+F4 on Windows)
Reopen Claude Desktop
Verify it works:
Start a new conversation
Look for the hammer/tools icon - "seafile" should be listed
Ask: "Use the hello tool" or "List my Seafile libraries"
Option B: Claude Code (CLI)
Create a in your project directory:
{ "mcpServers": { "seafile": { "command": "/FULL/PATH/TO/seafile-mcp/venv/bin/python", "args": ["/FULL/PATH/TO/seafile-mcp/src/server.py"] } } }Start Claude Code in that directory - it will automatically load the MCP server.
Test with: "List my Seafile libraries"
Available Tools
Once connected, Claude has access to these tools:
Tool | Description |
| Test that the MCP server is working |
| Test connection to your Seafile server |
| Get your Seafile account information |
| List all your libraries/repos |
| Get details of a specific library |
| List contents of a folder |
| Create a new library |
| Delete a library (permanent!) |
| Create a new folder |
| Delete a file or folder |
| Rename a file or folder |
| Move a file or folder |
| Copy a file or folder |
| Read a text file's contents |
| Get a download URL for a file |
| Get an upload URL for a folder |
| Search for files (requires search enabled on server) |
Troubleshooting
"Server not appearing in Claude Desktop"
Double-check the paths in your config are absolute paths (start with
/on Mac/Linux orC:\on Windows)Make sure you fully restarted Claude Desktop (not just closed the window)
Check for JSON syntax errors in your config file (missing commas, brackets)
"SEAFILE_URL or SEAFILE_TOKEN not configured"
Make sure you created the
.envfile (not just.env.example)Make sure the
.envfile is in the project root directory (same folder assrc/)Check there are no extra spaces or quotes in your
.envvalues
"Connection error: Could not reach server"
Verify your Seafile server URL is correct and accessible
Try opening the URL in a browser
Check if your server requires VPN access
"Authentication failed" or "401 Unauthorized"
Your API token may have expired - generate a new one
Make sure you copied the full token with no extra spaces
"Module not found" errors
Make sure you're using the Python from the virtual environment in your config
Run
venv/bin/pip listto verifymcpandhttpxare installed
Check server logs
Run the server manually to see any errors:
Security
Important: Please read SECURITY.md for full security considerations.
Key points:
Never commit your - It contains your API token
API tokens grant full access to your Seafile account - treat them like passwords
Review the code before running - inspect
src/server.pyto understand what it doesSecure file permissions - Run
chmod 600 .envto restrict access to your credentialsConsider token scope - Some Seafile deployments support scoped tokens with limited permissions
Reporting vulnerabilities: See SECURITY.md for responsible disclosure guidelines.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
By participating in this project, you agree to abide by our Code of Conduct.
License
MIT License - See LICENSE file for details.
Author
Setu Kathawate
GitHub: @setugk
Acknowledgments
Built with FastMCP for easy MCP server development
Uses the Seafile Web API