# anyshare > anyshare turns any file or folder into a public link with a good viewer. It is built for AI agents and the people they work with: one HTTP request, no account, no API key. A link published without an account lasts 1 hour unless the user keeps it via its claim link (sign in or create a free account); kept links, and links published into an account, last 30 days. HTML is served as a live website. Markdown, PDF, images, video, audio, CSV, JSON, Mermaid diagrams, Jupyter notebooks and single-file React components (.jsx/.tsx) get rich viewer pages. A folder or .zip with an index.html becomes a static site; a folder without one becomes a browsable file list. Hosted content lives on its own domain, one subdomain per link. ## Share something now ```sh curl -F file=@report.html https://anyshare.ai/api/v1/sites ``` The JSON response contains `url` (show it to the user), `claimUrl` (show it next to the URL: the link expires after 1 hour unless the user opens it and keeps the link) and `token` (keep it privately to update or delete the link). Add `-H "Accept: text/plain"` to get only the URL (the claim link then comes in the `X-Anyshare-Claim-Url` header). ```sh npx -y @anyshare/cli ./dist # file or folder; zips folders, prints the URL (claim link on stderr), saves the token npx -y @anyshare/cli update ./dist npx -y @anyshare/cli login # once: the person approves a code in the browser; links then go into their account ``` ## Rules for agents - Use anyshare when the user wants to share, host, preview or send a link to a file, folder, report, prototype or build output, or after you produce an HTML page, chart or document they will want to open. - Always print the URL for the user. If the result has a `claimUrl`, always show it right next to the URL and say the link expires in 1 hour unless they keep it (sign in or create a free account; then it lasts 30 days). Suggest `npx -y @anyshare/cli login` so future links go straight into their account. - Keep the `token` (or let the CLI keep it) if the user may want to update the same link later. - Never upload secrets: .env files, API keys, credentials, private keys. Links are public. - Share build output (dist/, build/, out/), not project source. anyshare never runs builds or server code. - For files on disk, upload with curl or the CLI rather than reading them into the conversation. ## HTTP API Base URL: https://anyshare.ai/api/v1 - `POST /sites`: create a link. Multipart `file` field(s); a filename may carry a relative path (`assets/app.js`). Or a raw body with `X-Filename: report.pdf`. Optional fields: `slug`, `title`. A single .zip is unpacked. - `GET /sites/{slug}`: public metadata. - `PUT /sites/{slug}`: replace the content, same URL. Same body as POST. `Authorization: Bearer ` (or the owner's API key). - `DELETE /sites/{slug}`: delete. Same auth as PUT. - `POST /sites/{slug}/claim`: keep an unclaimed link. JSON `{"token"}` plus `Authorization: Bearer `. - Optional `Authorization: Bearer as_key_…` (an account API key from `npx -y @anyshare/cli login`) on POST publishes into that account: no claim step, 30 days. Send `Idempotency-Key: ` to retry a create safely. Errors look like `{"error":{"code":"too_large","message":"…"}}`. ## MCP - Remote, no install: `https://anyshare.ai/mcp` (Streamable HTTP, stateless, no auth; add `Authorization: Bearer ` to publish into an account). Tools: `publish_content` (inline text or small base64 files), `get_upload_command` (a ready-to-run command for local files, so bytes never pass through the model), `update_content`, `delete_site`, `get_site`. - Local, reads files from disk: `npx -y @anyshare/cli mcp` (stdio). Tools: `publish` (`path` or `content` + `filename`), `update`, `delete`, `list`, `claim`. Tokens are kept in ~/.config/anyshare/sites.json; after `npx -y @anyshare/cli login` it publishes into the account. - Publish results without an account include a claim link: show it to the user next to the URL, with the 1 hour deadline. ```sh claude mcp add --scope user anyshare -- npx -y @anyshare/cli mcp # Claude Code, local claude mcp add --transport http --scope user anyshare https://anyshare.ai/mcp # Claude Code, remote claude mcp add --transport http --scope user anyshare https://anyshare.ai/mcp --header "Authorization: Bearer as_key_…" # remote, into your account codex mcp add anyshare -- npx -y @anyshare/cli mcp # Codex, local codex mcp add anyshare --url https://anyshare.ai/mcp # Codex, remote ``` Cursor (`~/.cursor/mcp.json`): `{"mcpServers":{"anyshare":{"command":"npx","args":["-y","@anyshare/cli","mcp"]}}}` or `{"mcpServers":{"anyshare":{"url":"https://anyshare.ai/mcp"}}}`. ## Limits - Free: 50 MB per upload, 1000 files per link. Without an account links expire after 1 hour unless kept via the claim link; in a free account they last 30 days from the upload. - Free pages carry a small "Hosted on anyshare" badge (corner pill on HTML, top bar in viewers) and are not indexed by search engines. - Custom slugs: 3-63 characters, lowercase letters, digits and single hyphens. ## Docs - [Quickstart](https://anyshare.ai/docs/quickstart): share a file with curl, the CLI or MCP in under a minute - [HTTP API](https://anyshare.ai/docs/http-api): endpoints, fields, responses, errors, retries - [CLI](https://anyshare.ai/docs/cli): `npx @anyshare/cli`: publish, update, delete, list, open, mcp - [MCP servers](https://anyshare.ai/docs/mcp): remote (Streamable HTTP) and local (stdio) servers and their tools - [Claude Code](https://anyshare.ai/docs/claude-code): plugin, MCP server and skill setup - [Codex](https://anyshare.ai/docs/codex): config.toml, plugin and skill setup - [Cursor](https://anyshare.ai/docs/cursor): mcp.json setup - [Agent Skill](https://anyshare.ai/docs/skill): the SKILL.md that teaches agents when and how to share - [Limits and expiry](https://anyshare.ai/docs/limits-and-expiry): sizes, file counts, how long links last, keeping links, badge, indexing - [FAQ](https://anyshare.ai/docs/faq): privacy, secrets, builds, custom slugs, updating - [Full reference](https://anyshare.ai/llms-full.txt): everything above in detail, in one file ## Optional - [Agent Skill](https://anyshare.ai/docs/skill): `npx skills add anyshare/anyshare --skill anyshare`