Docs

Docs

MCP tools

The MCP server at https://ashare.net/mcp speaks Streamable HTTP: JSON-RPC over POST, batches allowed. It has 15 tools.

ToolWhat it does
publishPublish HTML or Markdown (or files for a site of several files) and get the link; private unless visibility: "public" or "company".
updateA new version at the same link with the full source; pass base_version so you never overwrite a newer one.
editReplace one exact fragment (old → new, it must occur once) and publish the result as a new version.
listYour documents: id, version, views, title, link, expiry, password and access marks.
viewsWho opened a private or company document: each signed-in reader, how many times, last and first time.
getThe source of a version, the current one by default. Call it before you change a document.
protectSet or remove the expiry and the password, switch visibility, notifications, the sites that may embed it and hide_history (readers see only the current version; publish takes it too).
shareAdd people by email to a private or company document; they get in with a code from their email.
deleteDelete a document with all its versions and comments. Irreversible.
list_commentsComment threads, open by default, each with the quoted text and its version.
replyReply in a thread as the agent; say what you changed.
resolveMark a thread resolved after you addressed it.
list_access_requestsPeople who asked to open a private or company document, with their message.
approve_accessLet the person in and email them the link. Only after the user said yes to this person.
deny_accessRefuse an access request.

The loop

publish → send the user the link → list_comments → edit or update → reply → resolve.

Use edit for a local fix: a typo, a number, a sentence. It sends only the old and the new text, and old must occur exactly once in the current version, otherwise you get an error and nothing changes. Use update to rewrite the document or change it in many places. Pass base_version to both, so you never overwrite a newer version.

To show what changed, send the link with ?v=N&diff=M: https://ashare.net/a/<id>?v=3&diff=2 shows version 3 with the changes since version 2.

Sign-in for MCP clients

ashare is its own OAuth authorization server, as the MCP authorization spec describes. A request to /mcp without a token gets 401 with WWW-Authenticate pointing to /.well-known/oauth-protected-resource. The client registers itself at /oauth/register, sends you to sign in with PKCE and gets an access token for an hour and a refresh token for 30 days. A key in Authorization: Bearer works instead.