Skip to content
Linkwoven
Sample page. Placeholder copy that shows the template. Real content replaces it before launch.

Publishing from AI agents

How AI agents publish documents with Linkwoven through the CLI, the MCP server and the REST API, with defaults, flags and what is planned.

Last updated

This page is written for AI agents and the people who configure them.

Status: Linkwoven is in private beta. The CLI, the local MCP server and REST API v1 are part of the beta and may not be available to you yet. Items marked "planned" are not built. Names and flags can change before general availability.

What Linkwoven is

Linkwoven publishes a document, such as an HTML file, a built site, a PDF or Markdown, and returns a link. The publisher chooses who can open the link: anyone, people with a password, anyone with a verified email, or invited addresses only. The publisher can then see who opened it.

Use it when a user asks to share, publish, send or host an HTML file, report, deck or artifact, especially privately.

Quick start

npx linkwoven publish file.html

If the user is not logged in, this is an anonymous publish. The output contains:

  • url: the document link. It expires after 7 days.
  • claim_url: a link the user opens to sign up and keep the document.
  • expires_at: the expiry time.

Always relay the claim link to the user.

Logging in

npx linkwoven login

Login uses a device-code flow in the browser. The key is stored in the operating system keychain. It is never written to the project folder.

CLI commands

CommandPurpose
linkwoven publish <path>Publish a file or folder. Folders are zipped before upload
linkwoven update <url or id> <path>Replace the content. The link and permissions stay the same
linkwoven links <url or id>List or add links for a document
linkwoven views <url or id>Show who viewed and when
linkwoven loginAuthenticate this machine
linkwoven mcpRun as a local MCP server over stdio

Flags for publish

FlagMeaningExample
--inviteComma-separated emails to invite. Sets invited-only access--invite dana@example.com,lee@example.com
--accessAccess mode: public, password, email or allowlist--access password
--titleDocument title--title "Q3 update"
--expiresLink lifetime--expires 30d
--jsonMachine-readable output. Available on every command--json

Defaults that agents should rely on

  • Private by default. When recipients are given, the link requires those people to verify by email. When no recipients are given and the user is not logged in, the document is unlisted and must be claimed.
  • Public is explicit. Pass --access public only when the user has asked for a public link in plain words.
  • Stable links. Use update to change a document. Do not publish a second copy.
  • Confirm recipients. Read the invite list back to the user before publishing.

MCP server

Local, over stdio

npx linkwoven mcp

This uses the key stored by linkwoven login and can read local files. A typical client configuration:

{
  "mcpServers": {
    "linkwoven": {
      "command": "npx",
      "args": ["linkwoven", "mcp"]
    }
  }
}

Remote, over HTTP (planned)

A hosted MCP server with OAuth sign-in, for chat clients that cannot run local commands, is planned. It is not available yet.

Tools

ToolPurpose
publish_documentPublish from a path or inline content. Optional title, access, recipients, expires_in, notify. Returns the URL
update_documentReplace the content of a document, by URL or ID. Links are kept
share_documentCreate or change a link. Invite or remove recipients
list_documentsSearch documents by title
get_viewsWho viewed, when, and a summary of engagement
revoke_accessDisable a link or remove a recipient. Marked destructive
create_space, add_to_spacePlanned, with data rooms

REST API

Base URL: https://api.linkwoven.com/v1. Authenticate with Authorization: Bearer and a workspace API key. Keys are scoped and shown once.

Method and pathPurpose
POST /documentsCreate a document, optionally with a link in the same call
PUT /documents/{id}/contentPublish a new version. Links are kept
POST /documents/{id}/linksCreate a link with access settings
PATCH /links/{id}, DELETE /links/{id}Change or revoke a link
GET /documents/{id}/viewsRead view analytics
POST /publishAnonymous publish. No key. Rate limited

An OpenAPI description at /v1/openapi.json, webhooks, an SDK package and a GitHub Action are planned.

Making a document that renders

Documents run in a sandbox. To render correctly:

  • Prefer one self-contained HTML file, or a folder with index.html and relative paths.
  • Embed data in the file. Requests to outside URLs are blocked.
  • Load libraries only from cdnjs.cloudflare.com, cdn.jsdelivr.net, unpkg.com, cdn.tailwindcss.com or esm.sh.
  • Embed images as data URIs or inline SVG, or include them in the folder.
  • Do not use iframes, popups, or forms that post to a server.

The rules are listed in the HTML checker page.

Before publishing, an agent should check

  1. The file contains no secrets, tokens or local paths.
  2. The recipients are the ones the user named.
  3. The access mode is not public unless the user asked for public.

Limits to state to users

  • A permitted viewer can screenshot or copy a document.
  • Viewing time is an estimate and is shown with a "~".
  • Linkwoven is not end-to-end encrypted.

See access modes, analytics and the security model.

Frequently asked questions

Can an agent publish without an API key?
Yes, by design. An anonymous publish returns a link that expires after 7 days and a claim link the user opens to keep the document. Inviting people and reading views need a logged-in workspace.
Are links created by agents public?
Not by default. A link is public only when public access is requested explicitly.
Which agents work with Linkwoven?
Any agent that can run a shell command can use the CLI. Any client that supports the Model Context Protocol can use the MCP server.