Canvasbin

io.github.stewartmckee由 GitHub 账号 stewartmckee 发布v1.0.0更新于 Nov 3, 2026

通过可分享的链接发布 HTML 和 Markdown 页面。

AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。

原文描述

Publish HTML and Markdown pages at shareable links.

已验证Streamable HTTP可网页运行

概览

Canvasbin 的托管 MCP 服务(canvasbin.dev);需要 OAuth 登录;Streamable HTTP。

暂无 AI 概览:以下信息来自注册中心条目和服务本身。

端点
canvasbin.dev
最近检查

安装

在 SourceWeft 中

  1. 打开 控制台中的 Canvasbin,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.stewartmckee%2Fcanvasbin/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "canvasbin": {
      "type": "http",
      "url": "https://canvasbin.dev/mcp"
    }
  }
}

README

Canvasbin

Pastebin for the agentic age.

Canvasbin was built for sharing what agents produce. An agent can design a page in HTML — a chart, a dashboard, a report, or an entire Vue application — and Canvasbin publishes it. HTML or Markdown in, a link out. No deploy, no CMS. Agents publish; humans share.

Use the hosted service at canvasbin.dev, where you sign in once and your pages live in a library you can share, or run your own copy with accounts off and no sign-in at all.

The link is the permission. Share the read link. Keep the write link. Anyone with the write link can edit or delete the page, including the agent that created it. Ask again and the same URL updates in place.

create_page returns the write key to the agent, so that key is in the chat history. Share html_url from the transcript. The write key stays there so the agent can edit the page later; treat the transcript like the editor.

What you get

LinkWhat a person sees
html_urlThe rendered page. This is the one to send.
pdf_urlThe same page as a PDF.
read_urlThe app, view-only: preview and source.
write_urlThe editor. Returned to the agent, so it is stored in the chat history.

The address itself picks the view:

URLWhat it is
/{key}The app. A write key opens the editor. A read key is view-only.
/{key}.htmlThe rendered page. HTML scripts run in a sandbox.
/{key}.pdfA PDF download.
/{key}.mdMarkdown source, for Markdown pages.
/raw/{key}The stored source.

Pages can be a fragment or a full HTML document. Markdown is rendered for you. Updates are live on the same URLs, so an agent can revise a page without minting a new link.

Agent scratchpads (agentic_only)

Agents can create agentic-only pages: external scratchpads for context shared across MCP clients or backups of what matters from a chat. Set agentic_only: true on create_page or update_page. They stay out of the web library unless the user turns on “Show agent scratchpads”; list_pages always includes them with the flag set. Passing team with agentic_only: true stores a personal page, not a team page. See Share context across platforms and Backup AI chats.

Hand it to an agent

Point Claude Code, Cursor, Codex, or any MCP client at https://{your-canvas-bin-host}/mcp. There is no API key: a self-hosted copy with accounts off needs no sign-in, and canvasbin.dev asks you to sign in once through the client. In Cursor, install the Canvasbin plugin instead. Ask for a page:

Build a dashboard of this week's numbers and publish it on Canvasbin. Give me the link.

You get html_url to forward. The agent also receives write_url and write_key, and those stay in the chat history for the next edit. Setup for each client is below.

Examples use https://{your-canvas-bin-host}. Replace that with the origin where you run Canvasbin. On your own machine that is http://localhost:8080.

Run it

Self-hosting is the default. Accounts stay off: there is no sign-in, and a page is created with its read and write links. You need Docker. Postgres stores the pages. CircleCI publishes the app image on each push to main as stewartmckee/canvasbin (linux/amd64). It includes the editor and headless Chromium for PDF export. Each build also tags 0.1.<build number>.

ACCOUNTS defaults to off. Leave it that way for a private bin.

Docker Compose

This is the sample to run. The same file is examples/compose.yaml. It is not docker-compose.yml, which is only for developing this repository.

yaml
name: canvasbin
services:  postgres:    image: postgres:16-alpine    restart: unless-stopped    environment:      POSTGRES_USER: canvasbin      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD}      POSTGRES_DB: canvasbin    volumes:      - pgdata:/var/lib/postgresql/data    healthcheck:      test: ["CMD-SHELL", "pg_isready -U canvasbin -d canvasbin"]      interval: 5s      timeout: 5s      retries: 12
  canvasbin:    image: stewartmckee/canvasbin:latest    restart: unless-stopped    ports:      - "8080:8080"    depends_on:      postgres:        condition: service_healthy    environment:      DATABASE_URL: postgres://canvasbin:${POSTGRES_PASSWORD}@postgres:5432/canvasbin?sslmode=disable      HTTP_ADDR: ":8080"      PUBLIC_BASE_URL: ${PUBLIC_BASE_URL:-http://localhost:8080}      ACCOUNTS: "off"    # Chromium's sandbox needs namespaces Docker's default seccomp profile blocks.    # Without this, PDF export fails instead of running the browser unsandboxed.    security_opt:      - seccomp:unconfined
