Skip to main content
Glama

typst-app-mcp

MCP server for the typst.app web editor. Lets an AI assistant read and edit your online Typst projects, manage files, comments and sharing, and compile them locally.

typst.app has no public API. This server speaks the same internal API as the web editor (GraphQL + REST + Yjs). It can break whenever typst.app changes, and using it is at your own risk under typst.app's terms.

Tools

Area

Tools

Account

typst_whoami, typst_list_projects, typst_get_project, typst_search_templates

Files

typst_read_file, typst_write_file, typst_edit_file, typst_upload_file, typst_rename_file, typst_delete_files, typst_download_project

Projects

typst_create_project (empty or from a Universe template), typst_duplicate_project, typst_update_project, typst_delete_project

Sharing

typst_set_share_links, typst_invite_member, typst_update_member, typst_remove_member, typst_revoke_invitation

Comments

typst_list_comments, typst_add_comment, typst_reply_comment, typst_resolve_comment, typst_delete_comment

Build

typst_compile (PDF/PNG/SVG via the local typst CLI, diagnostics with file:line, inline page previews)

Text edits are sent as minimal Yjs updates, so people editing the same file in the browser keep their changes and cursors.

Related MCP server: Typleaf MCP Server

Setup

Needs Node ≥ 20.3 and, for typst_compile, the typst CLI.

npm ci && npm run build

Configuration (environment):

Variable

TYPST_EMAIL, TYPST_PASSWORD

Password login; the session is cached in ~/.cache/typst-app-mcp/session (0600) and renewed automatically

TYPST_SESSION

Alternative: value of the __Http-typst-session cookie from a signed-in browser. Required for accounts with 2FA

TYPST_BIN

typst CLI path (default typst)

TYPST_OUTPUT_DIR

Where compile output goes (default ~/.cache/typst-app-mcp/output)

Claude Code, with credentials injected from a vault via vault-mcp's launcher:

claude mcp add typst-app -s user -- node /path/to/vault-mcp/dist/launch.js \
  --env TYPST_EMAIL=typst.app:username --env TYPST_PASSWORD=typst.app \
  -- node /path/to/typst-app-mcp/dist/index.js

Limits

  • Free typst.app accounts cannot create comments (COMMENT_LIMIT_REACHED); reading them works.

  • typst_compile uses your local compiler version, which can differ from the version pinned in the web app.

Development

npm test            # unit + MCP protocol tests (offline)
npm run smoke       # start-up test of the built server
TYPST_E2E=1 TYPST_EMAIL=… TYPST_PASSWORD=… npm run test:e2e   # live test, creates and deletes "mcp-e2e-*" projects

Releases: git tag X.Y.Z && git push origin X.Y.Z (must match package.json); CI builds and attaches the package to a GitHub release.

Available Tools

26 tools
typst_add_commentAdd commentA

Add a review comment to a text file, anchored either on exact text (anchor_text, plus occurrence if it is not unique) or on a line range. The comment stays attached to that text even when the file changes.

Inputs: path (required), content (required), project_id (required), end_line, +3 more.

typst_compileCompile projectA
Idempotent

Compile a project with the local typst CLI and return errors/warnings with file and line, plus the output path. Use it after edits to check the document builds. format 'png' with preview_pages>0 returns page images inline so you can look at the layout. Packages (@preview/...) are downloaded automatically.

Inputs: project_id (required), ppi, format, main_file, +2 more.

typst_create_projectCreate projectA

Create a new project, empty or from a Typst Universe template (find one with typst_search_templates). Put it into a team with team_id from typst_whoami. Returns the new project ID.

Inputs: name (required), team_id, template, template_version.

typst_delete_commentDelete commentA
Destructive

Permanently delete a comment thread. Prefer typst_resolve_comment unless the user asks to delete.

Inputs: comment_id (required), project_id (required).

typst_delete_filesDelete filesA
Destructive

Permanently delete files from a project. Confirm with the user before deleting anything they did not explicitly ask to remove.

Inputs: paths (required), project_id (required).

typst_delete_projectDelete projectA
Destructive

Permanently delete a whole project. Only on explicit user request. confirm_name must equal the project's exact name as a safety check.

Inputs: project_id (required), confirm_name (required).

typst_download_projectDownload projectA
DestructiveIdempotent

Download all files of a project into a local directory (created if missing; existing files with the same paths are overwritten). Useful for backups, git or local editing.

Inputs: directory (required), project_id (required).

typst_duplicate_projectDuplicate projectB

Copy a project (all files) into a new project, optionally into a team.

Inputs: project_id (required), name, team_id.

typst_edit_fileEdit fileA

Replace exact text in a text file, like a find-and-replace that must match precisely (whitespace included). Each old_string must occur exactly once unless replace_all=true. Edits apply in order; if one fails, nothing is saved. Only the changed span is sent, so concurrent edits by collaborators are preserved.

Inputs: path (required), edits (required), project_id (required).

