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 Server upload ~/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: pCloud MCP
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
Available Tools
23 toolsclear_trashA
Permanently delete one item from the trash bin, or empty the whole trash bin. Irreversible.
Inputs: trash_id.
copyB
Copy a file or folder. A destination ending with '/' means 'into this folder, same name'.
Inputs: to (required), from (required), overwrite.
create_folderB
Create a folder (missing parent folders are created too)
Inputs: path (required).
deleteA
Delete files or folders (they go to the trash bin of their owner; restore with restore_from_trash)
Inputs: paths (required).
disk_infoA
Storage info of the Nextcloud account: used and available quota, server and user
Inputs: no named parameters.
downloadB
Download a file or a whole folder (recursively, parallel) to this machine. local_path is the target file, or an existing folder / path ending with '/' to download into.
Inputs: path (required), local_path (required), overwrite.
get_file_infoB
Detailed metadata of a file or folder: size, dates, type, file ID, permissions, web link
Inputs: path (required).
list_filesA
List files and folders at a path. Paths are relative to the user's files root, e.g. '/' or '/Projects'. A Files app link (…/apps/files/files/123?dir=/folder) works too.
Inputs: path, sort, limit, offset.
list_trashA
List items in the trash bin, newest first
Inputs: limit.
loginA
Sign in to Nextcloud with Login Flow v2: opens the server's login page in the default browser, the user signs in (SSO works), and an app password is issued and saved. Waits up to 2 minutes, then keeps waiting in the background and returns the login URL. Call this when other tools report that the user is not logged in. Without a browser, pass login_name and app_password (Settings → Security → App passwords).
Inputs: login_name, server_url, app_password.
moveB
Move or rename a file or folder. A destination ending with '/' means 'into this folder, same name'.
Inputs: to (required), from (required), overwrite.
read_fileB
Read a text file (txt, md, json, csv, svg, …) and return its contents (first 200 KB)
Inputs: path (required).
recent_filesB
Files modified recently, newest first (server-side search by modification date)
Inputs: days, limit, folder.
restore_from_trashA
Restore an item from the trash bin to its original location (id from list_trash)
Inputs: trash_id (required).
search_filesA
Server-side search by name (case-insensitive substring) in a folder tree, newest first. Optional MIME filter. Without query lists everything matching the filter.
Inputs: limit, query, folder, mime_type.
set_favoriteB
Mark or unmark a file/folder as favorite
Inputs: path (required), favorite.
upload_fileA
Upload a local file. Big files are uploaded in chunks. A destination ending with '/' keeps the local name.
Inputs: path (required), local_path (required), overwrite.
upload_folderA
Upload a whole local folder recursively in one call (parallel). The folder is created inside path under its own name. Existing files are skipped unless overwrite=true.
Inputs: path (required), local_path (required), overwrite.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Most tools target clearly distinct resources and actions: file reads, metadata, search, upload/download, folder creation, move/copy/delete, sharing, and trash operations. A few pairs could be confused at first glance (read_file vs. download, get_file_info vs. disk_info), but descriptions clarify the boundaries well.
The set mostly follows verb_noun patterns such as list_files, get_file_info, create_share, update_share, and restore_from_trash. There are some deviations—single-verb names like delete, copy, move, download, login—and noun-first names like disk_info and recent_files, but the naming remains readable and predictable.
23 tools is on the high side, but the server covers a broad domain: file browsing, reading, upload/download, folder operations, sharing, favorites, trash, login, and storage info. Nearly every tool maps to a distinct operation, so the count is reasonable rather than bloated.
Core file and folder lifecycle operations are well covered, including listing, metadata, search, upload, download, copy/move/delete, sharing CRUD, and trash restore/empty. Minor gaps remain, such as no dedicated listing of favorites or direct text-file edit/write operation, but these are largely workable through existing tools.
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
- AlicenseBqualityBmaintenanceEnables to manage Nextcloud files, user info, sharing, calendar, and contacts through optimized MCP tools with dynamic tool selection and enterprise-grade security.891MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to browse, read, write, search, and share files in a pCloud account over HTTPS, including folder management, trash access, and public link creation.1MIT
- AlicenseNot gradedqualityAmaintenanceA native Nextcloud app that exposes the instance as an MCP server so Claude and other MCP clients can read, search, and (with admin-granted permissions) edit files, notes, calendars, Deck cards, and Talk conversations. It runs inside Nextcloud with OAuth or app-password sign-in, applying each user's own Nextcloud permissions and admin-controlled per-operation grants.22AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables LLM agents to read and write Nextcloud files, notes, calendars, tasks, contacts, and Talk messages through a secure authenticated MCP endpoint.MIT