mdshare
v1.7.0Share 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.
| Parameter | Type | Description |
|---|---|---|
content | string | Inline markdown content. Only use this for short snippets composed in the conversation. For files on disk, use file_path instead. |
file_path | string | Absolute path to a local markdown file. PREFERRED for any file already on disk — bypasses inline content transmission entirely. |
share_permission | string | Permission 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.
| Parameter | Type | Description |
|---|---|---|
document_id * | string | Document ID |
key | string | Access key (admin, edit, comment, or view). Optional if the document is in this MCP server's local store. |
output_path | string | Optional. 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.
| Parameter | Type | Description |
|---|---|---|
document_id * | string | Document ID |
author | string | Your name (for edit attribution) |
base_hash | string | Optional. 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… |
content | string | Inline markdown content (full document body). Only use for short content composed in the conversation. For files on disk, use file_path instead. |
file_path | string | Absolute path to a local markdown file. PREFERRED for any file already on disk — bypasses inline content transmission entirely. |
key | string | Edit 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.
| Parameter | Type | Description |
|---|---|---|
document_id * | string | Document ID |
author | string | Your name (for edit attribution) |
base_hash | string | Optional. 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_path | string | Absolute path to a local JSON file containing an array of {find, replace, replace_all?} operations. PREFERRED when the operations are already prepared on disk. |
key | string | Edit or admin key. Optional if the document is in this MCP server's local store. |
operations | array | Find/replace operations to apply sequentially. Use file_path instead for operations stored on disk. |
generate_link
Generate a share link for a document with specific permissions. Requires admin access. If the document is in this MCP server's local store, 'key' is optional.
| Parameter | Type | Description |
|---|---|---|
document_id * | string | Document ID |
permission * | string | Permission level for the link |
expires_at | string | Optional ISO 8601 date after which the link stops working. Omit for a link that lasts as long as the document. |
key | string | Admin key. Optional if the document is in this MCP server's local store. |
label | string | Optional label for the link |
list_links
List all share links for a document, including status (active/revoked), permission, and label. Requires admin access. If the document is in this MCP server's local store, 'key' is optional.
| Parameter | Type | Description |
|---|---|---|
document_id * | string | Document ID |
key | string | Admin key. Optional if the document is in this MCP server's local store. |
revoke_link
Revoke a share link, making it permanently inactive. Use list_links first to find the token of the link to revoke. Requires admin access. If the document is in this MCP server's local store, 'key' is optional.
| Parameter | Type | Description |
|---|---|---|
document_id * | string | Document ID (used to look up the admin key when 'key' is omitted) |
link_token * | string | The token of the link to revoke (from list_links) |
key | string | Admin key. Optional if the document is in this MCP server's local store. |
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.
| Parameter | Type | Description |
|---|---|---|
document_id * | string | Document ID |
expires_at * | string | New expiry as an ISO 8601 timestamp (e.g. 2026-12-31T00:00:00Z). Must be in the future and within 1 year from now. |
key | string | Admin 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.
| Parameter | Type | Description |
|---|---|---|
document_id * | string | Document ID |
key | string | Any 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.
| Parameter | Type | Description |
|---|---|---|
content * | string | Comment text |
document_id * | string | Document ID |
anchor_text | string | Text in the document this comment refers to |
author_name | string | Your name |
key | string | Comment, edit, or admin key. Optional if the document is in this MCP server's local store. |
parent_id | string | ID 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.
| Parameter | Type | Description |
|---|---|---|
comment_id * | string | Comment ID to resolve |
key * | string | Edit or admin key for the document |
resolved * | boolean | true 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.
| Parameter | Type | Description |
|---|---|---|
document_id * | string | Document ID |
key | string | Any 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.
| Parameter | Type | Description |
|---|---|---|
document_id * | string | Document 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.
| Parameter | Type | Description |
|---|---|---|
admin_url * | string | Full admin URL: https://mdshare.live/d/{id}?key=adm_{token} |