typst_get_projectGet projectA
Read-onlyIdempotent

Show one project: all files (paths, text/binary, IDs), main file, compiler pin, comment counts, share links, members and invitations.

Inputs: project_id (required), response_format.

typst_invite_memberInvite memberA

Invite someone to a project by email. typst.app sends them an invitation. Ask the user before inviting anyone.

Inputs: email (required), access (required), project_id (required).

typst_list_commentsList commentsA
Read-onlyIdempotent

List review comments of a project with file, line, the commented text and replies. Resolved comments only with include_resolved=true.

Inputs: project_id (required), response_format, include_resolved.

typst_list_projectsList projectsA
Read-onlyIdempotent

List typst.app projects: personal, team and shared-with-me, newest first.

Filter with query (case-insensitive substring of the project name). Returns IDs needed by every other tool. Example: "Find my thesis project" -> query="thesis".

Inputs: limit, query, offset, response_format.

typst_read_fileRead fileA
Read-onlyIdempotent

Read a file from a project. Text files (.typ, .bib, ...) return their content; images are returned inline; other binaries need save_to. Use start_line/end_line for long files. Use line_numbers=true when you plan comments on line ranges.

Inputs: path (required), project_id (required), save_to, end_line, +2 more.

typst_remove_memberRemove memberB
Destructive

Remove a member from a project. user_id comes from typst_get_project.

Inputs: user_id (required), project_id (required).

typst_rename_fileRename / move filesA
Idempotent

Rename or move files inside a project. Moving to a new folder is just a new path. Remember to update #include/#import paths that point to them.

Inputs: renames (required), project_id (required).

typst_reply_commentReply to commentB

Reply to a comment thread. comment_id comes from typst_list_comments.

Inputs: content (required), comment_id (required), project_id (required).

typst_resolve_commentResolve commentA
Idempotent

Mark a comment thread as resolved, or reopen it with resolved=false.

Inputs: comment_id (required), project_id (required), resolved.

typst_revoke_invitationRevoke invitationB
DestructiveIdempotent

Withdraw a pending invitation by email.

Inputs: email (required), project_id (required).

typst_search_templatesSearch templatesA
Read-onlyIdempotent

Search Typst Universe templates (latest versions) to start a project from. Pass the chosen name to typst_create_project. Examples: "IEEE paper" -> query="ieee"; "German thesis" -> query="thesis".

Inputs: limit, query.

typst_update_memberChange member accessA
Idempotent

Change an existing member's access. user_id comes from typst_get_project.

Inputs: access (required), user_id (required), project_id (required).

typst_update_projectUpdate project settingsA
Idempotent

Rename a project, set its main (previewed/compiled) file, or pin the compiler version used by the web app.

Inputs: project_id (required), name, main_file, pinned_version.

typst_upload_fileUpload local file or folderA
DestructiveIdempotent

Upload a local file (image, font, .bib, data, ...) or a whole folder into a project. Existing files with the same path are replaced. Hidden files and folders are skipped. Example: local_path="/home/me/figures", remote_path="figures".

Inputs: local_path (required), project_id (required), remote_path.

typst_whoamiWho am IA
Read-onlyIdempotent

Show the signed-in typst.app account and its workspaces (personal + teams with their IDs). Use the team IDs for typst_create_project.

Inputs: no named parameters.

typst_write_fileWrite fileA
DestructiveIdempotent

Create a text file or replace its entire content. Collaborators in the web editor see the change live. Prefer typst_edit_file for changes to part of an existing file. Folders are created implicitly by the path.

Inputs: path (required), content (required), project_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 26 tools

    Disambiguation4/5

    Tools are organized around clearly distinct resources (projects, files, comments, members, sharing, compile), and descriptions actively steer between near-neighbors like typst_write_file vs typst_edit_file vs typst_upload_file and typst_delete_comment vs typst_resolve_comment. The only residual overlap is among the file-mutation trio, which is handled explicitly rather than left ambiguous.

    Naming Consistency5/5

    Every tool follows the same typst_<verb>_<noun> snake_case pattern with a uniform prefix, covering create/get/list/update/delete/duplicate for projects and read/write/edit/upload/rename/delete/download for files. Pluralization (typst_delete_files) mirrors the fact that the operation takes multiple paths, so it is purposeful rather than inconsistent.

    Tool Count3/5

    At 26 tools this sits just past the comfortable range, and the surface splits into six sub-domains (projects, files, comments, members, sharing, compile). Nearly every tool earns its place, but a few low-frequency ones (typst_revoke_invitation, typst_duplicate_project, typst_whoami) inflate the count.

    Completeness4/5

    Full lifecycle coverage exists across projects (create/list/get/update/delete/duplicate), files (read/write/edit/upload/rename/delete/download) and comments (list/add/reply/resolve/delete), plus membership and share links. Minor gaps remain: no cross-file content search, no comment editing, and no way to list members/invitations outside typst_get_project.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers