CT

caphefalumi/typst-web-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

1 stars 0 forks Качество 84 Тренд 22MIT

typst-web-mcp connects AI coding and writing agents directly to collaborative cloud projects. Instead of relying on brittle browser DOM scraping, it implements the native typst.app client protocol:

Обзор

typst-web-mcp connects AI coding and writing agents directly to collaborative cloud projects. Instead of relying on brittle browser DOM scraping, it implements the native typst.app client protocol: - Decodes and mutates multiplayer Y.Doc (doc.getText("text")) state vectors so surgical edits preserve collaborator cursors and version history. - Encodes and decodes lib0 variable-length binary frames (Subscribe, TextUpdate, Pong, Refresh, Presence, Cursor, Leave) with REST /v1/files/:projectId/:fileId/yjs persistence. - Full project CRUD, file tree inspection, rename/move, delete, and binary figure/asset uploads (PNG, JPG, SVG, PDF, fonts). - Authenticates via GET /v1/to-signin + POST /v1/auth/signin (__Http-typst-session), with persistent session caching and automatic cookie/Playwright fallback on challenge.

README

Показан фрагмент оригинального README. Открыть оригинал.


Installation

Add typst-mcp to your MCP client configuration (.pi/agent/mcp-adapter.json, claude_desktop_config.json, or .cursor/mcp.json).

Prerequisites

  • Node.js >= 18
  • Typst CLI (optional: typst on PATH for local CLI compilation speed; if not installed, typst_get_diagnostics automatically uses Typst Web cloud compiler diagnostics)

Option 1: Normal (Standard)

Runs the published typst-mcp package (npx -y typst-mcp):

{
  "mcpServers": {
    "typst-mcp": {
      "command": "npx",
      "args": ["-y", "typst-mcp"],
      "env": {
        "TYPST_EMAIL": "[email protected]",
        "TYPST_PASSWORD": "your-password"
      }
    }
  }
}

Option 2: Always Latest

Bypasses local npx cache to automatically pull and run the newest release on launch (npx -y typst-mcp@latest):

{
  "mcpServers": {
    "typst-mcp": {
      "command": "npx",
      "args": ["-y", "typst-mcp@latest"],
      "env": {
        "TYPST_EMAIL": "[email protected]",
        "TYPST_PASSWORD": "your-password"
      }
    }
  }
}

Overview

typst-web-mcp connects AI coding and writing agents directly to collaborative typst.app cloud projects. Instead of relying on brittle browser DOM scraping, it implements the native typst.app client protocol:

  • Native Yjs CRDT Text Sync: Decodes and mutates multiplayer Y.Doc (doc.getText("text")) state vectors so surgical edits preserve collaborator cursors and version history.
  • Binary /editing/v3 WebSocket Wire Protocol: Encodes and decodes lib0 variable-length binary frames (Subscribe, TextUpdate, Pong, Refresh, Presence, Cursor, Leave) with REST /v1/files/:projectId/:fileId/yjs persistence.
  • GraphQL & REST Project Management: Full project CRUD, file tree inspection, rename/move, delete, and binary figure/asset uploads (PNG, JPG, SVG, PDF, fonts).
  • Direct Authentication + Fallback: Authenticates via GET /v1/to-signin + POST /v1/auth/signin (__Http-typst-session), with persistent session caching and automatic cookie/Playwright fallback on challenge.
Открыть полный README на GitHub

Установка

npx -y typst-mcp
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "typst-mcp": { "command": "npx", "args": ["-y", "typst-mcp"], "env": { "TYPST_EMAIL": "[email protected]", "TYPST_PASSWORD": "your-password" } } } }