
PasteHTML
dev.pastehtml由 pastehtml.dev 發布官方發布者v1.1.0更新於 Oct 28, 2026
Publish, update, and organize HTML and Markdown pastes on PasteHTML as the authorized user.
概覽
PasteHTML 的遠端 MCP 伺服器讓助理在使用者帳號中發布、更新與整理 HTML 或 Markdown 貼上內容,並回傳分享連結。
- 可以做什麼
- 建立與重新發布:發布新的 HTML 或 Markdown 貼上內容,並就地覆寫既有貼上內容。
- 讀取與統計:取得單一貼上內容的中繼資料、連結與已存內容,並查看彙總瀏覽次數。
- 列出貼上內容:分頁瀏覽帳號下的貼上內容,可依資料夾篩選。
- 管理資料夾:列出資料夾及其貼上數量,新增、重新命名與刪除資料夾(刪除後其中的貼上內容仍保留,變成未分類)。
- 設定貼上內容:變更貼上內容的密碼、自訂子網域或所屬資料夾。
- 適用情境
- 適合助理產出設計文件、實作計畫等 HTML 或 Markdown 成果,需要回傳可分享連結而不是把內容貼進對話時使用。也適合需要把已發布頁面依資料夾整理並查看瀏覽次數的工作流程。
- 執行需求
- 遠端 Streamable HTTP 端點,不需本機套件或執行環境。需要 OAuth 2.1(PKCE)與動態用戶端註冊:首次使用時用戶端會開啟瀏覽器授權頁,因此需要 PasteHTML 帳號與瀏覽器。申請的權限範圍為 mcp:read、mcp:pastes:write 與 mcp:folders:write。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 PasteHTML,將其新增到工作區。
- 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/dev.pastehtml%2Fmcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。
{
"mcpServers": {
"pastehtml": {
"type": "http",
"url": "https://pastehtml.dev/mcp"
}
}
}README
[pastehtml.dev — Share HTML in seconds]
pastehtml.dev
Share HTML pages in seconds. Drop an HTML file, get a private link your friends can open, preview, and view the source of. Anonymous publishing still works, and accounts add folders, custom subdomains, view counts, browser-based re-upload updates, and account API keys for agent publishing into folders.
How it works
- Drag and drop (or browse for) an
.html/.htmfile up to 2 MB. - The document is published at
https://<token>.pastehtml.dev/— or at a claimed custom subdomain likehttps://launch-plan.pastehtml.dev/— with an inspector page (copy link, preview, highlighted source) at/p/<token>. Tokens are random 32-character lowercase-alphanumeric IDs (~165 bits of entropy — lowercase because they double as subdomains, and browsers lowercase hostnames), so random links are private unless shared. - Pastes can be password-protected. Locked pastes require the password before the inspector page, raw bytes, rendered preview, or live subdomain are served.
- Signed-in users can save pastes into folders, see view counts, and re-upload a
replacement
.html/.htmfile without changing the share link. Pastes can never be deleted. API-created update tokens still work for token-based automated updates. - The share page offers a live preview (with an in-site fullscreen mode) and a Rouge-highlighted source view.
- Every paste is served as a real page from its own origin —
https://<token>.pastehtml.dev/— so scripts and localStorage work (review-progress checklists persist) while staying fully isolated from other pastes and from the app itself. The path-based/p/<token>/rawendpoint returns the paste's exact bytes astext/plain— a byte-exact copy for programmatic clients, immune to any CDN HTML rewriting in transit — while/p/<token>/renderserves the same bytes astext/htmlinside a CSPsandbox.
Agent API
Publish without a browser — ideal for AI agents that produce design documents
or implementation plans and want to hand back a share link. Anonymous publishing
still works with no credentials; signed-in users can also create account API keys
at /api_keys so an agent can publish into their account and target folders.
Anonymous creation returns 201 with
{ token, title, custom_subdomain, folder, owner, account_paste, password_protected, views_count, live_url, url, raw_url, render_url, markdown_url, update_token }
(or 422 with { errors }). Account-key creation returns the same paste fields
but omits update_token; update account-owned pastes with the account key so
revoking the key stops that agent's future access. Add password=<secret> (or
custom_subdomain=<name>, which requires an account key) to creation/update
requests; send clear_password=1 on updates to remove a paste password. Fetch raw_url to read a paste's exact bytes
back (text/plain, never rewritten in transit).
Account API keys for agents
A signed-in user can open API keys from the dashboard, create a key, and give
that secret to an agent. Use it as either Authorization: Bearer pht_... or
X-PasteHTML-API-Key: pht_.... When a valid account key is present on
POST /api/pastes, the paste is owned by that user and appears in their
dashboard. Folder targeting is account-only:
Use folder_name=<name> to find or create a folder under that account,
folder_id=<id> to target an existing folder, and clear_folder=1 on updates
to move a paste back to All pastes. Keys can also be scoped to a default folder
when created; scoped keys always publish there, can update only pastes already
in that folder, reject folder overrides, only list that folder through the folder
API, and cannot create unrelated folders. Scoped keys are revoked automatically
if the folder is deleted. Unscoped agents can discover existing folder IDs with:
Unscoped keys can create folders with either nested form params
(folder[name]=Roadmap) or a simple top-level name=Roadmap, whichever is
easier for the client. Folder-scoped keys receive 403 on folder creation.
An account key can update pastes owned by that account, while the per-paste
update_token flow keeps working as long as the paste stays anonymous. If an
agent needs to claim an anonymous paste into an account, send the account key in
Authorization: Bearer ... and the paste secret separately as
X-Update-Token: .... Claiming is one-way: afterward the account key is the
paste's update credential and the old token stops working.
The update_token is revealed exactly once — the server stores only a digest —
and authorizes any number of in-place updates while the paste remains anonymous:
Updates accept the same two body forms as creation and return 200 with the
refreshed { token, title, custom_subdomain, folder, owner, account_paste, password_protected, views_count, live_url, url, raw_url, render_url, markdown_url },
403 for a wrong or missing update token or an account key that does not own the paste,
and 404 for an unknown paste. Paste publish/update endpoints are rate limited per IP at 20 requests per minute and 1,000 per day; folder API endpoints also require an account key and are rate limited per IP.
Agents discover all of this on their own: the full integration guide lives at
/llms.txt (also pointed to from the
homepage, both visibly and in an HTML comment for raw fetchers). Telling an
agent "publish this on pastehtml.dev" is enough.
MCP server
For agents that speak the Model Context Protocol,
pastehtml.dev is also a remote MCP server at https://pastehtml.dev/mcp
(Streamable HTTP). Instead of a pht_ key, the agent authorizes once through
your browser over OAuth and then works inside your account — the same folders,
view counts, and permanent pastes as the dashboard.
On first use the client opens a browser consent screen; approve it and the
agent is connected — no key to copy or store. Authorization is OAuth 2.1 with
PKCE and RFC 7591 Dynamic Client Registration, scoped to mcp:read,
mcp:pastes:write, and mcp:folders:write. Review or revoke connected
agents any time under Connected agents in the dashboard.
Ten tools are exposed (pastes are permanent — there is no delete-paste tool):
create_paste— publish a new HTML or Markdown paste, optionally into a folder.update_paste— republish an existing paste's content (overwrites it in place).configure_paste— change a paste's password, custom subdomain, or folder.get_paste— fetch one paste's metadata, URLs, and stored content.get_paste_stats— aggregate view analytics for a paste.list_pastes— page through the account's pastes, optionally filtered by folder.list_folders— list folders with their paste counts.create_folder— create a new, empty folder.rename_folder— rename a folder.delete_folder— delete a folder (its pastes survive, unfiled).
Dynamic Client Registration can be switched off in production with the
MCP_DYNAMIC_REGISTRATION_DISABLED environment variable (any already
pre-registered clients keep working). Smoke-test a deployment by fetching its
discovery document:
Stack
- Ruby on Rails 8.1 · PostgreSQL · Hotwire (Turbo + Stimulus)
- Tailwind CSS v4 (cssbundling) · esbuild (jsbundling) · Yarn 4
- Tooling via mise, PostgreSQL via Docker Compose
- Comic-book design: Bangers display type over Inter, halftone textures, ink-outlined panels with hard offset shadows
- Installable PWA: manifest + minimal network-first service worker with an offline fallback page (pastes themselves are never cached)
- SEO via meta-tags (OG/Twitter cards with a branded OG image, canonical, noindex on paste pages) and comic-styled static error pages
Development
Or step by step:
Tests and lint
Deployment
Deploys with Kamal from GitHub Actions (the
"Kamal Run" workflow) to a single server: the app container plus a postgres
18 accessory. db/production.sql creates the Solid Cache/Queue databases on
the accessory's first boot. Pastes are served from <token>.pastehtml.dev
subdomains, so the proxy routes the wildcard with a Cloudflare Origin CA
certificate (wildcards can't get Let's Encrypt certs over HTTP-01).
One-time setup:
- Cloudflare (free plan): add a proxied
Arecord forpastehtml.dev,www, and a proxied wildcard*record, all pointing at the server. Set SSL/TLS mode to Full (strict). Create an Origin Server certificate forpastehtml.dev, *.pastehtml.devand keep the PEM pair. - Repository Actions secrets:
SERVER_IP,SSH_PRIVATE_KEY(root access to the server),RAILS_MASTER_KEY(fromconfig/master.key),POSTGRES_PASSWORD,CLOUDFLARE_ORIGIN_CERTIFICATEandCLOUDFLARE_ORIGIN_KEY(the Origin CA PEM pair). The container registry (ghcr.io) authenticates with the workflow's ownGITHUB_TOKEN. - Run the Kamal Run workflow with the command
setuponce (provisions postgres + proxy), then withdeployfor every release.
For local runs of kamal commands, put the Origin CA pair in
.kamal/certs/origin.pem / origin-key.pem (gitignored), export
SERVER_IP and POSTGRES_PASSWORD, and remove the GHA builder cache block
from config/deploy.yml if you need to build the image locally.
來源:README.md,提交 b065130
工具
0版本歷史
1- v1.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 75%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。
