mdshare

v1.7.0
io.github.sathya-sankaran/mdshare Checked 7 hours ago Published 16 days ago

Share markdown as a link anyone can comment on and edit, no account.

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

upload_markdown

Upload markdown to mdshare and receive a shareable link. The response contains a read/comment/edit share link (default permission: comment) that the user can share with others. The admin credential (full control) is stored locally in ~/.mdshare-mcp/documents.json and is NOT returned in this response — if the user explicitly asks to see or save the admin URL, call get_admin_url. PREFER file_path over content for files already on disk — reads directly from disk without transmitting content through this conversation, which is dramatically faster for files larger than ~1KB.

ParameterTypeDescription
contentstringInline markdown content. Only use this for short snippets composed in the conversation. For files on disk, use file_path instead.
file_pathstringAbsolute path to a local markdown file. PREFERRED for any file already on disk — bypasses inline content transmission entirely.
share_permissionstringPermission level for the share link returned to the user. Default 'comment' — recipients can read and comment. Use 'view' for read-only, 'edit' for full write access.

read_document

Read a markdown document from mdshare. Returns the content. If the document was uploaded via this MCP server, 'key' is optional — the admin key will be loaded from local storage. PREFER output_path over inline reading for large documents — writes directly to disk and returns a small summary, dramatically faster than echoing content through the conversation.

ParameterTypeDescription
document_id *stringDocument ID
keystringAccess key (admin, edit, comment, or view). Optional if the document is in this MCP server's local store.
output_pathstringOptional. Absolute local file path to write the document content to. PREFERRED for documents larger than ~10KB — bypasses inline content transmission. When provided, the response is a small summary…

update_document

Update the content of an existing mdshare document (full replace). Requires edit or admin permission. If the document is in this MCP server's local store, 'key' is optional. PREFER file_path over content for files already on disk — reads directly from disk without transmitting content through this conversation. If both file_path and content are provided, file_path wins. For small edits to large documents, consider patch_document instead — keeps version history granular.

ParameterTypeDescription
document_id *stringDocument ID
authorstringYour name (for edit attribution)
base_hashstringOptional. The content_hash of the version your edit is based on (from a previous update or patch response). If the document has changed since, the write is refused with a conflict instead of overwriti…
contentstringInline markdown content (full document body). Only use for short content composed in the conversation. For files on disk, use file_path instead.
file_pathstringAbsolute path to a local markdown file. PREFERRED for any file already on disk — bypasses inline content transmission entirely.
keystringEdit or admin key. Optional if the document is in this MCP server's local store.

patch_document

Apply find/replace operations to a document without rewriting the full content. More efficient than update_document for small edits to large documents. Each find string must be unique unless replace_all is set. If the document is in this MCP server's local store, 'key' is optional. PREFER file_path over operations for batches of operations stored in a JSON file on disk — bypasses inline transmission. If both file_path and operations are provided, file_path wins.

ParameterTypeDescription
document_id *stringDocument ID
authorstringYour name (for edit attribution)
base_hashstringOptional. The content_hash of the version your edit is based on (from a previous update or patch response). If the document has changed since, the write is refused with a conflict instead of overwriti…
file_pathstringAbsolute path to a local JSON file containing an array of {find, replace, replace_all?} operations. PREFERRED when the operations are already prepared on disk.
keystringEdit or admin key. Optional if the document is in this MCP server's local store.
operationsarrayFind/replace operations to apply sequentially. Use file_path instead for operations stored on disk.

set_expiry

Change when a document auto-deletes. The new expiry must be a FUTURE date (ISO 8601) at most 1 year out; set a nearer date to have it removed sooner. Requires admin access. If the document is in this MCP server's local store, 'key' is optional. There is no separate delete tool — bringing the expiry forward is how you remove a document early.

ParameterTypeDescription
document_id *stringDocument ID
expires_at *stringNew expiry as an ISO 8601 timestamp (e.g. 2026-12-31T00:00:00Z). Must be in the future and within 1 year from now.
keystringAdmin key. Optional if the document is in this MCP server's local store.

list_comments

List all comments on a document, including replies and resolution status. If the document is in this MCP server's local store, 'key' is optional.

ParameterTypeDescription
document_id *stringDocument ID
keystringAny valid access key. Optional if the document is in this MCP server's local store.

post_comment

Post a comment on a document, optionally anchored to specific text. Can also reply to an existing comment. If the document is in this MCP server's local store, 'key' is optional.

ParameterTypeDescription
content *stringComment text
document_id *stringDocument ID
anchor_textstringText in the document this comment refers to
author_namestringYour name
keystringComment, edit, or admin key. Optional if the document is in this MCP server's local store.
parent_idstringID of the comment to reply to (one level nesting)

resolve_comment

Resolve or unresolve a comment. Requires edit or admin permission. Key must be provided explicitly because comments are addressed by comment_id — the MCP server can't look up the parent document.

ParameterTypeDescription
comment_id *stringComment ID to resolve
key *stringEdit or admin key for the document
resolved *booleantrue to resolve, false to unresolve

get_versions

Get the edit history of a document — who edited, when, and via what. If the document is in this MCP server's local store, 'key' is optional.

ParameterTypeDescription
document_id *stringDocument ID
keystringAny valid access key. Optional if the document is in this MCP server's local store.

list_my_documents

List documents you've previously uploaded via this MCP server on this machine. Returns document_id, title, share_url, share_permission, created_at, and expires_at for each — does NOT return the admin credential. Use this to help the user find and resume older documents without re-pasting admin URLs. Does NOT include documents created via the mdshare web UI or via direct API calls from other clients — only those created by this MCP server. Returns an empty array on a fresh install or after the local store has been cleared.

get_admin_url

Retrieve the admin URL for a document previously uploaded via this MCP server. The admin URL grants full control and is equivalent to a password. ONLY call this tool when the user explicitly asks to see, save, or copy the admin URL — for example: 'give me the admin URL', 'save the admin link to my notes', 'what's the owner credential'. DO NOT call this as part of normal upload, share, or collaboration flows; the admin URL should never be surfaced to the user unless directly requested.

ParameterTypeDescription
document_id *stringDocument ID (from upload_markdown response or list_my_documents)

register_document

Register an mdshare admin URL you already have saved (in notes, chat history, emails, etc.) so it can be resumed without re-pasting the key every time. Takes an admin URL of the form https://mdshare.live/d/{id}?key=adm_..., verifies it against the live API, and stores it in ~/.mdshare-mcp/documents.json. Only accepts admin URLs (adm_ prefix) — view/comment/edit share links will be rejected. For bulk registration across many files, use the LLM's built-in file reading and search tools to find admin URLs, then call this tool once per URL found.

ParameterTypeDescription
admin_url *stringFull admin URL: https://mdshare.live/d/{id}?key=adm_{token}