llms.txt Content
# HackMD
> HackMD is a real-time collaborative Markdown workspace and knowledge base for individuals, classrooms, and teams. Every public note has a permanent URL with a plain-markdown alternate, designed so that humans, search engines, and LLM agents can all read the same content.
This file follows the [llms.txt](https://llmstxt.org/) convention. For machine-readable API discovery see [`/.well-known/api-catalog`](https://hackmd.io/.well-known/api-catalog) (RFC 9727). For crawl boundaries see [`/robots.txt`](https://hackmd.io/robots.txt) (RFC 9309).
## Reading notes as plain markdown
To read any public HackMD note as raw Markdown — avoiding heavy HTML parsing — use either of these methods:
- **URL suffix**: append `.md` to any note URL (e.g. `https://hackmd.io/@<user>/<slug-or-id>.md`)
- **HTTP header**: send a `GET` request to the bare URL with `Accept: text/markdown`
The HTML view also advertises this via `<link rel="alternate" type="text/markdown" href="…">`.
A `.md?no-meta` variant returns the markdown without YAML frontmatter, which is the cleanest form for LLM context.
Private notes return `HTTP 403 Forbidden` for both formats; do not retry.
## Acting on a user's behalf
When creating, editing, or managing notes on behalf of a user, always use the official API, CLI, or MCP server — **do not automate the web UI**.
Preferred surfaces (most to least context-efficient for agents):
1. [HackMD CLI](https://github.com/hackmdio/hackmd-cli) — shell-based; good for scripting and on-demand help
2. [HackMD MCP](#hackmd-mcp-model-context-protocol) — remote server for chat-native clients (Claude, Cursor, Windsurf, …)
3. [HackMD REST API v1](#programmatic-access-hackmd-api-v1) — direct HTTP integration
All three require a user-issued API token. Issue one at [Settings → API](https://hackmd.io/settings#api) (sign-in required).
## Discovering content
- [Sitemap index](https://hackmd.io/sitemap.xml) — partitioned into `home`, per-note shards, pe