postmd-mcp-server
v2.6.1Publish 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…
| Parameter | Type | Description |
|---|---|---|
markdown * | string | Full 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. |
fileName | string | Upload filename, must end in .md. Default document.md. |
groupId | number | File the document in this group instead of the default group (needs an API key). |
password | string | Readers must supply this password to see the content. |
title | string | Shown in the viewer and link previews. Defaults to fileName without .md. |
viewerStyle | string | Viewer 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.
| Parameter | Type | Description |
|---|---|---|
filePath * | string | Path to a .md file on the MCP server host, read as UTF-8. Prefer an absolute path. |
fileName | string | Upload filename. Defaults to the basename of filePath. |
groupId | number | File the document in this group instead of the default group (needs an API key). |
password | string | Readers must supply this password to see the content. |
title | string | Defaults to the file name without .md. |
viewerStyle | string | Viewer 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.
| Parameter | Type | Description |
|---|---|---|
filePaths * | array | Paths to .md files on the MCP server host. Each becomes its own document. |
groupId | number | File every document in this group instead of the default group. |
password | string | Readers must supply this password to see the content. |
viewerStyle | string | Viewer 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.
| Parameter | Type | Description |
|---|---|---|
docCode * | string | Document 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`.
| Parameter | Type | Description |
|---|---|---|
docCode * | string | |
password | string | Plain 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.
| Parameter | Type | Description |
|---|---|---|
docCode * | string | |
clearPassword | boolean | true removes the password. |
currentPassword | string | Current password to authenticate if the document is password-protected. |
fileName | string | Upload filename when replacing content. Default document.md. |
markdown | string | Full 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. |
notesOnReplace | string | Required 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… |
password | string | Readers must supply this password to see the content. |
title | string | |
viewerStyle | string | Viewer 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.
| Parameter | Type | Description |
|---|---|---|
docCode * | string | |
filePath * | string | Path to a .md file on the MCP server host, read as UTF-8. Prefer an absolute path. |
notesOnReplace * | string | Required 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… |
clearPassword | boolean | true removes the password. |
currentPassword | string | Current password to authenticate if the document is password-protected. |
fileName | string | Upload filename. Defaults to the basename of filePath. |
password | string | Readers must supply this password to see the content. |
title | string | |
viewerStyle | string | Viewer 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.
| Parameter | Type | Description |
|---|---|---|
docCode * | string | |
password | string | Document 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.
| Parameter | Type | Description |
|---|---|---|
docCode * | string | |
password | string | Plain 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.
| Parameter | Type | Description |
|---|---|---|
docCode * | string | |
color | string | YELLOW, GREEN, BLUE or PURPLE. |
content | string | Note text, up to 4000 characters. Omit for a colour-only highlight. |
password | string | Plain document password, if the document has one. |
quotedContent | string | Passage of the body this note points to, up to 4000 characters. Matched by text, so it survives edits elsewhere. |
scope | string | PRIVATE (default) or SHARED. |
textStart | number | Character 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.
| Parameter | Type | Description |
|---|---|---|
docCode * | string | |
noteId * | number | |
color | string | YELLOW, GREEN, BLUE or PURPLE. |
content | string | |
quotedContent | string | |
scope | string | PRIVATE 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.
| Parameter | Type | Description |
|---|---|---|
docCode * | string | |
noteId * | number | |
resolved * | boolean | true 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.
| Parameter | Type | Description |
|---|---|---|
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.
| Parameter | Type | Description |
|---|---|---|
page | number | 1-based page number. |
size | number | Items 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).
| Parameter | Type | Description |
|---|---|---|
groupId * | number | |
page | number | |
q | string | Search text for title and file name. |
size | number | |
sort | string | recent (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.
| Parameter | Type | Description |
|---|---|---|
docCode * | string | |
groupId * | number |
postmd_create_group
Create a group. Requires an API key with groups:write. Documents can then be filed into it.
| Parameter | Type | Description |
|---|---|---|
name * | string |
postmd_update_group
Rename a group. Owner only. Requires an API key with groups:write.
| Parameter | Type | Description |
|---|---|---|
groupId * | number | |
name | string |
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.
| Parameter | Type | Description |
|---|---|---|
groupId * | number |