postmd-mcp-server

v2.6.1
io.github.reinlainer/postmd-mcp-server Checked 1 day ago Published 2 months ago

Publish Markdown as a shareable web page, with document graphs

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

postmd_create_document

Publish Markdown as a PostMD web page. No API key required — anyone can publish. Returns docCode and data.shareUrl; hand shareUrl to people. Documents have a 30-day retention period (data.retainedUntil) that extends on each read. Documents without a password can be updated or deleted by anyone; password-protected documents require the password or the owner's API key. With an API key the document belongs to that member; groupId files it into that group (key with documents:write). The returned docCode can be kept at the top of the source file in a `postmd:document` comment (format at /docs/api…

ParameterTypeDescription
markdown *stringFull Markdown document as one UTF-8 string (the entire source, not a summary). May include graph data in an HTML comment, which the viewer draws; the format is at /docs/graph.
fileNamestringUpload filename, must end in .md. Default document.md.
groupIdnumberFile the document in this group instead of the default group (needs an API key).
passwordstringReaders must supply this password to see the content.
titlestringShown in the viewer and link previews. Defaults to fileName without .md.
viewerStylestringViewer theme: readable (default), github, minimal, report, pamphlet or dark. Unknown values fall back to readable.

postmd_create_document_from_file

Same as postmd_create_document, but reads the Markdown from filePath on the machine running this MCP server — use it for large files instead of pasting the body.

ParameterTypeDescription
filePath *stringPath to a .md file on the MCP server host, read as UTF-8. Prefer an absolute path.
fileNamestringUpload filename. Defaults to the basename of filePath.
groupIdnumberFile the document in this group instead of the default group (needs an API key).
passwordstringReaders must supply this password to see the content.
titlestringDefaults to the file name without .md.
viewerStylestringViewer theme: readable (default), github, minimal, report, pamphlet or dark. Unknown values fall back to readable.

postmd_create_documents_from_files

Publish several .md files in one call (bulk upload). Requires an API key with documents:write. The outer resultCode is 200 even if some files failed — check data.succeeded and each entry in data.results.

ParameterTypeDescription
filePaths *arrayPaths to .md files on the MCP server host. Each becomes its own document.
groupIdnumberFile every document in this group instead of the default group.
passwordstringReaders must supply this password to see the content.
viewerStylestringViewer theme: readable (default), github, minimal, report, pamphlet or dark. Unknown values fall back to readable.

postmd_get_document

Get document metadata by docCode: title, fileName, hasPassword, viewerStyle, timestamps. Public — no API key needed. Content is not included; use postmd_get_document_raw for the Markdown source.

ParameterTypeDescription
docCode *stringDocument code, e.g. P-123-456-789.

postmd_get_document_raw

Get the stored Markdown source of a document. Public — no API key needed. Password-protected documents need `password`.

ParameterTypeDescription
docCode *string
passwordstringPlain document password, if the document has one.

postmd_update_document

Update a document. Password-protected documents require the password or the owner's API key; documents without a password can be updated by anyone. Include `markdown` to replace the stored content; any metadata field replaces that field. clearPassword removes the password. Replacing the content requires notesOnReplace.

ParameterTypeDescription
docCode *string
clearPasswordbooleantrue removes the password.
currentPasswordstringCurrent password to authenticate if the document is password-protected.
fileNamestringUpload filename when replacing content. Default document.md.
markdownstringFull new Markdown body as one UTF-8 string. Omit if only metadata changes. Adding or revising a graph means sending the whole body with the graph comment in it; the format is at /docs/graph.
notesOnReplacestringRequired when replacing the content. Notes are located by the text they quote, so replacing the body moves or loses where they point: a note whose quote is gone loses its place in the body, and one wh…
passwordstringReaders must supply this password to see the content.
titlestring
viewerStylestringViewer theme: readable (default), github, minimal, report, pamphlet or dark. Unknown values fall back to readable.

postmd_update_document_from_file

Same as postmd_update_document, but reads the new Markdown from filePath on the machine running this MCP server.

ParameterTypeDescription
docCode *string
filePath *stringPath to a .md file on the MCP server host, read as UTF-8. Prefer an absolute path.
notesOnReplace *stringRequired when replacing the content. Notes are located by the text they quote, so replacing the body moves or loses where they point: a note whose quote is gone loses its place in the body, and one wh…
clearPasswordbooleantrue removes the password.
currentPasswordstringCurrent password to authenticate if the document is password-protected.
fileNamestringUpload filename. Defaults to the basename of filePath.
passwordstringReaders must supply this password to see the content.
titlestring
viewerStylestringViewer theme: readable (default), github, minimal, report, pamphlet or dark. Unknown values fall back to readable.

postmd_delete_document

Delete a document. Password-protected documents require the password or the owner's API key; documents without a password can be deleted by anyone.

ParameterTypeDescription
docCode *string
passwordstringDocument password if the document has one and you are not authenticated as its owner.

postmd_list_notes

List notes and highlights on a document: your own plus every SHARED one, newest first. Requires an API key with documents:read. Each note carries mine and manageable flags — trust them instead of re-deriving permissions. Pass `password` for a password-protected document.

ParameterTypeDescription
docCode *string
passwordstringPlain document password, if the document has one.

postmd_add_note

Attach a note or highlight to a document. Requires an API key with documents:write. Give `content` for a note, `color` alone for a colour-only highlight (then `quotedContent` is required — a highlight must point at a passage). Visibility comes from ownership: on the key member's own document choose PRIVATE (only they see it) or SHARED; on anyone else's document every note is SHARED, so omit scope. Documents nobody owns — anonymous uploads and service-owned pages — take no notes at all.

ParameterTypeDescription
docCode *string
colorstringYELLOW, GREEN, BLUE or PURPLE.
contentstringNote text, up to 4000 characters. Omit for a colour-only highlight.
passwordstringPlain document password, if the document has one.
quotedContentstringPassage of the body this note points to, up to 4000 characters. Matched by text, so it survives edits elsewhere.
scopestringPRIVATE (default) or SHARED.
textStartnumberCharacter offset where the quote starts in the body. Optional; speeds up re-anchoring.

postmd_update_note

Edit a note you wrote. Requires an API key with documents:write. Omitting scope keeps the current one; a scope you do send follows the ownership rule above. The note must keep text or a colour.

ParameterTypeDescription
docCode *string
noteId *number
colorstringYELLOW, GREEN, BLUE or PURPLE.
contentstring
quotedContentstring
scopestringPRIVATE or SHARED. Omit to keep the current scope.

postmd_resolve_note

Mark a note as settled, or undo it with resolved=false. Meaningful on SHARED notes; the author or the document owner may set it. Requires an API key with documents:write.

ParameterTypeDescription
docCode *string
noteId *number
resolved *booleantrue marks it settled; false reopens it.

postmd_delete_note

Delete a note: your own, or a SHARED note on a document you own. Requires an API key with documents:write.

ParameterTypeDescription
docCode *string
noteId *number

postmd_list_my_notes

List every note the key's member wrote, across all documents, with docCode and documentTitle beside each one. Requires an API key with documents:read.

postmd_list_groups

List groups the key's member belongs to. Requires an API key with groups:read. Paged.

ParameterTypeDescription
pagenumber1-based page number.
sizenumberItems per page.

postmd_list_group_documents

List documents in a group. Requires an API key with groups:read and documents:read. Paged; q searches title and file name (substring, case-insensitive).

ParameterTypeDescription
groupId *number
pagenumber
qstringSearch text for title and file name.
sizenumber
sortstringrecent (default), oldest, name, name_desc, created or created_asc.

postmd_move_document_to_group

Move a document you own into a group. A document belongs to exactly one group, so this replaces its current group. Requires an API key with documents:write.

ParameterTypeDescription
docCode *string
groupId *number

postmd_create_group

Create a group. Requires an API key with groups:write. Documents can then be filed into it.

ParameterTypeDescription
name *string

postmd_update_group

Rename a group. Owner only. Requires an API key with groups:write.

ParameterTypeDescription
groupId *number
namestring

postmd_delete_group

Delete a group. Owner only; the default group cannot be deleted. Documents in it are not deleted. Requires an API key with groups:write.

ParameterTypeDescription
groupId *number