by cbcoutinho
Nextcloud MCP Server
# Add to your Claude Code skills
git clone https://github.com/cbcoutinho/nextcloud-mcp-serverA 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.
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.
For full features including semantic search, run with Docker:
# 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/mcp
Docker Compose Profiles (for development/testing):
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:
mcp dev, etc.)| 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) | 12 | Filesystem access, OCR/document processing | | 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 | | Collectives | 16 | Full CRUD on collectives, pages, and tags | | Semantic Search | 2+ | 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!
[!IMPORTANT] OAuth2/OIDC is experimental and requires a manual patch to the
user_oidcapp:
- 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.
The server supports four authentication modes:
Single-User (BasicAuth):
Multi-User (BasicAuth Pass-Through):
ENABLE_MULTI_USER_BASIC_AUTH=true)Multi-User (OAuth):
user_oidc app (experimental)Multi-User (Login Flow v2):
ENABLE_LOGIN_FLOW=true)See docs/authentication.md for detailed setup instructions.
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:
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 supportSee docs/semantic-search-architecture.md for architecture details and docs/configuration.md for setup instructions.
AI: "Create a note called 'Meeting Notes' with today's agenda"
→ Uses nc_notes_create_note tool
No comments yet. Be the first to share your thoughts!