MCP server/file-management

Seafile MCP Server

MCP server for Seafile cloud storage

★ 65p00kyy/seafile-mcp ↗by 5p00kyyupdated
1

Add it to Claude Code

claude mcp add -e "SEAFILE_SERVER_URL=${SEAFILE_SERVER_URL}" seafile-mcp-d373 -- seafile-mcp
Required:SEAFILE_SERVER_URL+ 7 optional
2

Make your agent remember this setup

seafile-mcp-d373's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • List, read, and write files in Seafile libraries
  • Create and manage directory structures
  • Perform file operations like move, copy, and rename
  • Search across libraries by file name
  • Supports both account-based and library-specific authentication

Tools 14

seafile_list_librariesList all accessible libraries
seafile_get_library_infoGet library details
seafile_list_directoryList directory contents
seafile_read_fileRead file content
seafile_write_fileWrite text to a file
seafile_upload_fileUpload binary file (base64)
seafile_create_directoryCreate a folder
seafile_deleteDelete file or folder
seafile_moveMove file or folder
seafile_copyCopy file or folder
seafile_renameRename file or folder
seafile_get_file_infoGet file metadata
seafile_get_download_linkGet download URL
seafile_searchSearch files by name

Environment Variables

SEAFILE_SERVER_URLrequiredYour Seafile server URL
SEAFILE_USERNAMEYour Seafile email address
SEAFILE_PASSWORDYour Seafile password
SEAFILE_REPO_TOKENAPI token from library settings
SEAFILE_REPO_IDLibrary UUID
SEAFILE_MAX_READ_SIZEMax file size to read (default: 1MB)
SEAFILE_MAX_WRITE_SIZEMax upload size (default: 10MB)
SEAFILE_TIMEOUTRequest timeout in seconds (default: 30)

Try it

List all the libraries available in my Seafile account.
Search for a file named 'project-notes.txt' in my documents library.
Read the contents of the file 'README.md' in the root directory.
Create a new folder named 'archive' in my current library.
Move the file 'report.pdf' to the 'archive' folder.
Original README from 5p00kyy/seafile-mcp

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

Installation

Using pip

pip install seafile-mcp

From 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 email
  • SEAFILE_PASSWORD: Your password

Option 2: Library Token (single library, more secure)

  • SEAFILE_REPO_TOKEN: API token from library settings
  • SEAFILE_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": "[email protected]",
        "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
seafile_list_libraries List all accessible libraries
seafile_get_library_info Get library details
seafile_list_directory List directory contents
seafile_read_file Read file content
seafile_write_file Write text to a file
seafile_upload_file Upload binary file (base64)
seafile_create_directory Create a folder
seafile_delete Delete file or folder
seafile_move Move file or folder
seafile_copy Copy file or folder
seafile_rename Rename file or folder
seafile_get_file_info Get file metadata
seafile_get_download_link Get download URL
seafile_search 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 .env files with credentials
  • API tokens can be revoked from Seafile web interface

License

MIT

Frequently Asked Questions

What are the key features of Seafile MCP Server?

List, read, and write files in Seafile libraries. Create and manage directory structures. Perform file operations like move, copy, and rename. Search across libraries by file name. Supports both account-based and library-specific authentication.

What can I use Seafile MCP Server for?

Automating file organization by moving documents into specific project folders via AI commands.. Quickly searching and retrieving content from self-hosted cloud storage without leaving the AI chat interface.. Updating documentation or text files directly within Seafile using AI-generated content.. Managing library access securely by using library-specific tokens for specific AI workflows..

How do I install Seafile MCP Server?

Install Seafile MCP Server by running: pip install seafile-mcp

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.

Conare · memory for coding agents

Turn this server into reusable context

Keep Seafile MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest