Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Tsumu

БесплатноНе проверен

Connect AI assistants to Tsumu to create and edit websites via MCP.

GitHubEmbed

Описание

Connect AI assistants to Tsumu to create and edit websites via MCP.

README

Tsumu

Tsumu MCP

A standalone remote Model Context Protocol (MCP) server for Tsumu. The Tsumu editor runs independently: no account, local server, or MCP packages are required to edit browser-stored sites.

Architecture

  • Public MCP URL: https://mcp.tsumu.ebii.net/mcp (after deployment and custom-domain setup)
  • Runtime: Cloudflare Workers, Durable Objects for browser sessions and one-time pairing, Workers KV for OAuth tokens and grants.
  • Transport: Streamable HTTP with OAuth 2.1 authorization-code / PKCE.
  • Data: The MCP server does not persist or mirror paired-site documents. It relays live edits to the paired Tsumu tab. Separately, an explicitly staged new SiteDoc can be held in an expiring, single-use Durable Object until the user opens its import URL and the editor confirms saving it.
  • Permission: Each AI grant contains only explicitly approved sites; each site is read-only or read/edit. No publishing or asset deletion.

Connect

A bilingual (Japanese/English) step-by-step guide is served at https://mcp.tsumu.ebii.net/. It follows an explicitly selected language, then the saved choice, then the browser language.

Use the remote MCP endpoint https://mcp.tsumu.ebii.net/mcp with an AI client that supports authenticated Streamable HTTP.

Create a new site without pairing an existing site

  1. Add the remote MCP endpoint in your AI client and begin OAuth authorization.
  2. Choose Allow new-site creation only on the consent page. No Tsumu account, connection code or open editor tab is required.
  3. Let the AI client obtain the SiteDoc authoring reference with get_site_doc_spec and stage a complete editable SiteDoc using stage_site_doc.
  4. Open the returned private importUrl in Tsumu to import the draft as a separate site. This does not publish it or give the AI client access to edit the imported site.

A staged draft expires after one hour and is deleted after the editor confirms that the new site has been saved. Treat the complete URL as a bearer secret and do not share it.

Read or edit an existing site

  1. In the AI app, start OAuth for the MCP endpoint.
  2. For the official editor, select up to 12 sites using the checkboxes on the MCP authorization page. Only non-secret site names and IDs are shared from Tsumu. The list scrolls independently and disappears when there are no available sites. Confirm each selected site from the authorization page; browsers require a user gesture to open each editor tab.
  3. For a self-hosted editor, open AIと接続(MCP), issue a code and enter it under the collapsed Enter a connection code section (below Allow new-site creation only).
  4. Keep the editor tab open to edit. Connection permissions survive a browser restart for up to seven days of inactivity; active one-hour sessions renew automatically. Revoke permission from the editor when finished.

The tools list_sites and select_site switch only between explicitly approved sites. If a selected editor is offline, the AI client receives a URL and an instruction to ask the user to open that site in their authorized browser before trying again. request_site_access provides a separate one-time approval link for adding another site. A new site is not automatically granted. Do not share connection codes or approval links.

AI client setup and plugin distribution

The homepage at https://mcp.tsumu.ebii.net/ serves the standalone connection guide from src/landing-html.js. Its HTML, CSS and client-side language switcher come from the supplied connection guide; screenshots and icons are bundled under public/landing/assets/. The only HTML changes are deployment asset paths and the retained Privacy Policy footer link. Use ?lang=ja or ?lang=en to select a language; otherwise the guide checks a previously selected language and then the browser's language.

The guide documents connecting ChatGPT, Claude, Cursor, GitHub Copilot / VS Code, Claude Code, OpenAI Codex and Gemini CLI to the remote MCP endpoint https://mcp.tsumu.ebii.net/mcp. It also covers creating a new site and granting access to an existing site. OAuth and MCP endpoints are independent from the homepage.

The separate /plugins.json endpoint lists only published plugin entries with configured HTTPS URLs in src/guide-links.js. Showing setup instructions on the homepage does not imply an AI provider has approved or listed Tsumu in a curated marketplace.

Repository distributions include a Claude plugin under plugins/claude, a Cursor manifest, a Gemini CLI extension and an Antigravity manifest. See installation instructions and publishing checklist.

Skills and site drafts

This repository bundles three Agent Skills: tsumu-build-site, tsumu-edit-site, and tsumu-best-practices. Claude Code and Cursor plugin installations can use the skills/ directory directly. The MCP endpoint also publishes the same skills via the official io.modelcontextprotocol/skills extension: skills/list, skills/get, and verified skill:// resources. Ordinary MCP tools are available independently of the Skills Extension.

Skills are bundled for Cloudflare Workers by npm run generate:skills; CI checks that the generated bundle matches the source. Edit skills/*/SKILL.md and its text files under skills/*/references/; src/generated-skills.js is generated. All reference documents are available through resources/read.

stage_site_doc accepts a complete SiteDoc with schemaVersion: 1, up to 12 MiB. Include assets as embedded dataUrl values within that limit; separate ZIP assets are unsupported. The returned importUrl carries its bearer secret in the URL fragment. Tsumu validates and saves the draft as a new site, then acknowledges consumption so the relay can delete it. Failed imports can be retried after the five-minute claim lease; unconsumed drafts expire after one hour. The editor's NEXT_PUBLIC_TSUMU_MCP_URL must point to the same relay.