volumes:  pgdata: {}
bash
export POSTGRES_PASSWORD='choose-a-password'docker compose -f examples/compose.yaml up -d

Open http://localhost:8080.

Docker Run

The same two containers without a compose file. restart brings the app back up if Postgres is not ready on the first start.

bash
docker network create canvasbindocker volume create canvasbin-pg
docker run -d --name canvasbin-db --network canvasbin --restart unless-stopped \  -e POSTGRES_USER=canvasbin \  -e POSTGRES_PASSWORD=choose-a-password \  -e POSTGRES_DB=canvasbin \  -v canvasbin-pg:/var/lib/postgresql/data \  postgres:16-alpine
docker run -d --name canvasbin --network canvasbin --restart unless-stopped \  -p 8080:8080 \  -e DATABASE_URL='postgres://canvasbin:choose-a-password@canvasbin-db:5432/canvasbin?sslmode=disable' \  -e HTTP_ADDR=:8080 \  -e PUBLIC_BASE_URL=http://localhost:8080 \  -e ACCOUNTS=off \  --security-opt seccomp=unconfined \  stewartmckee/canvasbin:latest

Open http://localhost:8080.

For anything other than local use, put a TLS reverse proxy in front and set PUBLIC_BASE_URL to that https origin with no trailing slash. Do not publish port 8080 on a public interface; only the proxy should reach the app. The proxy must append the caller to X-Forwarded-For. Canvasbin uses the rightmost address, and only when the TCP peer is a private or loopback address.

Pin 0.1.<build number> instead of latest when you want upgrades to be deliberate.

To build the image from this checkout instead of pulling it:

bash
docker build -t stewartmckee/canvasbin:local .

Use that name in the docker run above. docker compose up --build in the repository root is the development stack, not this sample.

Develop from source

Requirements: Go 1.27, Node.js 24, Docker.

bash
git clone https://github.com/stewartmckee/canvasbin.gitcd canvasbindocker compose up postgres

API (proxied by the Vite dev server):

bash
DATABASE_URL='postgres://canvasbin:canvasbin@localhost:5433/canvasbin?sslmode=disable' \  HTTP_ADDR=:8090 \  go run ./cmd/canvasbin

UI:

bash
cd webnpm cinpm run dev

Open http://localhost:5173. PDF export looks for Chrome or Chromium on PATH, or the binary in CHROME_BIN. The published image sets CHROME_BIN=/usr/bin/chromium-browser.

bash
go test ./...cd web && npm run build

Configuration

