当前位置: 首页 > Skill >

Publish to dochost

Publish to dochost

1.0.0 2026.11.24 浏览:975
获取Skill文件查看使用说明
作者:顾舟许可证:
本文目录展开

Publish to dochost

Turn Markdown or HTML into a hosted web page at its own URL, in one call. The page renders live (Markdown and HTML), so the recipient sees a real page, not a raw .md blob. Free links last 7 days; permanent links, passwords, custom slugs and branding removal follow the account's plan.

One-time setup

The agent publishes as a dochost user, authenticated with an API key.

  1. Sign in at https://dochost.io, open Settings → API keys, create a key.
  2. Make it available to the agent as the environment variable DOCHOST_API_KEY.

That's the whole setup. Entitlements (link lifetime, password, custom slug, branding) come from the account that owns the key, never from tool input.

How to publish

Send one JSON-RPC tools/call to the dochost MCP endpoint with the key as a Bearer token. No handshake or initialize call is needed (the server is stateless).

curl -sS -X POST https://dochost.io/api/mcp 
  -H "Authorization: Bearer $DOCHOST_API_KEY" 
  -H "Content-Type: application/json" 
  -H "Accept: application/json" 
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "publish",
      "arguments": {
        "body": "# My reportnnHello world.",
        "format": "markdown"
      }
    }
  }'

Reading the result

The response is JSON-RPC. The tool payload is a JSON string inside result.content[0].text. Parse it and read url:

# ...pipe the curl output through jq:
| jq -r '.result.content[0].text | fromjson | .url'

A success payload looks like:

{ "ok": true, "slug": "q3-report", "url": "https://dochost.io/d/q3-report",
  "editToken": "…", "expiresAt": "2026-06-22T12:00:00.000Z" }

Give the user the url. Mention expiresAt if it is set (free links expire; null means permanent). Keep editToken only if the user may want to edit later.

publish arguments

Argument Type Notes
body string (required) The Markdown or HTML to publish.
format "markdown" | "html" Auto-detected when omitted. Set it if the content is ambiguous.
public boolean List on dochost Explore. Default false (unlisted).
customSlug string · paid Choose the link path instead of a random slug.
password string · paid Gate the page behind a password.
noBranding boolean · paid Hide the dochost footer badge.

List previously published pages

curl -sS -X POST https://dochost.io/api/mcp 
  -H "Authorization: Bearer $DOCHOST_API_KEY" 
  -H "Content-Type: application/json" -H "Accept: application/json" 
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
       "params":{"name":"list_my_pages","arguments":{"limit":10}}}'

Returns compact records (slug, url, title, createdAt, expiresAt) — never page bodies.

Errors the user should hear about

The payload has ok: false and a plain-English message on failure. Common cases:

  • RATE_LIMITED — too many publishes; the message says how long to wait.
  • Quota / size limits — free plan caps page count and document size; the message tells the user to delete a page or upgrade.
  • Blocked URL — the content contained an unsafe link and was not published.
  • Invalid / taken customSlug — pick a different slug (lowercase, numbers, hyphens).

Relay the message verbatim; it is written for end users.

Notes

  • Never put secrets, tokens, or private keys in body — published pages are public URLs (a password only gates the rendered page, not the fact a URL exists).
  • Anonymous publishing is disabled by design; a valid key is required.
  • Native MCP clients can instead add the server as a tool — see the repo's clients/ guides. This skill uses plain HTTP so it works even where MCP isn't wired.

相关文章

更多
使用 PicGo 搭建基于 GitHub 的稳定免费图床

针对公共图床失效导致 Markdown 文章图片丢失的问题,推荐使用 PicGo 工具配合 GitHub 公有仓库搭建个人图床。通过创建公有仓库、生成具有 repo 权限的 Token,并在 PicGo 中完成仓库与分支配置,即可实现稳定可靠的图片上传与管理。

2026.07.28 921
markdownify-mcp SSRF漏洞影响版本与修复指南

mcp-markdownify-server 1.2.0 以下版本存在服务端请求伪造(SSRF)风险,涉及 webpage-to-markdown、youtube-to-markdown、bing-search-to-markdown 和 git-repo-to-markdown 四个工具。该漏洞源于 URL 和仓库地址校验逻辑缺陷,攻击者可通过提示注入诱导服务访问内部资源或云元数据端点。CVSS 评分分别为 4.0 版本的 8.3 分和 3.1 版本的 7.4 分。建议立即将运行实例升级至 1.2.0 或更高版本以启用完整的 DNS 解析检查、重定向拦截及 SSH 简写拒绝机制。

2026.11.08 880
Typora 编辑器介绍与 v1.0.4 破解激活指南

Typora 是一款基于 GFM 标准的强大 Markdown 编辑器,以实时预览和无干扰界面著称。本文介绍了其核心功能如文件树管理和多格式导出,并详细记录了针对 Typora v1.0.4 版本的破解流程。通过安装 Python 和 Node.js 依赖,利用 typoraCracker 工具解包 app.asar 文件,替换 License.js 权限文件并重新打包,最终通过 keygen.js 生成有效序列号以解决激活弹窗问题。

2025.02.04 865
Typora 1.4.8 安装与破解激活指南

本文介绍 Typora 1.4.8 版本的安装及激活方法。该软件支持 macOS、Windows 及 Linux 系统,具备实时预览、多主题及数学公式等功能。由于百度网盘链接易被封禁,目前需通过微信公众号“Java技术迷”回复关键字“230223”获取破解补丁。安装时需将 winmm.dll 文件复制至软件目录以完成激活。

2025.04.24 826
PHP实现Markdown文章上传到七牛图床的实例内容

在使用 Markdown 编写文章后,手动上传图片管理不便。本文介绍使用 PHP 配合七牛云 SDK,通过正则匹配提取图片并批量上传至图床,最后替换本地路径以实现文章同步发布。

2026.08.01 815
2026年Typora破解与激活教程

本文介绍 Typora 在 2026 年的两种主要破解方式。第一种推荐适用于 Typora 1.3.8 版本,通过替换 winmm.dll 补丁实现永久激活;第二种适用于 1.2.4 版本,需修改 app.asar 文件并输入固定序列号。教程包含详细步骤、版本下载链接及注意事项,旨在帮助用户以非商用目的体验该 Markdown 编辑器。

2026.06.13 797
Skill 文件
  • SKILL.md
    • Publish to dochost
    • One-time setup
    • How to publish
      • Reading the result
    • publish arguments
    • List previously published pages
    • Errors the user should hear about
    • Notes
  • 项目或源文件

相关 Skill

更多
MD to Mobile Image MD to Mobile Image 将 Markdown 文件转换为高对比度、适配移动端的 PNG 图片,专为 Telegram 和社交媒体分享优化。
marktodocx-skill marktodocx-skill 使用 marktodocx Node 运行时将 Markdown 转换为 DOCX,适用于用户明确要求转换 Markdown 内容或文件。
Slidev Assist Slidev Assist 接收主题或原始材料(研究报告、数据、文案、PPTX等),AI解析生成Markdown,调用Slidev输出可演示的HTML幻灯片
Karpathy Wiki Karpathy Wiki 构建、维护、查询并审查持久化的 Markdown 知识库 wiki,置于原始资料和最终答案之间,适用于个人或团队管理。
zt-web-fetcher zt-web-fetcher 当需要获取网页内容时使用(搜索结果页面、博客文章、文档等)。使用 URL 转 Markdown 服务将网页转换为可读文本。 触发场景:用户说"帮我查一下"、"看看这个链接"、"获取 xx 的信息"等需要上网抓信息的情况。