Adds 6 new MCP tools for managing Docmost page comments:
- list_comments: list all comments on a page (content as Markdown)
- get_comment: retrieve a single comment by ID
- create_comment: create page-level or inline comment (Markdown input)
- update_comment: update comment content (creator only)
- delete_comment: delete a comment (creator or space admin)
- check_new_comments: poll for new comments since a timestamp
Implementation details:
- New markdownToTiptapJson() utility in src/lib/markdown-to-json.ts
- New filterComment() in src/lib/filters.ts
- Supports inline comments, threaded replies via parentCommentId
- README updated with comment tools documentation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Closes#1Closes#8
Docmost changed the search API response format in v0.25.0:
- Before: response.data.data was a direct array
- After: response.data.data is { items: [...], meta: {...} }
The old code assumed the array format and crashed with
"items.map is not a function" on Docmost 0.25+.
Fix normalizes both formats for backwards compatibility.
Closes#2
GFM tables were corrupted when using update_page because the
Markdown → HTML (marked) → ProseMirror JSON (generateJSON) flow did not
recognize <table>, <tr>, <th>, <td> elements. Adding TableKit from
@tiptap/extension-table registers the required schema so tables round-trip
correctly in both create and update flows.
Tested on Docmost 0.70.1. Fixes PR #6 from the original repo.
Closes#4
When update_page contained images, they were silently dropped because
the Image extension was configured with inline: true, but Docmost's
editor uses inline: false, group: "block". The Yjs merge discarded
mismatched inline image nodes.
Fixes PR #5 from the original repo.