seafile-vault-mcp
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-vault-mcpsearch my vault for notes on MCP integration"
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-vault-mcp
A self-hosted Model Context Protocol (MCP) server that gives Claude read/write access to a Seafile library, turning it into a personal knowledge vault ("Second Brain").
The server exposes MCP tools over Streamable HTTP (HTTP with JSON/SSE), so it works as a remote custom connection from Claude.ai on desktop and mobile.
Features
Read and write files in a single configured Seafile library
Directory operations — list, create, delete
Full-text search across vault contents via SQLite FTS5 (no external search service)
Persistent search index that survives container restarts
Background sync re-indexes changed files every 60 seconds
Bearer token authentication on the MCP endpoint
Related MCP server: Library MCP
Prerequisites
A running Seafile instance (self-hosted or Seafile Cloud)
A Seafile API token with access to your vault library
The repository ID of the library you want to expose
Docker and Docker Compose (recommended), or Python 3.12+
Quick start (Docker)
Clone this repository and copy the example environment file:
cp .env.example .envEdit
.envwith your Seafile URL, token, repo ID, and a strongMCP_AUTH_TOKEN.Start the server:
docker compose up -d --buildConfirm it is running:
docker compose logs -fOn first startup you should see index build progress in the logs. Subsequent restarts load the existing index and run a quick incremental sync.
The MCP endpoint is available at:
http://<your-host>:8000/mcpMCP tools
Tool | Description |
| Read a file by path (text content or binary metadata) |
| Create or overwrite a file |
| Create a directory (with parent dirs) |
| Delete a file or empty directory |
| List directory entries with name, type, size, mtime |
| FTS5 full-text search with optional path filter and |
Getting a Seafile API token
Log in to your Seafile web interface.
Open Settings (avatar menu → Settings).
Go to the Developer or API section (wording varies by Seafile version).
Click Generate new token (or similar).
Copy the token into
SEAFILE_TOKENin your.envfile.
The token is sent as Authorization: Token <token> to the Seafile API. It is never logged by this server.
Finding your Seafile repo ID
The repo ID is a UUID that identifies a specific library.
Via the web UI: Open the library in Seafile. The URL often contains the repo ID:
https://seafile.example.com/library/<repo-id>/...Via the API:
curl -H "Authorization: Token YOUR_TOKEN" \
"https://seafile.example.com/api2/repos/"Look for your library name in the JSON response and copy its id field into SEAFILE_REPO_ID.
Adding to Claude.ai
Deploy the server so it is reachable over HTTPS from the internet (use a reverse proxy such as nginx or Caddy with TLS).
In Claude.ai, go to Settings → Connectors (or Integrations).
Add a custom MCP server / remote connector.
Set the server URL to your public endpoint, including the
/mcppath:https://mcp.yourdomain.com/mcpWhen prompted for authentication, provide your
MCP_AUTH_TOKENas a Bearer token.
Claude will connect over Streamable HTTP. The server accepts GET, POST, and DELETE on /mcp.
Environment variables
Variable | Required | Default | Description |
| Yes | — | Base URL of your Seafile instance |
| Yes | — | Seafile API token |
| Yes | — | UUID of the library to expose |
| Yes | — | Bearer token required to connect to this MCP server |
| No |
| Host interface to bind |
| No |
| Port to listen on |
| No |
| Path to the SQLite FTS5 index file |
| No | (none) | Comma-separated CORS origins for browser clients |
Local development (without Docker)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
export SEAFILE_URL=https://seafile.example.com
export SEAFILE_TOKEN=...
export SEAFILE_REPO_ID=...
export MCP_AUTH_TOKEN=...
export INDEX_DB_PATH=./data/index.db
python server.pySearch index
On first startup the server walks the entire configured library and indexes plain-text files (.md, .txt, .py, .json, .yaml, and similar formats).
The index is stored at
INDEX_DB_PATH(persisted via the Docker/datavolume).Library walks use a single recursive directory listing (
recursive=1) when the Seafile server supports it.A background thread polls Seafile every 60 seconds and re-indexes changed files.
Writes and deletes update the index immediately.
search_vault uses a two-pass strategy: multi-word queries first require all terms to match (match_quality: "exact"). If that returns no results, it falls back to matching any term (match_quality: "partial").
Only the single library identified by SEAFILE_REPO_ID is accessible — not your full Seafile account.
Running tests
pip install -r requirements-dev.txt
pytestSecurity notes
Use a long, random
MCP_AUTH_TOKENand terminate TLS at a reverse proxy.The server exposes one Seafile library only; repo ID and token are fixed at deploy time.
Seafile credentials are read from environment variables and are not written to logs.
CORS is disabled by default. Set
MCP_ALLOWED_ORIGINSonly if you need browser-based MCP clients.
Project layout
seafile-vault-mcp/
server.py MCP server, tools, HTTP transport
seafile.py Seafile REST API client
index.py SQLite FTS5 index management
Dockerfile
docker-compose.yml
.env.example
requirements-dev.txt
tests/
README.md
LICENSELicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dm7500/seafile-vault-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server