PostMD MCP Server
Publish Markdown as shareable PostMD web pages and manage them — no account needed to publish, an API key unlocks groups, notes and management.
Publish documents: create a page from a Markdown string, a local
.mdfile, or several files at once (bulk); set title, password, viewer theme, share end date, and target group (needs an API key).Read documents: fetch metadata (title, filename, password flag, timestamps) or the raw stored Markdown by
docCode— public, withpasswordfor protected documents.Update documents: replace body and/or metadata (including from a local file), clear the password or end date;
notesOnReplace(keep/abort) decides what happens to notes anchored to the old text.Delete documents: remove a document (recoverable 30 days, then purged).
Upload attachments: push images or PDFs and use the returned URL inside Markdown.
Notes and highlights: list, add, edit, resolve/reopen, delete notes; scope
PRIVATEorSHARED; list all your notes across documents.Groups: list, create, rename/expire and delete groups; list documents in a group (paged, searchable, sortable) and move documents into a group or folder.
Access model: publishing/reading needs no key; management needs a
pmk_…key with the relevantdocuments:*/groups:*scopes. Hosted server (https://postmd.turink.com/mcp) carries only the 5 credential-free tools; local (npx -y postmd-mcp-server) has the rest.Not supported: creating or editing document graphs — graph data lives in the Markdown as an HTML comment and must be edited by the agent and sent back through update/create.
Provides tools for publishing, reading, updating, and managing Markdown documents as shareable web pages, including support for attachments, notes, highlights, and groups.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PostMD MCP Server Publish this markdown as a web page and share the link."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PostMD MCP Server
Model Context Protocol server for PostMD — publish a Markdown document, get a web page you share by link, and add a document graph that the viewer draws: the reading order, the bodies and rules a document names, a procedure spread over its chapters. Optional groups, document passwords and viewer themes. This server wraps PostMD's public API (/api/v1) so assistants can publish, read, update and organize documents.
Publishing needs no account and no key. With zero configuration this server can already turn Markdown into a shareable page, and the hosted server at https://postmd.turink.com/mcp needs no install either. An API key adds management: organizing documents in groups, and notes.
30-day retention. Documents have a 30-day retention period (data.retainedUntil) that extends by 30 days whenever the document is read (at most once per day). Documents without a password can be updated or deleted by anyone; password-protected documents require the password or the owner's API key.
Where things are written down: /llms.txt lists what the service can do and which page answers each thing; it is the place to start. /docs/api is the HTTP reference and /api-docs the machine-readable spec.
Hosted or local
Hosted | Local | |
Address |
|
|
Needs | nothing | Node.js 20 or later |
Tools | 5 | all 20 |
API key | not accepted | optional, for member-scoped tools |
Clients | any, including web-only ones such as ChatGPT and claude.ai | any that can run a local process |
The hosted server has no way to receive an API key, so it carries only the tools that need none. Groups, notes and the tools that read a file from your disk are local-only.
Related MCP server: reader3000-mcp
Configuration
Local only — the hosted server reads none of these. All are optional.
Variable | Description |
| Defaults to |
|
|
|
|
Load order: this repo's .env (if present) is applied via dotenv without overwriting variables already set by the host (e.g. MCP env). Do not commit .env or keys.
Tools
Every tool below works on the local server. The hosted server carries five of them:
postmd_create_document, postmd_get_document, postmd_get_document_raw, postmd_update_document, and postmd_delete_document.
Publishing and reading — no key needed:
Tool | Purpose |
| Publish Markdown, get |
| Same, but this server reads a local |
| Metadata by |
| Stored Markdown body (optional |
Managing documents — key with documents:write (or password / no credential for unowned documents without password):
Tool | Purpose |
| Replace content and/or metadata; can clear password |
| Same, body read from a local |
| Delete a document (no undo) |
| Bulk-publish several |
| Move a document into a group |
Graphs
A PostMD document can carry graph data that the viewer draws, showing how the parts of the document relate. No tool here creates or edits a graph, because there is no endpoint for one: the data sits in the Markdown as an HTML comment and travels with the body.
Adding a graph to an existing document therefore means reading it with postmd_get_document_raw,
inserting the comment, and sending the whole body back with postmd_update_document. Publishing a
new document with a graph is an ordinary postmd_create_document call.
The format is at https://postmd.turink.com/docs/graph. Working out what the nodes are and how they connect requires reading the document, which is the calling agent's part; PostMD only draws what it finds.
Keeping the code in the file
A Markdown file can carry the code of the document it was published as, in an HTML comment at its
top marked postmd:document. A later session that opens the file can then tell which document to
update without being given the address. The format is at https://postmd.turink.com/docs/api,
"Keeping the code in the file". No tool here writes the comment; the calling agent edits its own
file.
Replacing content on a document that has notes
Notes are located by the text they quote, not by a stored position. Replacing a document's body therefore moves or loses where they point: a note whose quote is gone loses its place in the body, and one whose quote now appears elsewhere points there instead. The note itself, including the quoted text, is kept either way.
Both update tools require notesOnReplace whenever new content is sent.
Value | Effect |
| Replaces the content and leaves the notes as they are |
| Refuses when the document has notes anchored to its text, and says how many |
Metadata-only updates do not take it.
Notes and highlights — key with documents:read / documents:write. A note is
text anchored to a quoted passage; a highlight is the same object carrying only
a colour. Visibility comes from ownership: on the key member's own document a note
is PRIVATE or SHARED, and on anyone else's document it is always SHARED.
Documents nobody owns — anonymous uploads and service-owned pages — take no notes:
Tool | Purpose |
| Notes on a document: yours + every |
| Attach a note, or a colour-only highlight to a quoted passage |
| Edit a note you wrote |
| Mark a |
| Delete yours, or a |
| Your notes across every document |
Groups — key with groups:read / groups:write:
Tool | Purpose |
| Groups visible to the key (paged) |
| Documents in a group (paged, searchable, sortable) |
| New group |
| Rename group |
| Delete a group (documents survive) |
For uploads: either pass the full Markdown as the markdown argument, or pass a local filePath only so this server reads the file. The path must exist on the machine running the MCP server.
Client configuration
Hosted
Claude Code:
claude mcp add --transport http postmd https://postmd.turink.com/mcpClients that take a JSON config:
{
"mcpServers": {
"PostMD": {
"type": "http",
"url": "https://postmd.turink.com/mcp"
}
}
}In ChatGPT, add it under Settings → Apps; in claude.ai, under Settings → Connectors. There is nothing to authorize.
Local
There is nothing to install: npx fetches the package and the client spawns it.
Claude Code:
claude mcp add postmd -- npx -y postmd-mcp-serverCursor (~/.cursor/mcp.json) and most other stdio clients:
{
"mcpServers": {
"PostMD": {
"type": "stdio",
"command": "npx",
"args": ["-y", "postmd-mcp-server"],
"env": { "POSTMD_API_KEY": "pmk_…" }
}
}
}To run a checkout instead — changing the code, or debugging against a local PostMD — point the client at the file.
git clone https://github.com/reinlainer/postmd-mcp-server.git
cd postmd-mcp-server && npm ci
claude mcp add postmd-dev -- node "$PWD/src/index.js"Leave env out entirely for publish/read-only use. cp .env.example .env works too — the server loads its own .env.
Running npx -y postmd-mcp-server by hand only checks that it starts. It speaks MCP over
stdin and stdout, so it will sit there waiting for a client.
Smoke test
Runs the full write path against a live server and cleans up after itself. Needs a key with all four scopes.
export POSTMD_API_KEY=pmk_…
npm run smokeCreates a group and a passworded document, reads it back, updates it, clears the password, then deletes both. It also publishes one document with no credential and removes it without a token.
Stack
@modelcontextprotocol/sdk 1.30.0, dotenv. License: MIT.
Available Tools
21 toolspostmd_add_noteAInspect
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). scope PRIVATE (default) is visible only to the key's member; SHARED is visible to every reader and only allowed on documents owned by a person.
Inputs: docCode (required), color, scope, content, +3 more.
postmd_create_documentAInspect
Publish Markdown as a PostMD web page. No API key required — anyone can publish. Returns docCode and data.shareUrl; hand shareUrl to people. With an API key the document belongs to that member and can be updated later; groupId files it into that group instead of the default one (key with documents:write).
Inputs: markdown (required), title, groupId, fileName, +3 more.
postmd_create_document_from_fileAInspect
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.
Inputs: filePath (required), title, groupId, fileName, +3 more.
postmd_create_documents_from_filesAInspect
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.
Inputs: filePaths (required), groupId, password, viewerStyle, +1 more.
postmd_create_groupAInspect
Create a group. Requires an API key with groups:write. Documents can then be filed into it and members invited from the web app.
Inputs: name (required), expireDate.
postmd_delete_documentAInspect
Delete a document you own (recoverable for 30 days, then purged). Requires an API key with documents:write.
Inputs: docCode (required).
postmd_delete_groupAInspect
Delete a group. Owner only; the default group cannot be deleted. Documents in it are not deleted. Requires an API key with groups:write.
Inputs: groupId (required).
postmd_delete_noteAInspect
Delete a note: your own, or a SHARED note on a document you own. Requires an API key with documents:write.
Inputs: noteId (required), docCode (required).
postmd_get_documentARead-onlyInspect
Get document metadata by docCode: title, fileName, hasPassword, shareEndDate, viewerStyle, timestamps. Public — no API key needed. Content is not included; use postmd_get_document_raw for the Markdown source.
Inputs: docCode (required).
postmd_get_document_rawARead-onlyInspect
Get the stored Markdown source of a document. Public — no API key needed. Password-protected documents need password; expired documents cannot be read.
Inputs: docCode (required), password.
postmd_list_group_documentsARead-onlyInspect
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).
Inputs: groupId (required), q, page, size, +3 more.
postmd_list_groupsARead-onlyInspect
List groups the key's member belongs to. Requires an API key with groups:read. Paged.
Inputs: page, size.
postmd_list_my_notesARead-onlyInspect
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.
Inputs: no named parameters.
postmd_list_notesARead-onlyInspect
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.
Inputs: docCode (required), password.
postmd_move_document_to_groupAInspect
Move a document you own into a group you can use, optionally into a folder of that group. A document belongs to exactly one group, so this replaces its current group. Requires an API key with documents:write.
Inputs: docCode (required), groupId (required), folderId.
postmd_resolve_noteAInspect
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.
Inputs: noteId (required), docCode (required), resolved (required).
postmd_update_documentAInspect
Update a document you own. Requires an API key with documents:write. Include markdown to replace the stored content; any metadata field replaces that field. clearPassword / clearShareEndDate remove the password / end date.
Inputs: docCode (required), title, fileName, markdown, +5 more.
postmd_update_document_from_fileAInspect
Same as postmd_update_document, but reads the new Markdown from filePath on the machine running this MCP server.
Inputs: docCode (required), filePath (required), title, fileName, +5 more.
postmd_update_groupAInspect
Rename a group or change its expiry. Owner only. Requires an API key with groups:write. clearExpireDate removes the expiry.
Inputs: groupId (required), name, expireDate, clearExpireDate.
postmd_update_noteBInspect
Edit a note you wrote. Requires an API key with documents:write. Omitting scope keeps the current one. The note must keep text or a colour.
Inputs: noteId (required), docCode (required), color, scope, +2 more.
postmd_upload_attachmentAInspect
Upload an image or PDF to reference from a document. Requires an API key with documents:write. Allowed types: png, jpg, jpeg, gif, webp, svg, bmp, pdf. Use the returned data.url as the image/link target in your Markdown, then publish the Markdown with postmd_create_document.
Inputs: filePath (required), fileName.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Each tool targets a distinct resource and action: document CRUD, note lifecycle, group management, and attachment upload are cleanly separated. The only near-overlaps (get_document vs get_document_raw, list_notes vs list_my_notes) are explicitly disambiguated in the descriptions.
All tools use the postmd_ prefix and a consistent snake_case verb_noun pattern such as list_, create_, update_, delete_, and resolve_. Minor variations like add_note or move_document_to_group are still readable and predictable.
At 21 tools the server is above the usual 3-15 sweet spot, but the count is justified by covering documents, groups, and notes as separate lifecycles. Each tool has a concrete job, so the set feels slightly heavy rather than bloated.
Document, group, and note create/read/update/delete flows are substantively covered, including file-based and raw-content variants. The main gaps are the lack of a direct list-my-documents or global search endpoint, and attachments only support upload with no management/delete tools.
Related MCP Connectors
Instant markdown sharing. Create, manage, and share documents with password protection.
Publish Markdown from any agent: POST Markdown, get a gorgeous shareable URL.
Publish Markdown as shareable documents, export PDF and Word, share, and send for e-signature.
Publish HTML, Markdown, PDF, or images as instant shareable links with expiry and passwords.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides powerful Markdown document editing capabilities with thread-safe operations, atomic transactions, and comprehensive validation.104MIT
- AlicenseNot gradedqualityDmaintenanceEnables sharing Markdown documents for collaborative review with inline annotations and structured change requests.12 npmMIT
- AlicenseAqualityCmaintenancePublish HTML or markdown artifacts (reports, dashboards, demos) as instant shareable links with TTL expiry, social preview cards, and optional password protection. Works with the hosted service or a self-hosted instance.125 npm14MIT
- AlicenseNot gradedqualityDmaintenancePublish and manage shareable HTML/Markdown pages with access control and comments via MCP clients.MIT