nextcloud-mcp-gateway
Provides tools for reading, writing, organizing, and managing files and folders in a Nextcloud instance via WebDAV, plus user information and health diagnostics through the OCS API.
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., "@nextcloud-mcp-gatewaylist all files in my Documents folder"
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.
module_type: mcp_server
status: active
protocol: mcp
primary_capability: nextcloud_webdav_ocs
requires: nextcloud, httpx
works_with: claude_desktop, ai_agents
last_verified: 2026-08-21nextcloud-mcp-gateway
Nextcloud Data Plane MCP Server for AI Agents to read, write, and manage files via WebDAV and OCS API.
Status and Last Verified Date
Status: Active
Last Verified Date: 2026-08-21
Related MCP server: nextcloud-mcp
What it does / does not do
What it does:
Exposes Nextcloud file operations (WebDAV) and user information (OCS API) to AI agents via the Model Context Protocol (MCP). It allows listing, reading, creating, and deleting files and folders, checking instance health and user quotas, and interacting with Nextcloud Deck (Kanban boards and cards) and Calendars (CalDAV).
What it does not do:
It does not administer the Nextcloud instance (e.g., creating users, configuring plugins, changing server settings), nor does it provide a full web GUI. It handles only data-plane operations scoped to the authenticated user.
Why an agent would use it
An AI agent can use this gateway to interact with a user's Nextcloud storage. Agents can read documents or code stored in Nextcloud, generate reports, write logs, organize files into folders, and delete temporary resources. With Deck and Calendar integration, agents can act as personal assistants, organizing tasks and scheduling events, seamlessly integrating AI workflows with the user's personal cloud.
Architecture and Dependencies
Language: Python 3.10+
Frameworks/Libraries:
mcp(FastMCP framework),httpx(async HTTP client),pydantic.APIs Used: Nextcloud WebDAV (
/remote.php/webdav) and Nextcloud OCS REST API (/ocs/v1.php/cloud).Execution: Runs as a standard stdio MCP server.
Compatibility
Compatible with Python 3.10+ and any standard MCP client (e.g., Claude Desktop). Requires a running Nextcloud instance reachable via HTTP/HTTPS.
Quick Start and Health Check
# Clone the repository
git clone https://github.com/TheNovaNodes/nextcloud-mcp-gateway.git
cd nextcloud-mcp-gateway
# Install dependencies and the CLI tool
pip install -e .
# The server can be started using the Python module execution:
python -m nextcloud_mcp_gateway.serverHealth Check: Agents can call the nextcloud_health tool which checks the /status.php endpoint of the configured Nextcloud instance.
Configuration and Environment Variables
Copy .env.example to .env and fill in credentials.
Variable | Description | Default |
| Local or private Nextcloud instance endpoint |
|
| Public HTTPS domain endpoint |
|
| Nextcloud username |
|
| Nextcloud App Password or WebDAV token |
|
| Request timeout in seconds |
|
Complete MCP Tool/API Table with Side Effects
Tool Name | Parameters | Side Effects | Description |
| None | None (Read-only) | Checks Nextcloud instance health, version, and |
|
| None (Read-only) | Lists files and folders in a Nextcloud directory via WebDAV |
|
| None (Read-only) | Reads the textual content of a file from Nextcloud storage. |
|
| Writes Data (HITL) | Creates or overwrites a file in Nextcloud storage via WebDAV |
|
| Deletes Data (HITL) | Deletes a file or folder from Nextcloud storage via WebDAV |
|
| Creates Data (HITL) | Creates a new folder in Nextcloud storage via WebDAV |
| None | None (Read-only) | Retrieves user storage quota, display name, and details via Nextcloud OCS API. |
| None | None (Read-only) | Lists all Nextcloud Deck Kanban boards available to the user. |
|
| Creates Data | Creates a new Kanban card in a Nextcloud Deck. |
|
| None (Read-only) | Lists events from a Nextcloud CalDAV calendar. |
|
| Creates Data | Creates a new event in Nextcloud CalDAV calendar using iCalendar (.ics). |
|
| None (Read-only) | Lists all stacks (columns) in a Nextcloud Deck board. |
|
| Modifies Data | Updates or moves a Kanban card in Nextcloud Deck. |
|
| Deletes Data | Deletes a Kanban card from Nextcloud Deck. |
|
| Deletes Data | Deletes an event from Nextcloud CalDAV calendar. |
|
| Executes Data | Approves and executes an action guarded by HITL (e.g. file deletion/creation). |
Security Model and Trust Boundaries
Authentication: Relies on HTTP Basic Authentication using
NC_USERandNC_APP_PASSWORD. It is highly recommended to use Nextcloud App Passwords rather than main account passwords.Authorization: Operations are limited entirely by the permissions of the authenticated user in Nextcloud.
Network Boundaries: The server must be able to reach
NC_URLover the network. Credentials are sent in HTTP headers (use HTTPS forNC_URLin production).
Tests and Exact Commands
Unit tests are written using pytest and pytest-asyncio. Run them with:
python3 -m pytest -vOperations, Logs, Backup/Restore, Rollback
Operations: The gateway itself is a stateless service.
Logs: Handled via the MCP client's standard error stream.
Backup/Restore: Since the server is stateless, no local backup is necessary. Actual file data should be backed up within the Nextcloud ecosystem.
Rollback: Roll back to a previous git commit or package version if an update fails.
Generic MCP-Client Example
{
"mcpServers": {
"nextcloud-gateway": {
"command": "nextcloud-mcp-gateway",
"env": {
"NC_URL": "https://your-nextcloud.com",
"NC_USER": "agent_user",
"NC_APP_PASSWORD": "your_app_password"
}
}
}
}Limitations and Roadmap
Limitations:
read_fileonly supports textual data and decodes via standard text formats. Binary files may fail or corrupt if requested this way.list_filesis limited to a depth of 1 (current directory only).
Roadmap:
Add support for binary file transfers.
Support recursive folder listings.
Enhanced error handling for large file transfers.
Related TheNovaNodes Modules
Part of the TheNovaNodes AI infrastructure integrations, providing seamless data plane access.
License
MIT License
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.
Related MCP Servers
- 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
- FlicenseBqualityDmaintenanceMCP server integrating Nextcloud services (tasks, calendar, notes, email, files, Deck) for AI assistant interaction.201
- AlicenseNot gradedqualityBmaintenanceAn MCP server that exposes Nextcloud APIs as tools for AI assistants, enabling management of files, calendar, contacts, conversations, and more.1MIT
- FlicenseNot gradedqualityDmaintenanceA hybrid REST + MCP file server for managing files with large file streaming support, enabling AI agents and web frontends to perform file operations via MCP tools and REST APIs.
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Cloud-hosted MCP server for durable AI memory
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/TheNovaNodes/nextcloud-mcp-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server