home / mcp / seafile mcp server
Provides programmatic access to Seafile libraries via MCP for listing, reading, writing, and managing files.
Configuration
View docs{
"mcpServers": {
"5p00kyy-seafile-mcp": {
"command": "python",
"args": [
"-m",
"seafile_mcp"
],
"env": {
"SEAFILE_REPO_ID": "library-uuid",
"SEAFILE_TIMEOUT": "30",
"SEAFILE_PASSWORD": "your-password",
"SEAFILE_USERNAME": "[email protected]",
"SEAFILE_REPO_TOKEN": "your-api-token",
"SEAFILE_SERVER_URL": "https://your-seafile.com",
"SEAFILE_MAX_READ_SIZE": "1048576",
"SEAFILE_MAX_WRITE_SIZE": "10485760"
}
}
}
}You can access files stored in your Seafile libraries from AI assistants and MCP clients by running a Seafile MCP server. It lets you list, read, write, and manage files and directories across your Seafile account or a specific library, with flexible authentication options for security and convenience.
Set up the Seafile MCP server locally or remotely, then point your MCP client to it. You can connect using account-based authentication to access all libraries, or use a library token for library-specific access. Once running, you can perform common operations such as listing libraries and directories, reading and writing file contents, uploading files, and searching across libraries.
Prerequisites: Python 3.8+ and pip must be available on your system.
pip install seafile-mcpIf you prefer to install from source, clone the repository and install in editable mode.
git clone https://github.com/5p00kyy/seafile-mcp.git
cd seafile-mcp
pip install -e .Create a configuration set using environment variables. You can supply these via a .env file or your system environment.
Required values establish where the Seafile server is and how you authenticate.
Authentication can be done in two ways: account authentication (access all libraries) or library token (access a single library for tighter security). You should choose the option that best fits your security requirements.
Optional tuning parameters let you control read and write sizes and timeouts to suit large files or slower networks.
Use library tokens for production deployments when you want to limit access to a single library. Never commit credentials in environment files. API tokens can be revoked from the Seafile web interface.
The following examples show how to configure an MCP client to run the Seafile MCP server using either account credentials or a library token.
List all accessible Seafile libraries for the authenticated user.
Retrieve detailed information about a specific library.
List contents of a directory within a library.
Read the content of a file, with text files returned directly.
Write text content to a file in a library.
Upload a binary file to a library (base64).
Create a new folder inside a library.
Delete a file or folder from a library.
Move a file or folder within a library.
Copy a file or folder within a library.
Rename a file or folder.
Get metadata for a specific file.
Obtain a downloadable URL for a file.
Search for files by name across libraries.