Get the FREE Ultimate OpenClaw Setup Guide →

nextcloud

A professional Model Context Protocol (MCP) server for seamless NextCloud integration

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio abdullahmashuk-nextcloud-mcp-server node build/index.js \
  --env NEXTCLOUD_URL="https://your-nextcloud-server.com" \
  --env NEXTCLOUD_PASSWORD="your-app-password" \
  --env NEXTCLOUD_USERNAME="your-username"

How to use

This MCP server provides a comprehensive bridge between your AI agents and a NextCloud instance. It exposes a suite of tools for file management and sharing, including listing files, uploading and downloading, creating directories, moving or copying items, and managing shares and versions. The server leverages a TypeScript-first architecture and WebDAV compatibility to ensure smooth interaction with NextCloud, while offering robust security through app passwords and environment-based configuration. To use it, install the server, set up an app password in NextCloud, configure your environment variables, and run the MCP server. Client configurations can reference the server by name (e.g., nextcloud) and pass credentials through environment variables for secure access. Detailed tool examples in the documentation demonstrate how to perform common tasks like listing files, uploading content, moving items, creating public shares, and retrieving file versions, all via standard MCP command structures.

How to install

Prerequisites:

  • Node.js (recommended LTS) and npm installed on your system
  • Git installed for cloning the repository
  • Access to a NextCloud instance with an app password for API authentication

Installation steps:

  1. Clone the repository or install from npm (preferred approach shown in Quick Start):
  2. Install dependencies:
    • npm install
  3. Build the project (if you are starting from source):
    • npm run build
  4. Run the MCP server:
    • node build/index.js Alternatively, if you install globally via npm and use the CLI:
    • npm install -g nextcloud-mcp-server
    • nextcloud-mcp-server
  5. Configure environment variables (example):
    • Copy the template: cp .env.example .env
    • Edit .env with your NextCloud URL and credentials: NEXTCLOUD_URL=https://your-nextcloud-server.com NEXTCLOUD_USERNAME=your-username NEXTCLOUD_PASSWORD=your-app-password
    • Run the server again so it picks up the env vars.

Additional notes

Environment variables are the recommended way to configure credentials securely. Keep your app password scoped to MCP operations and rotate credentials periodically. If you encounter connection issues, verify that NEXTCLOUD_URL is reachable from the server, that the app password has the necessary permissions, and that your NextCloud server allows API access from the MCP host. When running in production, consider restricting network access and enabling HTTPS. The available tools cover a broad range of NextCloud operations, including file transfers, directory management, share creation, and version control, which can be used in combination to automate complex workflows.

Related MCP Servers

Sponsor this space

Reach thousands of developers