Get the FREE Ultimate OpenClaw Setup Guide →

nextcloud

A MCP server for reading data from NextCloud

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio monadical-sas-nextcloud-mcp-server node server.js \
  --env NEXTCLOUD_BASEURL="URL to the NextCloud instance (e.g., https://cloud.example.com)" \
  --env NEXTCLOUD_PASSWORD="NextCloud password" \
  --env NEXTCLOUD_USERNAME="NextCloud username" \
  --env NEXTCLOUD_RESOLVE_ROOT="Optional: root path within NextCloud to expose (e.g., /)
"

How to use

This MCP server provides read-only access to data stored in a NextCloud instance by exposing MCP-compatible endpoints that enumerate directories, fetch file metadata, and stream file contents. After starting the server, connect an MCP client to the NextCloud MCP endpoint to browse the file tree, request file attributes (size, last modified, mime type), and access file contents on demand. Use the available MCP commands to list children for a directory, obtain file metadata, and retrieve file streams. The server is intended for integration into larger data-gathering pipelines where MCP-based querying is preferred over ad-hoc REST calls.

How to install

Prerequisites:

  • Node.js (LTS) and npm installed on your system
  • Access to the NextCloud instance you want to read from

Install and run:

  1. Clone or download the MCP server repository: git clone https://example.com/monadical-sas-nextcloud-mcp-server.git cd monadical-sas-nextcloud-mcp-server

  2. Install dependencies: npm install

  3. Configure environment variables (see below) or create a .env file with the values: NEXTCLOUD_BASEURL=https://cloud.example.com NEXTCLOUD_USERNAME=your-username NEXTCLOUD_PASSWORD=your-password NEXTCLOUD_RESOLVE_ROOT=/

  4. Start the MCP server: npm run start or node server.js

  5. Verify the server is running by checking logs or attempting a basic MCP query against the configured endpoint.

Additional notes

Environment variables:

  • NEXTCLOUD_BASEURL: Base URL of the NextCloud instance
  • NEXTCLOUD_USERNAME / NEXTCLOUD_PASSWORD: Credentials for basic authentication (use app passwords if supported by your NextCloud setup)
  • NEXTCLOUD_RESOLVE_ROOT: Optional default root directory within NextCloud to expose; defaults to '/'

Security considerations:

  • Do not expose credentials in logs or publicly accessible sites
  • Prefer app-specific passwords or OAuth tokens if supported by your NextCloud instance

Configuration hints:

  • You can extend the env block to include timeouts, SSL verification toggles, or proxy settings depending on your deployment environment
  • If your NextCloud uses self-signed certificates, consider configuring SSL options in your Node.js runtime accordingly

Related MCP Servers

Sponsor this space

Reach thousands of developers