VariableDefaultPurpose
DATABASE_URLpostgres://canvasbin:canvasbin@localhost:5432/canvasbin?sslmode=disablePostgres connection string. The schema is applied on startup.
HTTP_ADDR:8080Listen address.
PUBLIC_BASE_URLrequest hostOrigin used in returned links.
CHROME_BINChrome/Chromium on PATHBrowser used to print PDFs.
ACCOUNTSoffLeave off for a self-hosted bin with no sign-in. on adds email signup and a library, and then requires MAILGUN_SENDING_KEY and an https PUBLIC_BASE_URL (http://localhost is allowed).
MAILGUN_SENDING_KEYemptyRequired only when ACCOUNTS=on. Mailgun EU sending API key.
MAILGUN_DOMAINcanvasbin.devMailgun sending domain. Used only when accounts are on.
MAIL_FROMCanvasbin <[email protected]>From address for verification and reset mail.
ADMIN_EMAILSemptyComma-separated emails allowed to use the admin user list. Accounts only.

Copy .env.example for a local env file. Never commit real secrets.

Page content is limited to 1 MiB. Creating pages is rate limited (60 per 10 minutes per client IP). PDF renders are limited too. Behind a proxy, append the caller to X-Forwarded-For ($proxy_add_x_forwarded_for). Canvasbin uses the rightmost address in that header, and only when the connection comes from a private or loopback address, so a client cannot choose a fresh rate-limit bucket by sending its own value. Do not publish the app port on a public interface; the proxy should be the only thing that can reach it.

Accounts (optional)

With ACCOUNTS=off (the default), Canvasbin stays authless: create a page, share the read link, keep the write link.

With ACCOUNTS=on, people can register with email and password. Mailgun sends the verification link, so MAILGUN_SENDING_KEY and PUBLIC_BASE_URL are required. Signed-in users get a library and can claim a write-key page. Creating a page then requires signing in; existing pages keep working by their read and write links without an account. The Docker samples leave accounts off.

Connect an agent

Canvasbin speaks MCP over Streamable HTTP. The write key from create_page is what lets an agent edit or delete that page later.

The endpoint is https://{your-canvas-bin-host}/mcp. On your own machine that is http://localhost:8080/mcp. With accounts off, no API key or login is required. With accounts on, every MCP request needs a signed-in account (OAuth), so clients prompt for sign-in when they connect. Page links in the browser keep working by key without signing in.

Sign in from Claude, ChatGPT or Cursor

Point the connector at https://canvasbin.dev/mcp (or your hosted origin). The first request returns HTTP 401 with a WWW-Authenticate challenge. The client opens Canvasbin’s OAuth consent screen; after you approve, it retries with a bearer token. Discovery documents live at /.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server.

Cursor plugin

This repository is also a Cursor plugin (.cursor-plugin/plugin.json). The Marketplace install always connects Cursor to https://canvasbin.dev/mcp and adds a canvasbin skill that tells the agent when to publish a page and which link to hand back. Sign-in is OAuth on that host: Cursor opens the Canvasbin consent screen the first time, and the plugin never sees the account password. To use your own host instead, configure the server by hand as shown under Other clients.

Claude Code

Add it for every project on this machine:

bash
claude mcp add --transport http canvasbin --scope user \  https://{your-canvas-bin-host}/mcp

Or only the project you are in (the default scope):

bash
claude mcp add --transport http canvasbin \  https://{your-canvas-bin-host}/mcp

Check it with claude mcp list, then /mcp inside a session. Ask Claude to publish a page. A typical request:

Create a Canvasbin page that explains this change, and give me the link to share.

create_page returns four links, plus the keys. html_url is the one to share. write_url and write_key come back to Claude and remain in the chat history, which is what lets a later turn call update_page without opening the browser.

To share the server with everyone who clones a repository, commit a .mcp.json in that repository:

json
{  "mcpServers": {    "canvasbin": {      "type": "http",      "url": "https://{your-canvas-bin-host}/mcp"    }  }}

Claude Code asks before it uses a project .mcp.json. "type": "http" is required. streamable-http is accepted as an alias. This repository commits that file at the root, pointed at https://canvasbin.dev/mcp, so cursor.directory can find the server.

Other clients

No headers are required.

Cursor. In ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

json
{  "mcpServers": {    "canvasbin": {      "url": "https://{your-canvas-bin-host}/mcp"    }  }}

Codex.

bash
codex mcp add canvasbin --url https://{your-canvas-bin-host}/mcp

That writes this into ~/.codex/config.toml:

toml
[mcp_servers.canvasbin]url = "https://{your-canvas-bin-host}/mcp"

Claude Desktop. Add a custom connector and set the URL to https://{your-canvas-bin-host}/mcp. Desktop does not take a remote URL in claude_desktop_config.json.

VS Code. In .vscode/mcp.json:

json
{  "servers": {    "canvasbin": {      "type": "http",      "url": "https://{your-canvas-bin-host}/mcp"    }  }}

Tools

  • create_page — publish HTML or Markdown. Returns html_url, pdf_url, read_url, write_url, and the keys. When publishing into a team, the agent is asked to read that team's style guide first.
  • get_page — read a page by read key, write key, or URL.
  • update_page — replace content, title, or format. Needs the write key. Omitted fields stay as they are. content replaces the whole page.
  • delete_page — delete a page. Needs the write key.
  • get_style_guide / set_style_guide — read, create, or update a team's style guide. These are registered only when accounts are on. Any member of that team can create the guide or replace it later. create_page tells the agent to call get_style_guide before writing a team page.

Tools that take a key accept the bare key or any Canvasbin URL. HTML may be a fragment or a full document. Scripts in the rendered page run in a sandbox.

Issues

Use the issue templates so reports are actionable:

  • Bug report — what you expected, what happened, how to reproduce it, and the image tag or commit.
  • Feature request — the job you are trying to do, and the behaviour you want.

Search existing issues before opening a new one. Security reports go through private advisories, not a public issue. See SECURITY.md and CONTRIBUTING.md.

License

MIT.

来源:README.md,提交 37cc879

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

1
  1. v1.0.0最新Nov 3, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分