Nextcloud MCP Server
Connects to any Nextcloud instance via the official WebDAV and OCS (files_sharing) APIs, providing tools for browsing, searching, and managing files and folders (list, metadata, create, copy, move, delete, chunked upload/download, recursive folder upload), reading text files, managing favorites, and working with shares — public links and user/group/email shares, including listing, updating, and deleting them — plus trash bin operations (list, restore, empty) and quota inspection.
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., "@Nextcloud MCP Serverupload ~/Desktop/report.pdf to /Projects and share it with anna@example.com"
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.
Nextcloud MCP Server
English · Русский
MCP server for any Nextcloud instance. Files, search, upload/download (files and whole folders), shares and public links, favorites, trash bin. Works with any MCP client (Claude Code, Claude Desktop, Cursor, etc.).
Uses only official APIs: WebDAV (/remote.php/dav) and OCS (files_sharing). Requires Node.js ≥ 20.12.
Tools (23)
Tool | What it does |
| Sign in through the browser (Login Flow v2, SSO works); the app password is saved |
| Used / available quota |
| Folder contents (sort, |
| Metadata: size, dates, MIME, file ID, permissions, web link |
| Server-side search by name (substring, case-insensitive) in a folder tree, MIME filter |
| Files modified in the last N days |
| Create a folder (with parents) |
| Copy / move, rename |
| Delete (several paths per call; to the trash bin) |
| Upload a local file (chunked upload for files > 10 MB) |
| Upload a local folder recursively, in parallel |
| Download a file or a whole folder to this machine |
| Read a text file (first 200 KB) |
| Add / remove a favorite |
| Public link (password, expiry, label) or share with a user / group / email |
| My shares (all, of a path; with |
| What others shared with me |
| Change / remove a share |
| Trash bin |
Paths are relative to your files root: /, /Projects/logo.svg. A Files app link works as a path too: https://cloud.example.com/apps/files/files/123?dir=/Projects/.
Related MCP server: nextcloud-agent
Installation
git clone https://github.com/a-lagutov/nextcloud-mcp.git
cd nextcloud-mcp
npm install
npm run buildClaude Code:
claude mcp add nextcloud -s user -- node /absolute/path/to/nextcloud-mcp/dist/index.jsClaude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"nextcloud": { "command": "node", "args": ["/absolute/path/to/nextcloud-mcp/dist/index.js"] }
}
}Login
The server starts with no configuration. Ask Claude "log in to Nextcloud at https://cloud.example.com", or run npm run login -- --server https://cloud.example.com. The server address is remembered, so later logins need no server_url:
The server's login page opens in your default browser — sign in as usual (SSO included) and click "Grant access".
Nextcloud issues an app password for this server; it is saved to
~/.config/nextcloud-mcp/credentials.json(mode 600) and works at once, no restart.
The login tool waits up to 2 minutes, then returns the login link and finishes in the background (the link is valid for 20 minutes). To switch to another server, pass a new server_url / --server.
Without a browser (Docker, SSH): create an app password in Nextcloud → Settings → Security → "Create new app password", then pass login_name + app_password to login, or npm run login -- --user <LOGIN> --password <APP_PASSWORD>.
⚠️ The app password gives full access to your files. Revoke it at any time: Settings → Security → Devices & sessions (it is named
nextcloud-mcp (<host>)).
Environment variables (optional)
They override the saved values — for example in Docker/CI.
Variable | Purpose |
| Server URL, e.g. |
| Login name |
| App password |
| Internal user ID, if it differs from the login name (otherwise call |
Limitations
search_filessearches names only, not file contents; at most 500 results per call.list_filesgets the whole folder in one PROPFIND and pages locally, so huge folders take a moment.Deleting from a folder shared with you puts the item in the owner's trash bin, not yours.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Notes, files, GitHub, and Drive through one MCP connection.
Notes, files, GitHub, and Drive through one MCP connection.
Notes, files, GitHub, and Drive through one MCP connection.
Browse and manage files in your Moxt AI workspace from any MCP client.
Related MCP Servers
- AlicenseBqualityAmaintenanceMCP server for Nextcloud Collectives that exposes collectives, pages, tags, attachments, page history, and trash to Claude and MCP-compatible clients via OCS API and WebDAV.57MIT
- AlicenseNot gradedqualityAmaintenanceEnables to manage Nextcloud files, user info, sharing, calendar, and contacts through optimized MCP tools with dynamic tool selection and enterprise-grade security.MIT
- AlicenseAqualityAmaintenanceMCP server for the Nextcloud Passwords app, enabling reading and managing password entries (list, search, create, update, delete) with strong security guarantees.14MIT
- FlicenseNot gradedqualityBmaintenanceA remote MCP server that exposes a Nextcloud account as tools for file management via WebDAV, calendar events, share links, and Talk chat.-