Sponsored by Deepsite.site

Nextcloud MCP Server

Created By
cbcoutinho7 months ago
Nextcloud MCP Server
Content

Nextcloud MCP Server

Docker Image

The Nextcloud MCP (Model Context Protocol) server allows Large Language Models (LLMs) like OpenAI's GPT, Google's Gemini, or Anthropic's Claude to interact with your Nextcloud instance. This enables automation of various Nextcloud actions, starting with the Notes API.

Features

Currently, the server primarily interacts with the Nextcloud Notes API, providing tools and resources to manage notes.

Available Tools

  • nc_notes_create_note: Create a new note.
  • nc_notes_update_note: Update an existing note by ID.
  • nc_notes_append_content: Append content to an existing note with a clear separator.
  • nc_notes_delete_note: Delete a note by ID.
  • nc_notes_search_notes: Search notes by title or content.
  • nc_get_note: Get a specific note by ID.

Available Resources

  • notes://{note_id}: Access a specific note by its ID.
  • notes://all: Access all notes.
  • notes://settings: Access note settings.
  • nc://capabilities: Access Nextcloud server capabilities.
  • nc://Notes/{note_id}/attachments/{attachment_filename}: Access attachments for notes.

Note Attachments

This server supports adding and retrieving note attachments via WebDAV. Please note the following behavior regarding attachments:

  • When a note is deleted, its attachments remain in the system. This matches the behavior of the official Nextcloud Notes app.
  • Orphaned attachments (attachments whose parent notes have been deleted) may accumulate over time.
  • WebDAV permissions must be properly configured for attachment operations to work correctly.

Installation

Prerequisites

  • Python 3.8+
  • Access to a Nextcloud instance

Local Installation

  1. Clone the repository (if running from source):
    git clone https://github.com/cbcoutinho/nextcloud-mcp-server.git
    cd nextcloud-mcp-server
    
  2. Install the package (if running as a library):
    poetry install
    

Docker

A pre-built Docker image is available: ghcr.io/cbcoutinho/nextcloud-mcp-server

Configuration

The server requires credentials to connect to your Nextcloud instance. Create a file named .env (or any name you prefer) in the directory where you'll run the server, based on the env.sample file:

# .env
NEXTCLOUD_HOST=https://your.nextcloud.instance.com
NEXTCLOUD_USERNAME=your_nextcloud_username
NEXTCLOUD_PASSWORD=your_nextcloud_app_password_or_login_password
  • NEXTCLOUD_HOST: The full URL of your Nextcloud instance.
  • NEXTCLOUD_USERNAME: Your Nextcloud username.
  • NEXTCLOUD_PASSWORD: Important: It is highly recommended to use a dedicated Nextcloud App Password for security. You can generate one in your Nextcloud Security settings. Alternatively, you can use your regular login password, but this is less secure.

Running the Server

Locally

Ensure your environment variables are loaded, then run the server using mcp run:

# Load environment variables from your .env file
export $(grep -v '^#' .env | xargs)

# Run the server
mcp run --transport sse nextcloud_mcp_server.server:mcp

The server will start, typically listening on http://0.0.0.0:8000.

Using Docker

Mount your environment file when running the container:

docker run -p 127.0.0.1:8000:8000 --env-file .env --rm ghcr.io/cbcoutinho/nextcloud-mcp-server:latest

This will start the server and expose it on port 8000 of your local machine.

Usage

Once the server is running, you can connect to it using an MCP client like uvx. Add the server to your uvx configuration:

uvx mcp add nextcloud-mcp http://localhost:8000 --default-transport sse

You can then interact with the server's tools and resources through your LLM interface connected to uvx.

References:

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
WindsurfThe new purpose-built IDE to harness magic
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Amap Maps高德地图官方 MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
ChatWiseThe second fastest AI chatbot™
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
CursorThe AI Code Editor
Tavily Mcp
DeepChatYour AI Partner on Desktop
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Playwright McpPlaywright MCP server
Serper MCP ServerA Serper MCP Server