loading…
Search for a command to run...
loading…
Connects Claude to your self-hosted or cloud-based Seafile storage for managing libraries and files through natural language. It enables users to browse directo
Connects Claude to your self-hosted or cloud-based Seafile storage for managing libraries and files through natural language. It enables users to browse directories, read file contents, and perform file operations like moving, renaming, or searching across their private infrastructure.
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.
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?
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 |
Once set up, you can ask Claude things like:
Document Lookups
Organization
Quick Search
| 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) |
Before you start, make sure you have:
python3 --version# 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
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.
pip install -r requirements.txt
This installs:
mcp - The Model Context Protocol libraryhttpx - For making HTTP requests to Seafilepython-dotenv - For loading configuration from .envYou need an API token to authenticate with your Seafile server.
curl -d "username=YOUR_EMAIL&password=YOUR_PASSWORD" \
https://YOUR_SEAFILE_SERVER/api2/auth-token/
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:
{"token": "a]1b2c3d4e5f6g7h8i9j0..."}
Copy the token value (without quotes).
# Copy the example config
cp .env.example .env
# Edit .env with your favorite editor
nano .env # or vim, code, etc.
Fill in your values:
SEAFILE_URL=https://your-seafile-server.com
SEAFILE_TOKEN=your-api-token-here
Important:
.gitignore)python src/server.py
If everything is set up correctly, the server will start without errors. Press Ctrl+C to stop it.
Choose the method that matches how you use Claude:
Find your Claude Desktop config file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonOr in Claude Desktop: Claude menu → Settings → Developer → Edit Config
Add 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 seafile inside the existing mcpServers object.
Important: Replace /FULL/PATH/TO/ with the actual absolute path to where you cloned this repo.
Example paths:
/Users/yourname/projects/seafile-mcp/venv/bin/pythonC:\\Users\\yourname\\projects\\seafile-mcp\\venv\\Scripts\\python.exeRestart Claude Desktop completely:
Verify it works:
Create a .mcp.json file 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"
Once connected, Claude has access to these tools:
| Tool | Description |
|---|---|
hello |
Test that the MCP server is working |
ping_server |
Test connection to your Seafile server |
get_account_info |
Get your Seafile account information |
list_libraries |
List all your libraries/repos |
get_library |
Get details of a specific library |
list_directory |
List contents of a folder |
create_library |
Create a new library |
delete_library |
Delete a library (permanent!) |
create_directory |
Create a new folder |
delete_item |
Delete a file or folder |
rename_item |
Rename a file or folder |
move_item |
Move a file or folder |
copy_item |
Copy a file or folder |
get_file_content |
Read a text file's contents |
get_file_download_link |
Get a download URL for a file |
get_upload_link |
Get an upload URL for a folder |
search_files |
Search for files (requires search enabled on server) |
/ on Mac/Linux or C:\ on Windows).env file (not just .env.example).env file is in the project root directory (same folder as src/).env valuesvenv/bin/pip list to verify mcp and httpx are installedRun the server manually to see any errors:
source venv/bin/activate
python src/server.py
Features planned for future releases:
| Feature | Status | Description |
|---|---|---|
| PDF reading | Planned | Extract text from PDF files so Claude can answer questions about receipts, contracts, etc. |
| Image OCR | Idea | Extract text from images using OCR |
| File upload | Idea | Upload files to Seafile via Claude |
Have a feature request? Open an issue!
Important: Please read SECURITY.md for full security considerations.
.env file - It contains your API tokenchmod 600 .env to restrict accessWhen using this MCP server:
Best practice: Avoid asking Claude to read highly sensitive files (passwords, private keys, financial account numbers).
The MCP server allows Claude to:
Be careful with destructive commands. Consider using a read-only API token if your Seafile server supports scoped permissions.
.env fileReporting vulnerabilities: See SECURITY.md for responsible disclosure guidelines.
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
By participating in this project, you agree to abide by our Code of Conduct.
MIT License - See LICENSE file for details.
Setu Kathawate
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"seafile-mcp-server": {
"command": "npx",
"args": []
}
}
}