Nextcloud MCP Server

平台与服务

by cbcoutinho

通过安全 API 让 Claude、GPT、Gemini 等 LLM 以自然语言访问 Nextcloud,可创建笔记、管理日历、联系人与文件。

让 Claude、GPT、Gemini 直接用自然语言操作 Nextcloud,把笔记、日历、联系人和文件管理串起来,安全 API 对重视私有数据的团队尤其友好。

什么是 Nextcloud MCP Server

通过安全 API 让 Claude、GPT、Gemini 等 LLM 以自然语言访问 Nextcloud,可创建笔记、管理日历、联系人与文件。

README

<p align="center"> <img src="astrolabe.svg" alt="Nextcloud MCP Server" width="128" height="128"> </p>

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] Looking for AI features inside Nextcloud? Nextcloud also provides Context Agent, which powers the Assistant app and runs as an ExApp inside Nextcloud. See docs/comparison-context-agent.md for a detailed comparison of use cases.

Quick Start (Docker)

For full features including semantic search, run with Docker:

bash
# 1. Create a minimal configuration
cat > .env << EOF
NEXTCLOUD_HOST=https://your.nextcloud.instance.com
NEXTCLOUD_USERNAME=your_username
NEXTCLOUD_PASSWORD=your_app_password
EOF

# 2. Start the server
docker run -p 127.0.0.1:8000:8000 --env-file .env --rm \
  ghcr.io/cbcoutinho/nextcloud-mcp-server:latest

# 3. Test the connection
curl http://127.0.0.1:8000/health/ready

# 4. Connect to the endpoint
http://127.0.0.1:8000/sse

# Or with --transport streamable-http
http://127.0.0.1:8000/mcp

Docker Compose Profiles (for development/testing):

bash
docker compose --profile single-user up -d       # Port 8000
docker compose --profile multi-user-basic up -d   # Port 8003
docker compose --profile oauth up -d              # Port 8001
docker compose --profile login-flow up -d         # Port 8004

Next Steps:

  • Connect your MCP client (Claude Desktop, IDEs, mcp dev, etc.)
  • See docs/installation.md for other deployment options (local, Kubernetes)

Key Features

  • 90+ MCP Tools - Comprehensive API coverage across 8 Nextcloud apps
  • MCP Resources - Structured data URIs for browsing Nextcloud data
  • Semantic Search (Experimental) - Optional vector-powered search for Notes, Files, News items, and Deck cards (requires Qdrant + Ollama)
  • Document Processing - OCR and text extraction from PDFs, DOCX, images with progress notifications
  • Flexible Deployment - Docker, Kubernetes (Helm), VM, or local installation
  • Production-Ready Auth - Basic Auth with app passwords (recommended) or OAuth2/OIDC (experimental)
  • Multiple Transports - SSE, HTTP, and streamable-http support

Supported Apps

AppToolsCapabilities
Notes7Full CRUD, keyword search, semantic search
Calendar20+Events, todos (tasks), recurring events, attendees, availability
Contacts8Full CardDAV support, address books
Files (WebDAV)12Filesystem access, OCR/document processing
Deck15Boards, stacks, cards, labels, assignments
Cookbook13Recipe management, URL import (schema.org)
Tables5Row operations on Nextcloud Tables
Sharing10+Create and manage shares
Semantic Search2+Vector search for Notes, Files, News items, and Deck cards (experimental, opt-in, requires infrastructure)

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

Authentication

