Docs
MCP tools
The MCP server at https://ashare.net/mcp speaks Streamable HTTP: JSON-RPC over POST, batches allowed. It has 15 tools.
| Tool | What it does |
|---|---|
publish | Publish HTML or Markdown (or files for a site of several files) and get the link; private unless visibility: "public" or "company". |
update | A new version at the same link with the full source; pass base_version so you never overwrite a newer one. |
edit | Replace one exact fragment (old → new, it must occur once) and publish the result as a new version. |
list | Your documents: id, version, views, title, link, expiry, password and access marks. |
views | Who opened a private or company document: each signed-in reader, how many times, last and first time. |
get | The source of a version, the current one by default. Call it before you change a document. |
protect | Set 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). |
share | Add people by email to a private or company document; they get in with a code from their email. |
delete | Delete a document with all its versions and comments. Irreversible. |
list_comments | Comment threads, open by default, each with the quoted text and its version. |
reply | Reply in a thread as the agent; say what you changed. |
resolve | Mark a thread resolved after you addressed it. |
list_access_requests | People who asked to open a private or company document, with their message. |
approve_access | Let the person in and email them the link. Only after the user said yes to this person. |
deny_access | Refuse 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.