feat: add comment support (list, get, create, update, delete)

Add 5 new MCP tools for managing Docmost page comments:
- list_comments: list all comments on a page (paginated)
- get_comment: retrieve a single comment by ID
- create_comment: create page-level or inline comments with replies
- update_comment: update existing comment content
- delete_comment: remove a comment

Comment content is automatically converted between Markdown (agent-facing)
and ProseMirror/TipTap JSON (Docmost API). Uses the existing
markdown-converter for reading and a new markdown-to-json utility
for writing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Max Nikitin
2026-03-10 12:33:39 +03:00
parent 493ce01254
commit a739d62318
4 changed files with 233 additions and 0 deletions

View File

@@ -20,6 +20,14 @@ A Model Context Protocol (MCP) server for [Docmost](https://docmost.com/), enabl
- **`list_pages`**: List pages within a space (ordered by `updatedAt` descending).
- **`get_page`**: Retrieve full content and metadata of a specific page.
### Comments
- **`list_comments`**: List all comments on a page with content converted to Markdown.
- **`get_comment`**: Retrieve a single comment by ID.
- **`create_comment`**: Create a page-level or inline comment. Content is provided as Markdown and automatically converted to ProseMirror JSON. Supports replies via `parentCommentId`.
- **`update_comment`**: Update an existing comment's content (creator only).
- **`delete_comment`**: Delete a comment (creator or space admin only).
### Technical Details
- **Automatic Markdown Conversion**: Page content is automatically converted from Docmost's internal ProseMirror/TipTap JSON format to clean Markdown for easy agent consumption. Supports all Docmost extensions including callouts, task lists, math blocks, embeds, and more.