[!IMPORTANT] OAuth2/OIDC is experimental and requires a manual patch to the user_oidc app:

  • Required patch: Bearer token support (issue #1221)
  • Impact: Without the patch, most app-specific APIs fail with 401 errors
  • Recommendation: Use Basic Auth for production until upstream patches are merged

See docs/oauth-upstream-status.md for patch status and workarounds.

Recommended: Basic Auth with app-specific passwords provides secure, production-ready authentication. See docs/authentication.md for setup details and OAuth configuration.

Authentication Modes

The server supports four authentication modes:

Single-User (BasicAuth):

  • One set of credentials shared by all MCP clients
  • Simple setup: username + app password in environment variables
  • All clients access Nextcloud as the same user
  • Best for: Personal use, development, single-user deployments

Multi-User (BasicAuth Pass-Through):

  • MCP clients send credentials via Authorization header
  • Server passes through to Nextcloud (stateless by default)
  • Optional offline access for background operations (ENABLE_MULTI_USER_BASIC_AUTH=true)
  • Best for: Multi-user setups without OAuth infrastructure

Multi-User (OAuth):

  • Each MCP client authenticates separately with their own Nextcloud account
  • Per-user scopes and permissions (clients only see tools they're authorized for)
  • More secure: tokens expire, credentials never shared with server
  • Best for: Teams, multi-user deployments, production environments with multiple users
  • Requires: Patches to the user_oidc app (experimental)

Multi-User (Login Flow v2):

  • Uses Nextcloud's native Login Flow v2 to obtain per-user app passwords
  • No OAuth patches required — works with stock Nextcloud
  • Each user authenticates via browser, server manages app passwords
  • Best for: Multi-user deployments without OAuth infrastructure (ENABLE_LOGIN_FLOW=true)
  • Experimental: See ADR-022 for details

See docs/authentication.md for detailed setup instructions.

Semantic Search

The server provides an experimental RAG pipeline to enable Semantic Search that enables MCP clients to find information in Nextcloud based on meaning rather than just keywords. Instead of matching "machine learning" only when those exact words appear, it understands that "neural networks," "AI models," and "deep learning" are semantically related concepts.

Example:

  • Keyword search: Query "car" only finds notes containing "car"
  • Semantic search: Query "car" also finds notes about "automobile," "vehicle," "sedan," "transportation"

This enables natural language queries and helps discover related content across your Nextcloud notes.

[!NOTE] Semantic Search is experimental and opt-in:

  • Disabled by default (ENABLE_SEMANTIC_SEARCH=false)
  • Currently supports Notes app only (multi-app support planned)
  • Requires additional infrastructure: vector database + embedding service
  • Answer generation (nc_semantic_search_answer) requires MCP client sampling support

See docs/semantic-search-architecture.md for architecture details and docs/configuration.md for setup instructions.

Documentation

Getting Started

Features

Advanced Topics

Examples

Create a Note

code
AI: "Create a note called 'Meeting Notes' with today's agenda"
→ Uses nc_notes_create_note tool

Import Recipes

code
AI: "Import the recipe from https://www.example.com/recipe/chocolate-cake"
→ Uses nc_cookbook_import_recipe tool with schema.org metadata extraction

Schedule Meetings

code
AI: "Schedule a team meeting for next Tuesday at 2pm"
→ Uses nc_calendar_create_event tool

Manage Files

code
AI: "Create a folder called 'Project X' and move all PDFs there"
→ Uses nc_webdav_create_directory and nc_webdav_move tools

Semantic Search (Experimental, Opt-in)

code
AI: "Find notes related to machine learning concepts"
→ Uses nc_semantic_search to find semantically similar notes (requires Qdrant + Ollama setup)

Note: For AI-generated answers with citations, use nc_semantic_search_answer (requires MCP client with sampling support).

Contributing

Contributions are welcome!

Security

MseeP.ai Security Assessment

This project takes security seriously:

  • Production-ready Basic Auth with app-specific passwords
  • OAuth2/OIDC support (experimental, requires upstream patches)
  • Per-user access tokens
  • No credential storage in OAuth mode
  • Regular security assessments

Found a security issue? Please report it privately to the maintainers.

License

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

Star History

Star History Chart

References

常见问题

Nextcloud MCP Server 是什么?

通过安全 API 让 Claude、GPT、Gemini 等 LLM 以自然语言访问 Nextcloud,可创建笔记、管理日历、联系人与文件。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描109.6k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描109.6k

接口设计评审

by alirezarezvani

Universal
热门

审查 REST API 设计是否符合行业规范,自动检查命名、HTTP 方法、状态码与文档覆盖,识别破坏性变更并给出设计评分,适合评审接口方案和版本迭代前把关。

做API和架构方案时,它能帮你提前揪出接口设计问题并对齐最佳实践,评审视角系统,团队协作更省心。

平台与服务
未扫描9.0k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
82.9k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.3k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
34.5k

评论