Sandbox
@cbcoutinho/nextcloud-mcp-server

MCP server for Nextcloud data access

This server connects MCP clients to Nextcloud so they can read and change notes, calendars, contacts, files, mail, Deck cards, and more. It supports stdio and HTTP transports, app passwords, multi-user login flow, and optional semantic search over Nextcloud content.

348 stars71 forksPythonUpdated 7d ago
Who it's for

Builders who want their agent to use Nextcloud as a workspace for notes, files, calendar, mail, and tasks.

What it delivers

You can let your agent work with Nextcloud content through one shared MCP server instead of switching tools by hand.

What it does

Nextcloud app coverage

Provides tools for Notes, Calendar, Contacts, Files, Deck, Cookbook, Tables, Sharing, News, Mail, Collectives, Talk, and semantic search.

MCP resources and tools

Exposes structured MCP resources plus 110+ tools for browsing and changing Nextcloud data.

Semantic search

Adds optional vector search for Notes, Files, News items, Deck cards, and Mail messages with Qdrant and an embedding service.

Document processing

Supports OCR and text extraction from PDFs, DOCX files, and images, with progress notifications.

Flexible authentication

Supports app passwords, pass-through multi-user mode, and Login Flow v2 for hosted deployments.

Multiple transports

Runs over streamable HTTP by default or stdio for local MCP clients.

File exclusion by tag

Can hide sensitive files and folders from file tools using a configured Nextcloud system tag.

How to get it

  1. 1Run 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
  2. 2For 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

README

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

AppToolsCapabilities
Notes7Full CRUD, keyword search, semantic search
Calendar20+Events, todos (tasks), recurring events, attendees, availability
Contacts8Full CardDAV support, address books
Files (WebDAV)14Filesystem access, OCR/document processing, file comments
Deck15Boards, stacks, cards, labels, assignments
Cookbook13Recipe management, URL import (schema.org)
Tables5Row operations on Nextcloud Tables
Sharing10+Create and manage shares
News8Feeds, folders, items, feed health monitoring
Mail13Accounts, mailboxes, messages, attachments, send; flags (read/unread, star), tags, move, delete
Collectives16Full CRUD on collectives, pages, and tags
Talk (spreed)6List conversations, read/post messages, mark as read, list participants
Semantic Search2+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:

ModeBest 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 needsWhat it does
Context Agent (by Nextcloud)AppAPI and a separate container to run the ExAppActs on your Nextcloud — sends Talk messages, creates events, and other write actions, with a confirmation step
Astrolabe + this serverThe Astrolabe app, and this server reachable from itAnswers 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

Files in the repo

Repository payload39 top-level entries
  • .claude
  • .github
  • alembic
  • app-hooks
  • docs
  • infra
  • keycloak
  • ldap
  • mcpb
  • nextcloud_mcp_server
  • scripts
  • tests
  • third_party
  • .containerignore
  • .dockerignore
  • .env.keycloak.sample
  • .gitignore
  • .gitmodules
  • .pre-commit-config.yaml
  • .secrets.toml.example
  • .sonarcloud.properties
  • alembic.ini
  • astrolabe.svg
  • CHANGELOG.md
  • CLA.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • docker-compose.yml
  • Dockerfile
  • env.sample
  • env.sample.oauth-multi-user
  • env.sample.single-user
  • LICENSE
  • pyproject.toml
  • README.md
  • renovate.json
  • SECURITY.md
  • settings.toml.example
  • uv.lock

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
t8y2/dbxConnectors

20 MB lightweight cross-platform database client for 90+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 90+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP Server。

19k

The fastest browser for AI agents to run browser automation, built for sharing your logged-in browser state with your AI agents, like Codex or Claude Code, without disturbing you. Zero cost, zero config.

16k

Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

62k
1 add
noskillish/
bankmcp

BankMCP™: your AI can now read your bank. Self-hosted, read-only MCP server for your own bank accounts via open banking (Enable Banking). Standard MCP; tested with Claude and Ollama.

177