Skip to main content

Nextcloud MCP Server

Nextcloud MCP Server

Docker Image

A production-ready MCP server that connects AI assistants to your Nextcloud instance.

Enable Large Language Models like Claude, GPT, and Gemini to interact with your Nextcloud data through a secure API. Create notes, manage calendars, organize contacts, work with files, and more - all through natural language conversations.

This is a dedicated standalone MCP server designed for external MCP clients like Claude Code and IDEs. It runs independently of Nextcloud (Docker, VM, Kubernetes, or local) and provides deep CRUD operations across Nextcloud apps.

[!NOTE] Want AI features inside Nextcloud instead? You can point Nextcloud's own Assistant at this server — see AI inside Nextcloud below.

[!TIP] Don't want to self-host? Astrolabe Cloud is a managed hosting service for this MCP server, aimed at users and teams who want advanced features like background sync and semantic search without operating the infrastructure themselves. The service is currently under development — sign up on the landing page to join the early-adopter list.

Quick Start

Run the server locally with uvx (no installation required):

NEXTCLOUD_HOST=https://your.nextcloud.instance.com \
NEXTCLOUD_USERNAME=your_username \
NEXTCLOUD_PASSWORD=your_app_password \
  uvx nextcloud-mcp-server run --transport stdio

Or add it directly to your MCP client configuration (e.g. claude_desktop_config.json or .claude/settings.json):

{
  "mcpServers": {
    "nextcloud": {
      "command": "uvx",
      "args": ["nextcloud-mcp-server", "run", "--transport", "stdio"],
      "env": {
        "NEXTCLOUD_HOST": "https://your.nextcloud.instance.com",
        "NEXTCLOUD_USERNAME": "your_username",
        "NEXTCLOUD_PASSWORD": "your_app_password"
      }
    }
  }
}

[!TIP] Generate an app password in Nextcloud under Settings > Security > Devices & sessions instead of using your login password.

Docker

For full features including semantic search, run with Docker:

docker run -p 127.0.0.1:8000:8000 --rm \
  -e NEXTCLOUD_HOST=https://your.nextcloud.instance.com \
  -e NEXTCLOUD_USERNAME=your_username \
  -e NEXTCLOUD_PASSWORD=your_app_password \
  ghcr.io/cbcoutinho/nextcloud-mcp-server:latest

Then connect your MCP client (Claude Desktop, IDEs, mcp dev, etc.) to http://127.0.0.1:8000/mcp.

For Kubernetes, see cbcoutinho/helm-charts. For other deployment options and Compose profiles, see docs/installation.md.

Key Features

  • 110+ MCP Tools - Comprehensive API coverage across 10 Nextcloud apps
  • MCP Resources - Structured data URIs for browsing Nextcloud data
  • Semantic Search (Experimental) - Optional vector-powered search for Notes, Files, News items, Deck cards, and Mail messages (requires Qdrant + Ollama)
  • Document Processing - OCR and text extraction from PDFs, DOCX, images with progress notifications
  • Flexible Deployment - Docker, Kubernetes (Helm chart), VM, or local installation
  • Production-Ready Auth - Basic Auth with app passwords; multi-user via Login Flow v2 — MCP clients authenticate via OAuth, the server handles Nextcloud app passwords transparently
  • Tag-Based File Exclusion - Hide sensitive files/folders from MCP file tools by tagging them with a configured Nextcloud system tag (EXCLUDED_TAGS). See docs/configuration.md
  • Multiple Transports - streamable-http (default) and stdio

Supported Apps

App Tools Capabilities
Notes 7 Full CRUD, keyword search, semantic search
Calendar 20+ Events, todos (tasks), recurring events, attendees, availability
Contacts 8 Full CardDAV support, address books
Files (WebDAV) 14 Filesystem access, OCR/document processing, file comments
Deck 15 Boards, stacks, cards, labels, assignments
Cookbook 13 Recipe management, URL import (schema.org)
Tables 5 Row operations on Nextcloud Tables
Sharing 10+ Create and manage shares
News 8 Feeds, folders, items, feed health monitoring
Mail 13 Accounts, mailboxes, messages, attachments, send; flags (read/unread, star), tags, move, delete
Collectives 16 Full CRUD on collectives, pages, and tags
Talk (spreed) 6 List conversations, read/post messages, mark as read, list participants
Semantic Search 2+ Vector search for Notes, Files, News items, Deck cards, and Mail messages (experimental, opt-in, requires infrastructure)

Want to see another Nextcloud app supported? Open an issue or contribute a pull request!

Authentication

The MCP server authenticates to Nextcloud using app-specific passwords (Basic Auth). Three deployment modes are supported:

Mode Best for
Single-User (BasicAuth) Personal use, development, single-user deployments
Multi-User (BasicAuth pass-through) Multi-user setups where clients send credentials via Authorization header
Multi-User (Login Flow v2) Multi-user / hosted deployments — clients authenticate to the MCP server via OAuth, and the server obtains a per-user app password from Nextcloud and uses it transparently

