MCP support for comment lifecycle: list, create, reply, resolve and reopen
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- api, backend-api-design
Línea de trabajo
The issue proposes extending the HackMD MCP server and REST API. Start by examining the existing MCP server codebase and the REST API routes for notes. Look for models or services handling comments. The first step is to understand the current data structures and permissions. 'Done' means implementing the proposed endpoints and MCP tools as described, likely across multiple files including server routes, MCP tool definitions, and comment service logic.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
HackMD provides native inline and page-level comments, replies, reactions,
pinning and comment resolution in the web interface.
However, comments are currently not accessible through:
- the official HackMD MCP server,
- the public REST API,
- hackmd-cli,
- GitHub synchronization or exports.
Because of this, AI agents can edit a note through MCP, but they cannot:
- discover unresolved review comments,
- understand the requested changes,
- respond to the reviewer,
- resolve the comment after updating the note.
This prevents an end-to-end AI-assisted documentation review workflow.
Related issues:
- #428 – API and export support for comments and reactions
- #207 – Sync/export comments as a separate JSON file
This request extends those proposals to the complete comment lifecycle
and the official HackMD MCP server.
Use case
A reviewer adds a comment to a HackMD note.
An AI agent connected through the official HackMD MCP server should be able to:
- list unresolved comments,
- retrieve the comment thread and referenced document location,
- update the Markdown note,
- reply with a description of the implemented change,
- mark the comment as resolved.
The same workflow should work from Claude Code, ChatGPT, Cursor and other
MCP-compatible clients.
Proposed REST API
Read comments
GET /v1/notes/:noteId/comments
GET /v1/notes/:noteId/comments/:commentId
Optional filters:
- status=open|resolved|hidden
- type=page|inline
- includeReplies=true
Create comments and replies
POST /v1/notes/:noteId/comments
POST /v1/notes/:noteId/comments/:commentId/replies
Manage comment state
POST /v1/notes/:noteId/comments/:commentId/resolve
POST /v1/notes/:noteId/comments/:commentId/reopen
Optionally:
POST /v1/notes/:noteId/comments/:commentId/pin
POST /v1/notes/:noteId/comments/:commentId/unpin
POST /v1/notes/:noteId/comments/:commentId/hide
Proposed MCP tools
- list-comments
- get-comment
- create-comment
- reply-to-comment
- resolve-comment
- reopen-comment
Optional tools:
- pin-comment
- unpin-comment
- hide-comment
Example:
list-comments:
noteId: string
status: open | resolved | all
includeReplies: boolean
reply-to-comment:
noteId: string
commentId: string
content: string
resolve-comment:
noteId: string
commentId: string
resolutionMessage: string (optional)
Inline comment anchoring
Inline comments should expose both:
- the selected text,
- a document range or stable anchor.
Example response:
{
"id": "comment-id",
"type": "inline",
"body": "Please explain this behavior.",
"selectedText": "The service creates a new task.",
"range": {
"startLine": 42,
"endLine": 43
},
"status": "open",
"author": {
"id": "user-id",
"name": "Reviewer"
},
"createdAt": "2026-09-23T10:30:00Z",
"replies": []
}
Because line numbers can change during collaborative editing, a stable
internal anchor should preferably be included as well.
Permissions and safety
All REST API and MCP operations should respect existing HackMD permissions.
Suggested behavior:
- readers can only retrieve comments they are allowed to see,
- commenters can create comments and replies,
- writers and above can resolve or reopen comments,
- all operations preserve author and audit information,
- destructive or state-changing MCP tools clearly identify write operations.
Suggested implementation phases
Phase 1
- list and read comments,
- page-level comments,
- replies,
- resolve and reopen.
Phase 2
- create inline comments,
- stable document anchors,
- reactions, pinning and hiding,
- export and GitHub synchronization.
Why this belongs in MCP
HackMD's official MCP already allows AI agents to read and update note
content. Comment support would complete the review workflow and allow
agents to act on human feedback without copying comments manually into
the AI conversation.
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 40
- Forks
- 9
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hackmdio/hackmd-io-issues
-
bug
Dificultad 1/5 1-3 horas Aptitud para principiantes 62/100
hackmdio/hackmd-io-issues#121 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
hackmdio/hackmd-io-issues#448 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 15/100
hackmdio/hackmd-io-issues#447 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
hackmdio/hackmd-io-issues#446 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
hackmdio/hackmd-io-issues#445 · 3 comentarios ·
Todos los issues de hackmdio/hackmd-io-issues
Issues similares
-
Send-Document has no job-state check, resurrects canceled jobs and re-prints processing jobsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
OpenPrinting/cups#1833 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Task retarget keeps the old host in task scope and adds the new host in a form that matches nothingPosiblemente ocupada @chaitanya0305 la tomó hoy. Abiertobug P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
BaaRai/ARTEX#652 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
bug effort:S P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
nightscout/nocturne#4563 ·
Los mantenedores suelen responder en 1 día