collectives-mcp
This MCP server exposes 57 tools to manage Nextcloud Collectives, including pages, tags, attachments, templates, trash, shares, and search, via OCS and WebDAV APIs.\n\n- Collectives: list, create, update, soft-delete, restore, permanently delete (with optional team deletion), set page mode, user settings\n- Pages: list, fetch as markdown, create, update (replace/append/prepend), delete (trash), rename, move, copy, set emoji, set tags, favorite/unfavorite, set full-width, set subpage order, touch\n- Page trash & history: list trashed pages, restore, purge, list versions, restore version, list recent pages\n- Tags: list, create, update, delete, set page tags\n- Templates: list, create, update (rename), get content, update content, set emoji, delete\n- Search: full-text across all collectives or within a specific collective\n- Attachments: list, get, upload (text or base64), rename, delete, restore\n- Public shares: list, create collective/page shares, update, delete\n- Other: ping (connectivity check), get backlinks (pages linking to a given page)
Provides tools for managing Nextcloud Collectives, including collectives, pages, tags, attachments, trash, templates, search, favorites, page versions, and backlinks.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@collectives-mcp list all pages in the 'Meeting Notes' collective"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
collectives-mcp
A Model Context Protocol server for Nextcloud Collectives — exposes collectives, pages, tags, attachments, templates, public shares, page history, and trash to Claude and any MCP-compatible client.
How it works
The server uses two Nextcloud APIs, verified against the Collectives OpenAPI spec:
Layer | Used for |
OCS API ( | All structured operations: collectives, pages, tags, attachments, shares, settings, trash, templates, search, favorites |
WebDAV ( | Page and template body read/write (no OCS equivalent), attachment upload/download, file version history |
The OCS API handles structured operations and returns typed JSON. WebDAV is used only where OCS has no equivalent — primarily reading and writing page markdown content.
Related MCP server: nextcloud-collectives-mcp
Tools exposed (57)
Collectives:
list_collectives,create_collective,update_collective,delete_collective,set_page_mode,set_user_settingsCollective trash:
list_trashed_collectives,restore_trashed_collective,permanently_delete_collectivePages:
list_pages,get_page,create_page,update_page,delete_page,rename_page,move_page,move_page_to_collective,copy_page,set_page_emoji,set_page_tags,favorite_page,unfavorite_pagePage layout & ordering:
set_page_full_width,set_subpage_order,touch_pageTags:
list_tags,create_tag,update_tag,delete_tagTrash & history:
list_trashed_pages,restore_page,purge_page,list_page_versions,restore_page_version,list_recent_pagesTemplates:
list_templates,create_template,update_template,get_template,update_template_content,set_template_emoji,delete_templateSearch:
search,search_in_collectiveAttachments:
list_attachments,get_attachment,upload_attachment,rename_attachment,delete_attachment,restore_attachmentPublic shares:
list_shares,create_collective_share,create_page_share,update_share,delete_shareOther:
ping,get_backlinks
Every tool declares MCP annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint), so clients can distinguish a read from an irreversible delete without parsing descriptions.
Install
Download the collectives-mcp-<version>.tgz asset from the latest release, then:
npm install -g ./collectives-mcp-<version>.tgzThis installs the collectives-mcp command globally.
Configuration
Add to your MCP client config (Claude Code shown):
{
"mcpServers": {
"collectives": {
"command": "collectives-mcp",
"args": [],
"env": {
"NEXTCLOUD_URL": "https://your-nextcloud.example.com",
"NEXTCLOUD_USER": "your-username",
"NEXTCLOUD_APP_PASSWORD": "xxxx-xxxx-xxxx-xxxx-xxxx"
}
}
}
}Generate the app-password in Nextcloud under Settings > Security > Devices & sessions > "Create new app password". The MCP server only needs an app-password, never your real account password — and you can revoke it without affecting your main login.
Development
pnpm install
pnpm dev # stdio MCP server, point mcp inspector at it
pnpm test # unit tests, plus integration tests when MCP_TEST_COLLECTIVE_ID is set
pnpm build # tsc -> dist/Required env vars: NEXTCLOUD_URL, NEXTCLOUD_USER, NEXTCLOUD_APP_PASSWORD. Optional: NEXTCLOUD_TIMEOUT_MS (per-request deadline, default 60000).
The integration tests additionally need MCP_TEST_COLLECTIVE_ID set to the numeric id of a throwaway collective. Without it they skip; the deterministic unit tests still run.
Disclosure
This project was 100% written by AI (Claude), including all source code, tests, CI configuration, and documentation.
License
MIT — see LICENSE.
Related
Available Tools
57 toolscopy_pageA
Duplicate a page under the same parent. If newTitle is provided, the copy gets that title. Works for both leaf and folder pages.
Inputs: pageId (required), collectiveId (required), index, newTitle.
create_collectiveA
Create a new Collective. Also creates the underlying Nextcloud Team. Optionally set an emoji icon.
Inputs: name (required), emoji.
create_pageA
Create a new page under a parent. If the parent is a leaf page, it is automatically promoted to a folder. Optionally initialise from a template.
Inputs: title (required), collectiveId (required), parentPageId (required), body, +2 more.
create_tagB
Create a new tag in a Collective. Requires a name and a hex color code (e.g. "#FF0000").
Inputs: name (required), color (required), collectiveId (required).
create_templateB
Create a page template in a Collective.
Inputs: title (required), parentId (required), collectiveId (required).
delete_attachmentADestructiveIdempotent
Delete an attachment from a page. Returns the deleted attachment including its id, which restore_attachment needs to undo this.
Inputs: pageId (required), filename (required), collectiveId (required).
delete_collectiveADestructiveIdempotent
Soft-delete a Collective (moves it to the Collectives trash, recoverable). Use permanently_delete_collective to remove it permanently and optionally delete the underlying Team.
Inputs: id (required).
delete_pageADestructiveIdempotent
Trash a page (recoverable from the Collectives page trash). Folder pages take their entire subtree with them. The Landing page cannot be deleted — delete the collective itself instead.
Inputs: pageId (required), collectiveId (required).
delete_tagADestructiveIdempotent
Delete a tag from a Collective.
Inputs: tagId (required), collectiveId (required).
delete_templateCDestructiveIdempotent
Delete a page template.
Inputs: templateId (required), collectiveId (required).
favorite_pageAIdempotent
Mark a page as a favorite for the authenticated user.
Inputs: pageId (required), collectiveId (required).
get_attachmentARead-onlyIdempotent
Download an attachment's contents. Returns the bytes as utf8 text or a base64 string, with the encoding stated in the result. Refuses files over 5 MB, which should be fetched from Nextcloud directly.
Inputs: pageId (required), filename (required), collectiveId (required), encoding.
get_backlinksARead-onlyIdempotent
Find pages that link to the given page. Scans the linkedPageIds field on all pages in the Collective.
Inputs: pageId (required), collectiveId (required).
get_pageARead-onlyIdempotent
Fetch a page as markdown. Returns the metadata block followed by the page body.
Inputs: pageId (required), collectiveId (required).
get_templateARead-onlyIdempotent
Read a page template's metadata and markdown body. Use this to inspect what create_page(templateId) will produce.
Inputs: templateId (required), collectiveId (required).
list_attachmentsARead-onlyIdempotent
List attachments for a page. Returns name, size, content type, and the relative markdown path to reference each file.
Inputs: pageId (required), collectiveId (required).
list_collectivesARead-onlyIdempotent
List all Collectives the authenticated user has access to. Returns id, name, slug, emoji, and permission levels.
Inputs: no named parameters.
list_pagesARead-onlyIdempotent
List all pages in a Collective. Returns flat metadata (id, title, parentId, emoji, tags, timestamps, paths). Use parentId to reconstruct the tree.
Inputs: collectiveId (required).
list_page_versionsARead-onlyIdempotent
List available versions (revision history) for a page. Returns version ids that can be used with restore_page_version.
Inputs: pageId (required), collectiveId (required).
list_recent_pagesARead-onlyIdempotent
List recently-modified pages for a Collective, ordered by last edit time.
Inputs: collectiveId (required), limit.
list_tagsARead-onlyIdempotent
List all tags defined for a Collective.
Inputs: collectiveId (required).
list_templatesARead-onlyIdempotent
List page templates defined for a Collective.
Inputs: collectiveId (required).
list_trashed_collectivesARead-onlyIdempotent
List Collectives that have been soft-deleted. These can be restored or permanently deleted.
Inputs: no named parameters.
list_trashed_pagesARead-onlyIdempotent
List pages in the trash for a Collective. These can be restored or permanently purged.
Inputs: collectiveId (required).
move_pageAIdempotent
Move a page to a new parent within the same collective. If the new parent is a leaf, it is promoted first.
Inputs: pageId (required), collectiveId (required), newParentPageId (required), index.
move_page_to_collectiveADestructive
Move or copy a page (with its subpages and attachments) into a different Collective. Set copy: true to duplicate instead of moving. The page id changes on arrival, so use the returned page for follow-up calls. For reorganising within one Collective use move_page or copy_page instead.
Inputs: pageId (required), collectiveId (required), newCollectiveId (required), copy, +2 more.
permanently_delete_collectiveADestructiveIdempotent
Permanently delete a Collective from the trash. THIS IS IRREVERSIBLE. The Collective must already be in the trash (use delete_collective first). Set deleteTeam=true to also remove the underlying Nextcloud Team.
Inputs: id (required), deleteTeam.
pingARead-onlyIdempotent
Verify connectivity to the configured Nextcloud instance and report how many collectives are visible.
Inputs: no named parameters.
purge_pageADestructiveIdempotent
Permanently delete a trashed page. THIS IS IRREVERSIBLE — the page content cannot be recovered after this call. The page must already be in the trash (use delete_page first).
Inputs: pageId (required), collectiveId (required).
rename_attachmentAIdempotent
Rename an attachment on a page. Existing references to the old filename in page bodies are NOT rewritten — update them yourself, using the returned relativePath.
Inputs: pageId (required), newName (required), filename (required), collectiveId (required).
rename_pageBIdempotent
Rename a page within its current parent.
Inputs: pageId (required), newTitle (required), collectiveId (required).
restore_attachmentAIdempotent
Restore a deleted attachment from the page's attachment trash. Takes the numeric attachment id — a trashed attachment no longer appears in list_attachments, so there is no name to look up. delete_attachment returns the id you need.
Inputs: pageId (required), attachmentId (required), collectiveId (required).
restore_pageBIdempotent
Restore a trashed page back to its original location.
Inputs: pageId (required), collectiveId (required).
restore_page_versionADestructiveIdempotent
Restore a specific historical version of a page. The current content is replaced with the selected version (the current version is preserved as a new version entry).
Inputs: pageId (required), versionId (required), collectiveId (required).
restore_trashed_collectiveAIdempotent
Restore a soft-deleted Collective from the trash.
Inputs: id (required).
searchARead-onlyIdempotent
Full-text search across all Collectives pages the user can access. Uses the Nextcloud unified search provider. For searching within a specific Collective, use search_in_collective instead.
Inputs: query (required), limit.
search_in_collectiveARead-onlyIdempotent
Search for pages by content within a specific Collective. Returns matching page metadata.
Inputs: query (required), collectiveId (required).
set_page_emojiAIdempotent
Set the single-emoji icon on a page. Pass an empty string to clear.
Inputs: emoji (required), pageId (required), collectiveId (required).
set_page_full_widthAIdempotent
Toggle a page's full-width layout. This is a Collective-wide display property of the page, not a per-user preference.
Inputs: pageId (required), fullWidth (required), collectiveId (required).
set_page_modeAIdempotent
Set the default page mode for a Collective — whether pages open in view or edit mode. This applies to every member of the Collective, unlike set_user_settings which is per-user.
Inputs: mode (required), collectiveId (required).
set_page_tagsADestructiveIdempotent
Replace the tags on a page. Tags must already exist in the Collective; pass tag ids (use list_tags to look them up).
Inputs: pageId (required), tagIds (required), collectiveId (required).
set_subpage_orderAIdempotent
Set the explicit left-to-right ordering of a page's immediate child pages. Every id must be a direct child of the page; duplicates are rejected. Pass an empty array to clear the manual order and fall back to the Collective sort. Only takes effect for users whose page order is set to "byOrder".
Inputs: pageId (required), collectiveId (required), subpageOrder (required).
set_template_emojiAIdempotent
Set or clear the emoji icon on a page template.
Inputs: emoji (required), templateId (required), collectiveId (required).
set_user_settingsAIdempotent
Update the authenticated user's own display preferences for one Collective: page sort order, and whether the members and recent-pages widgets on the landing page are expanded. These are per-user and do not affect other members — use set_page_mode for the Collective-wide setting. Provide at least one field; omitted fields are left unchanged.
Inputs: collectiveId (required), pageOrder, showMembers, showRecentPages.
touch_pageA
Bump a page's modification timestamp and record the authenticated user as its last editor, without changing content. Useful for marking a page as reviewed.
Inputs: pageId (required), collectiveId (required).
unfavorite_pageAIdempotent
Remove a page from the authenticated user's favorites.
Inputs: pageId (required), collectiveId (required).
update_collectiveAIdempotent
Change a Collective's emoji or adjust edit/share permission levels. Provide the id and any fields to change. Note: collective renaming is not supported by the API.
Inputs: id (required), emoji, editPermissionLevel, sharePermissionLevel.
update_pageBDestructive
Replace, append to, or prepend to a page's markdown body. Mode defaults to "replace".
Inputs: body (required), pageId (required), collectiveId (required), mode.
update_tagAIdempotent
Update a tag. Both name and color are always applied, so pass the existing value for whichever one you are not changing — omitting a field is not supported by the API. Read current values with list_tags first.
Inputs: name (required), color (required), tagId (required), collectiveId (required).
update_templateBIdempotent
Rename a page template.
Inputs: title (required), templateId (required), collectiveId (required).
update_template_contentADestructive
Write a page template's markdown body. This is the content create_page(templateId) copies into new pages. An empty body is allowed and clears the template. Append and prepend are protected against concurrent edits and fail rather than overwriting someone else's change.
Inputs: body (required), templateId (required), collectiveId (required), mode.
upload_attachmentADestructiveIdempotent
Upload an attachment to a page. Creates the attachment directory if needed. Returns a percent-encoded relativePath ready to paste into markdown (e.g. ).
Inputs: pageId (required), content (required), filename (required), collectiveId (required), +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 57 tools
Most tools use a clear resource+action pattern, so pages, tags, templates, attachments, and shares are easy to tell apart. A few near-neighbors require careful reading, such as search vs search_in_collective, update_collective vs set_page_mode, and update_template vs update_template_content, but their descriptions disambiguate them effectively.
The snake_case verb_noun convention is strong and consistently used across collectives, pages, tags, templates, attachments, and shares. Minor deviations like search and ping as bare verbs, plus the inconsistent permanent-delete terms (permanently_delete_collective vs purge_page), keep it from a perfect 5.
With 57 tools, this is far beyond a typical agent-facing MCP surface and creates significant selection overhead. Even though the domain is broad, the count sits in the extreme-mismatch range and would benefit from consolidation or splitting into smaller focused servers.
The surface covers nearly all lifecycle operations for collectives, pages, tags, templates, attachments, and shares, including trash, versions, and search. Minor gaps exist, such as no way to list favorited pages or list/purge trashed attachments, but agents can generally work around them.
Maintenance
Related MCP Connectors
MCP-native open-source Notion alternative: read & write pages, databases and kanban boards.
Hosted MCP server for Obsidian Sync vaults: read, search, edit notes. Not affiliated with Obsidian.
Hosted Notion MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
An agent-first office suite Claude & ChatGPT read and write over one MCP URL.
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server integrating Nextcloud services (tasks, calendar, notes, email, files, Deck) for AI assistant interaction.201MIT
- FlicenseNot gradedqualityBmaintenanceA MCP server for accessing Nextcloud Collectives, allowing MCP clients to list, read, and edit collectives, their pages, and tags.-
- AlicenseNot gradedqualityDmaintenanceA self-hosted MCP server that exposes Nextcloud files, calendar, notes, and search as tools for Claude.ai, authenticating via Nextcloud OAuth.MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Claude to list, read, write, create, delete, and search files on a self-hosted Nextcloud instance via WebDAV, with additional Obsidian vault-aware operations for frontmatter, tags, backlinks, and wikilinks.MIT