OAuth-direct-to-Nextcloud is no longer supported (it required upstream patches to user_oidc that were never merged). Login Flow v2 replaces it for multi-user deployments and works with stock Nextcloud.

See docs/authentication.md for setup instructions.

AI inside Nextcloud

This server was built for AI assistants that live outside Nextcloud — Claude Code, an IDE, a desktop client. But Nextcloud has its own chat, the Assistant app, and there are two ways to give it access to your content.

Answering the Assistant's "Chat with AI" What it needs What it does
Context Agent (by Nextcloud) AppAPI and a separate container to run the ExApp Acts on your Nextcloud — sends Talk messages, creates events, and other write actions, with a confirmation step
Astrolabe + this server The Astrolabe app, and this server reachable from it Answers from your own documents and cites them: every claim links to the file, note or card it came from. Read-only

Astrolabe is a Nextcloud app that registers itself as the Assistant's agent provider, so no AppAPI and no extra container are involved — the Assistant talks to it, and it searches your content through this server. Each user's questions run under their own identity, so nobody sees anything they couldn't already open.

You can install both and pick per instance, or neither: none of this is required to use this server from an external MCP client.

To set it up, see the Astrolabe setup guide. For the architectural detail behind the comparison, see docs/comparison-context-agent.md.

Semantic Search

An experimental RAG pipeline that lets MCP clients find Nextcloud content by meaning rather than keywords — a query for "car" also surfaces notes about "vehicle" or "transportation". Disabled by default (ENABLE_SEMANTIC_SEARCH=false); requires a vector database and embedding service. See docs/semantic-search-architecture.md and docs/configuration.md.

For result ordering — turning the fused rank score into a calibrated relevance score with a cross-encoder, self-hosted via Infinity/vLLM or hosted via Cohere, with or without an embedding gateway — see docs/reranking.md.

[!TIP] Don't want to run Qdrant and an embedding service? Astrolabe Cloud (under development) provides semantic search and background sync as a managed service.

Documentation

Contributing

Contributions are welcome!

Security

MseeP.ai Security Assessment

Found a security issue? Do not open a public GitHub issue. Use GitHub's private vulnerability reporting, or email security@astrolabecloud.com if you can't use GitHub. See SECURITY.md for details.

License

This project is licensed under the AGPL-3.0 License. See LICENSE for details.

Star History

Star History Chart

References

Release files for nextcloud-mcp-server 0.185.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nextcloud-mcp-server 0.185.4
File Size Uploaded
nextcloud_mcp_server-0.185.4.tar.gz 929.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nextcloud-mcp-server 0.185.4
File Interpreter ABI Platform
nextcloud_mcp_server-0.185.4-py3-none-any.whl Python 3 none any Details

Total release size: 2.0 MB

Release files / nextcloud_mcp_server-0.185.4.tar.gz

Download URL nextcloud_mcp_server-0.185.4.tar.gz
Size 929.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d1ee2ff1dbeb22a2752edbab0a9af7cf4b2425b9d5a44d7e87d8ffdce68e90ac
BLAKE2b-256 checksum
How to use checksums
a7043f8e82519c0619fa5b81e1e4038ed250065172200dab58a78e8759a0b375
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / nextcloud_mcp_server-0.185.4-py3-none-any.whl

Download URL nextcloud_mcp_server-0.185.4-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
eea3b8226041c8b5c3a534b576ba9ab8e49043c20b5c3158bc7cd294b2215efb
BLAKE2b-256 checksum
How to use checksums
7c99eb2b5621074ebb4b71b2f7ca0b56a338baa3f910262d6fad9f0d75fc3c92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.185.4 This release

2 release files

0.91.2

2 release files

0.91.1

2 release files

0.91.0

2 release files

0.90.2

2 release files

0.90.1

2 release files

0.90.0

2 release files

0.89.0

2 release files

0.88.3

2 release files

0.88.2

2 release files

0.88.1

2 release files

0.88.0

2 release files

0.87.2

2 release files

0.87.1

2 release files

0.87.0

2 release files

0.86.4

2 release files

0.86.3

2 release files

0.86.2

2 release files

0.86.1

2 release files

0.86.0

2 release files

0.85.1

2 release files

0.85.0

2 release files

0.84.2

2 release files

0.84.1

2 release files

0.84.0

2 release files

0.83.4

2 release files

0.83.3

2 release files

0.75.2

2 release files

0.75.1

2 release files

0.75.0

2 release files

0.74.0

2 release files

0.73.2

2 release files

0.73.1

2 release files

0.73.0

2 release files

0.72.7

2 release files

0.72.6

2 release files

0.72.5

2 release files

0.72.4

2 release files

0.72.3

2 release files

0.72.2

2 release files

0.68.0

2 release files

0.67.0

2 release files

0.66.2

2 release files

0.66.1

2 release files

0.66.0

2 release files

0.65.4

2 release files

0.65.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page