Deploy

Requires Node.js 24+, a Cloudflare account, a KV namespace and permission to configure the subdomain.

npm ci
npx wrangler kv namespace create OAUTH_KV

Set the OAUTH_KV namespace ID in wrangler.jsonc to a namespace in your Cloudflare account. The checked-in ID belongs to the public deployment. Declare Durable Object classes in exports with SQLite storage, and reference those classes in durable_objects.bindings.

The browser bridge accepts canonical HTTPS origins, including self-hosted Tsumu instances, and HTTP loopback origins (localhost, 127.0.0.1, [::1]) for local development. Other HTTP, opaque, or missing origins are rejected. Sessions require a one-time pairing code, a separate WebSocket secret, and OAuth authorization.

npm run check
npm test
npm run smoke
npm audit --include=dev --audit-level=high
npm run build
npm run deploy

Configure the Worker's HTTPS domain in Cloudflare. The OAuth RESOURCE in src/mcp-metadata.js must match that domain; ISSUER is derived from its origin. This repository configures mcp.tsumu.ebii.net. Set the resource URL for your deployment before distributing its endpoint. Keep client manifests, guide URLs and distribution checks consistent with that endpoint.

To connect a self-hosted Tsumu instance to the public MCP server, build the editor with NEXT_PUBLIC_TSUMU_MCP_URL=https://mcp.tsumu.ebii.net (or point it to your own MCP deployment). You do not need to register your editor's hostname with the MCP server. Use HTTPS for remotely hosted editors; HTTP is accepted only on the loopback hosts listed above.

MCP tools

Tool Permission Action
list_sites Read List active, explicitly authorized sites and their unique siteRef values
select_site Read Select an authorized site by siteId or unique siteRef
request_site_access User approval Issue a short-lived link for explicitly adding another official site
list_pages Read Return page IDs and slugs of the selected site
get_page Read Return a page's edit context and SHA-256 revision
get_element Read Read a node's text, styles and children
create_site Edit Create a browser-stored site; explicit approval is required before editing it via MCP
create_page Edit Create a named page in the selected site
apply_operations Edit Apply up to 100 strictly typed Tsumu AiOp operations atomically
set_text Edit Edit an existing element's text
set_style Edit Update an element's CSS properties
insert_element Edit Insert an element and optionally nested children
get_site_doc_spec OAuth Read the SiteDoc authoring guide and editable example
stage_site_doc OAuth Temporarily stage a complete new editable site and return a one-time import URL

Editing safely

  • For element edits, call get_page first, then pass its revision as expectedRevision.
  • Every paired-site mutation requires a unique requestId (8–80 letters, digits, hyphens or underscores). Repeating the same request with the same ID returns its cached result when available; changing its action or arguments with the same ID is rejected. Results are retained for ten minutes within an authorized session.
  • apply_operations uses a discriminated operation schema. Each entry specifies op and its required fields. Unsupported operations and invalid types are rejected before reaching the browser. The set_text, set_style and insert_element tools cover common changes.
  • A newly created site is never automatically added to an OAuth grant. Approve it explicitly using request_site_access; create_site is unavailable for server-backed Tsumu storage.
  • A new page belongs to the selected site, receives an automatically unique URL slug, and can be edited by calling get_page using the returned page ID.
  • Never blindly retry a timed-out write. Read the page or check the Tsumu browser first to establish whether the write succeeded.

Security model and limitations

  • A signed-in Tsumu account is not required: the live browser authorizes access to the particular site.
  • The remote MCP OAuth server issues scoped access tokens using the official Cloudflare OAuth Provider. A separate random WebSocket token authenticates the browser; it is transmitted via the WebSocket subprotocol, not a URL parameter.
  • Bridge HTTP requests and WebSockets require a valid HTTPS browser Origin (or HTTP loopback for development). The server checks site/session authorization for every operation and denies edits on read-only sessions.
  • One-time codes expire in ten minutes and are consumed atomically; failed pairing attempts are rate limited. The reconnect cookie is host-only, HttpOnly and rotated for up to seven days of idle time. Short-lived WebSocket sessions renew while the editor is open.
  • When the browser is closed or disconnected, editing is unavailable until the editor reopens and restores an unexpired grant. Revoked or expired sessions cannot be used with an OAuth token. The OAuth site's authorization lifetime is renewed only by authenticated use, and browser grants are checked before listing or selecting a site.
  • Browser saves are confirmed before an edit is reported as successful. If a site is also synced to Tsumu's server, that existing sync remains asynchronous; MCP does not claim that publication or cloud sync has completed.
  • In production, configure Cloudflare WAF/rate limits for public pairing endpoints, monitor error rates, verify custom-domain OAuth redirects and exercise end-to-end tests with the targeted MCP clients.

This repository does not copy the Tsumu editor's AI-operation engine, document model, or persistence code. MIT licensed.

from github.com/abshrimp/tsumu-mcp

Установка Tsumu

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/abshrimp/tsumu-mcp

FAQ

Tsumu MCP бесплатный?

Да, Tsumu MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Tsumu?

Нет, Tsumu работает без API-ключей и переменных окружения.

Tsumu — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Tsumu в Claude Desktop, Claude Code или Cursor?

Открой Tsumu на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare Tsumu with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории development