Seafile MCP Server
Click on "Deploy 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 Server Search for 'project-plan.md' across all my libraries"
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
MCP (Model Context Protocol) server for Seafile cloud storage. Access your self-hosted files from AI assistants like Claude, OpenCode, and other MCP clients.
Features
List, read, and write files in your Seafile libraries
Create and manage directories
Move, copy, and rename files
Search across libraries
Supports both account-based and library-specific authentication
Related MCP server: SharePoint MCP Server
Installation
Using pip
pip install seafile-mcpFrom source
git clone https://github.com/5p00kyy/seafile-mcp.git
cd seafile-mcp
pip install -e .Configuration
Create a .env file or set environment variables:
Required
SEAFILE_SERVER_URL: Your Seafile server URL
Authentication (choose one)
Option 1: Account Authentication (access all libraries)
SEAFILE_USERNAME: Your emailSEAFILE_PASSWORD: Your password
Option 2: Library Token (single library, more secure)
SEAFILE_REPO_TOKEN: API token from library settingsSEAFILE_REPO_ID: Library UUID
Optional
SEAFILE_MAX_READ_SIZE: Max file size to read (default: 1MB)SEAFILE_MAX_WRITE_SIZE: Max upload size (default: 10MB)SEAFILE_TIMEOUT: Request timeout in seconds (default: 30)
Usage with OpenCode
Add to your OpenCode MCP configuration:
{
"mcpServers": {
"seafile": {
"command": "python",
"args": ["-m", "seafile_mcp"],
"env": {
"SEAFILE_SERVER_URL": "https://your-seafile.com",
"SEAFILE_USERNAME": "user@example.com",
"SEAFILE_PASSWORD": "your-password"
}
}
}
}Or with library token:
{
"mcpServers": {
"seafile": {
"command": "seafile-mcp",
"env": {
"SEAFILE_SERVER_URL": "https://your-seafile.com",
"SEAFILE_REPO_TOKEN": "your-api-token",
"SEAFILE_REPO_ID": "library-uuid"
}
}
}
}Available Tools
Tool | Description |
| List all accessible libraries |
| Get library details |
| List directory contents |
| Read file content |
| Write text to a file |
| Upload binary file (base64) |
| Create a folder |
| Delete file or folder |
| Move file or folder |
| Copy file or folder |
| Rename file or folder |
| Get file metadata |
| Get download URL |
| Search files by name |
File Handling
Text files: Content returned directly (up to MAX_READ_SIZE)
Binary files: Returns metadata and download URL
Large files: Returns download URL instead of content
Security Notes
Use library tokens for production (limits access to single library)
Never commit
.envfiles with credentialsAPI tokens can be revoked from Seafile web interface
License
MIT
Available Tools
14 toolsseafile_copyA
Copy a file or directory within a Seafile library.
Args:
repo_id: The library/repository ID.
src_path: The path of the file or directory to copy.
dst_path: The destination directory path.
Returns:
OperationResult indicating success or failure.
Inputs: repo_id (required), src_path (required), dst_path (required). Returns: Represents the result of a file/directory operation.
seafile_create_directoryB
Create a new directory in a Seafile library.
Args:
repo_id: The library/repository ID.
path: The full path of the directory to create.
Returns:
OperationResult indicating success or failure.
Inputs: repo_id (required), path (required). Returns: Represents the result of a file/directory operation.
seafile_deleteA
Delete a file or directory from Seafile.
Warning: This operation is irreversible. Deleted items may be recoverable
from the library's trash for a limited time, depending on server settings.
Args:
repo_id: The library/repository ID.
path: The path to the file or directory to delete.
Returns:
OperationResult indicating success or failure.
Inputs: repo_id (required), path (required). Returns: Represents the result of a file/directory operation.
seafile_get_download_linkA
Get a temporary download URL for a file.
The download URL is typically valid for a limited time (usually 1 hour).
Args:
repo_id: The library/repository ID.
path: The path to the file within the library.
Returns:
Temporary download URL string.
Inputs: repo_id (required), path (required). Returns: result
seafile_get_file_infoB
Get metadata about a file.
Args:
repo_id: The library/repository ID.
path: The path to the file within the library.
Returns:
FileInfo containing file metadata including size, mtime, and MIME type.
Inputs: repo_id (required), path (required). Returns: Represents file metadata.
seafile_get_library_infoC
Get information about a specific library.
Args:
repo_id: The unique identifier of the library.
Returns:
Library object containing detailed library metadata.
Inputs: repo_id (required). Returns: Represents a Seafile library (repository).
seafile_list_directoryC
List files and folders in a directory.
Args:
repo_id: The library/repository ID.
path: The directory path to list (default: root "/").
Returns:
List of DirEntry objects for files and subdirectories.
Inputs: repo_id (required), path. Returns: result
seafile_list_librariesA
List all accessible Seafile libraries.
Returns a list of all libraries (repositories) the authenticated user has access to.
Note: This operation requires account-based authentication and may not work
with repository token authentication.
Returns:
List of Library objects containing library metadata.
Inputs: no named parameters. Returns: result
seafile_moveB
Move a file or directory within a Seafile library.
Args:
repo_id: The library/repository ID.
src_path: The current path of the file or directory.
dst_path: The destination directory path.
Returns:
OperationResult indicating success or failure.
Inputs: repo_id (required), src_path (required), dst_path (required). Returns: Represents the result of a file/directory operation.
seafile_read_fileA
Read a file from Seafile.
For text files within the size limit, returns the file content directly.
For binary files or files exceeding the size limit, returns a download URL.
Args:
repo_id: The library/repository ID.
path: The path to the file within the library.
Returns:
FileContent with either text content or a download URL.
Inputs: repo_id (required), path (required). Returns: Represents file content or download information.
seafile_renameA
Rename a file or directory in Seafile.
Args:
repo_id: The library/repository ID.
path: The current path of the file or directory.
new_name: The new name (not a path, just the name).
Returns:
OperationResult indicating success or failure.
Inputs: repo_id (required), path (required), new_name (required). Returns: Represents the result of a file/directory operation.
seafile_searchA
Search for files by name across Seafile libraries.
Searches file and folder names matching the query string.
Note: Search functionality depends on server configuration and may
not be available on all Seafile installations.
Args:
query: The search query string.
repo_id: Optional library ID to limit search scope.
Returns:
List of dictionaries containing search results with file information.
Inputs: query (required), repo_id. Returns: result
seafile_upload_fileA
Upload a binary file to Seafile.
Use this for uploading binary files by providing the content as base64.
For text files, prefer seafile_write_file instead.
Args:
repo_id: The library/repository ID.
path: The path where the file should be uploaded.
base64_content: The file content encoded as base64.
Returns:
OperationResult indicating success or failure.
Inputs: repo_id (required), path (required), base64_content (required). Returns: Represents the result of a file/directory operation.
seafile_write_fileA
Create or update a text file in Seafile.
If the file exists, it will be overwritten. If it doesn't exist, it will be created.
Parent directories must exist.
Args:
repo_id: The library/repository ID.
path: The path where the file should be written.
content: The text content to write.
Returns:
OperationResult indicating success or failure.
Inputs: repo_id (required), path (required), content (required). Returns: Represents the result of a file/directory operation.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool has a clearly distinct purpose targeting specific file operations or metadata retrieval in Seafile. There is no overlap; for example, seafile_copy vs seafile_move, seafile_upload_file vs seafile_write_file, and seafile_read_file vs seafile_get_download_link all serve different functions with clear boundaries described in their documentation.
All tools follow a consistent 'seafile_verb_noun' pattern with snake_case throughout, such as seafile_list_directory, seafile_create_directory, and seafile_get_file_info. This uniformity makes the tool set predictable and easy to navigate for an agent.
With 14 tools, this server is well-scoped for managing a Seafile file storage system. It covers essential operations like CRUD for files and directories, metadata access, search, and upload/download, which is appropriate for the domain without being overly sparse or bloated.
The tool set provides comprehensive coverage for file management in Seafile, including create, read, update, delete, copy, move, rename, list, search, and metadata retrieval. There are no obvious gaps; it supports full lifecycle operations for files and directories, ensuring agents can handle typical workflows without dead ends.
Maintenance
Related MCP Connectors
Search, organize and share the files in your S3-compatible buckets from your AI assistant.
Read and write KukGit repositories, files, issues and pull requests from an AI assistant.
Access the GitHub API, enabling file operations, repository management, search functionality, and…
Securely search and manage workspace context files for AI agents and teams.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConnects 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.4MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to manage Microsoft SharePoint documents and folders through natural language, supporting operations like listing, reading, uploading, updating, deleting, and creating Office files.13MIT
- AlicenseBqualityBmaintenancePathgate is a MCP server which gives AI tools access to your filesystem102MIT
- AlicenseCqualityBmaintenanceEnables AI assistants to manage Seafile files, folders, and libraries through MCP, with multi-user credential storage and dual token-based authentication.27MIT