Typst

Data and AIDeveloper tools

Typst MCP Server is an MCP (Model Context Protocol) implementation that helps AI models interact with Typst, a markup-based typesetting system. The server provides tools for converting between LaTeX and Typst, validating Typst syntax, and generating images from Typst code.

Your AI app calls the Typst MCP server, which does the data and AI and developer tools work and sends the result back to the chat.

About Typst

Typst is a community MCP server from johannesbrandenburger, filed in our directory under data and ai and developer tools. Typst MCP Server is an MCP (Model Context Protocol) implementation that helps AI models interact with Typst, a markup-based typesetting system. The server provides tools for converting between LaTeX and Typst, validating Typst syntax, and generating images from Typst code.

At a glance

Publisher
johannesbrandenburger (community)
Runs
See the README for setup
Written in
Python
License
MIT
GitHub stars
188

How to set up Typst

  1. Follow the install steps in the Typst README; it is written in Python, so have that toolchain ready.
  2. Check the Typst README for keys or settings; the registry lists none that Typst requires.
  3. Add Typst to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Typst tools to confirm the connection.
  5. Run one read-only task with Typst first, and keep your app asking before each tool call until the results look right.

Typst compared with similar servers

  • Rubber Duck by nesquikm has fewer GitHub stars than Typst (184 against 188); both are community servers, and both run locally.
  • FirstData by MLT-OSS has fewer GitHub stars than Typst (188 against 188); both are community servers, and FirstData runs as a remote server and Typst runs on your own machine.
  • Reshapr by reshaprio has fewer GitHub stars than Typst (182 against 188); both are community servers, and both run locally.

Before you connect Typst

  • Give Typst its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Typst tool call until you trust what it does with them.
  • Treat text that Typst fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Typst on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Typst

How marketing and sales teams put Typst to work, by company size. Pick the size closest to yours and start Typst on one use case.

Small business

  • A small team can use Typst to clean and enrich a lead list or a spreadsheet in one pass, instead of hours of copy and paste.
  • Owners can ask Typst to sort feedback, reviews or survey answers into themes and see what customers mention most.
  • A small business with a developer can use Typst to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Typst runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing ops can connect Typst to enrich and score inbound leads, so sales sees fit and intent before the first call.
  • Content and research teams can use Typst to analyze transcripts and surveys at scale and pull the quotes worth using.
  • Growth engineers can use Typst to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Start Typst on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can run Typst inside their own cloud and data boundary, so models and data stay where governance requires.
  • Large teams can use Typst in batch pipelines with evaluation and logging, so AI output is measured before it reaches customers.
  • Enterprise engineering teams can roll out Typst with repo scopes and audit logs, so agents work only where they are allowed.
  • Typst is a community server, so have security review the code and pin a version before Typst touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Typst README

From johannesbrandenburger/typst-mcp on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

Typst MCP Server

Typst MCP Server is an MCP (Model Context Protocol) implementation that helps AI models interact with Typst, a markup-based typesetting system. The server provides tools for converting between LaTeX and Typst, validating Typst syntax, and generating images from Typst code.

Available Tools

⚠️ Currently all the functionality is implemented as tools, because Cursor and VS Code are not able to handle the other primitives yet.

The server provides the following tools:

  1. list_docs_chapters(): Lists all chapters in the Typst documentation.

    • Lets the LLM get an overview of the documentation and select a chapter to read.
    • The LLM should select the relevant chapter to read based on the task at hand.
  2. get_docs_chapter(route): Retrieves a specific chapter from the Typst documentation.

    • Based on the chapter selected by the LLM, this tool retrieves the content of the chapter.
    • Also available as get_docs_chapters(routes: list) for retrieving multiple chapters at once.
  3. latex_snippet_to_typst(latex_snippet): Converts LaTeX code to Typst using Pandoc.

    • LLMs are better at writing LaTeX than Typst, so this tool helps convert LaTeX code to Typst.
    • Also available as latex_snippets_to_typst(latex_snippets: list) for converting multiple LaTeX snippets at once.
  4. check_if_snippet_is_valid_typst_syntax(typst_snippet): Validates Typst code.

    • Before sending Typst code to the user, the LLM should check if the code is valid.
    • Also available as check_if_snippets_are_valid_typst_syntax(typst_snippets: list) for validating multiple Typst snippets at once.
  5. typst_to_image(typst_snippet): Renders Typst code to a PNG image.

    • Before sending complex Typst illustrations to the user, the LLM should render the code to an image and check if it looks correct.
    • Only relevant for multi modal models.

Getting Started

  • Clone this repository

    • git clone https://github.com/johannesbrandenburger/typst-mcp.git
  • Clone the typst repository

    • git clone https://github.com/typst/typst.git
  • Run the docs generation in the typst repository

    • cargo run --package typst-docs -- --assets-dir ../typst-mcp/typst-docs --out-file ../typst-mcp/typst-docs/main.json
      • Make sure to adjust the path to your local clone of the typst-mcp repository
      • This will generate the main.json and the assets in the typst-docs folder
  • Install required dependencies: uv sync (install uv if not already installed)

  • Install Typst

Running the Server

Local Installation

Execute the server script:

python server.py

Or install it in Claude Desktop with MCP:

mcp install server.py

Or use the new agent mode in VS Code:

Agent mode: available to all users and supports MCP

Docker

For Docker installation and usage, see DOCKER.md for detailed build information and instructions.

Platform Configuration

This MCP server can be integrated with various AI coding platforms. Below are configuration instructions for popular platforms:

Claude Desktop

Add the following to your Claude Desktop configuration file (claude_desktop_config.json):

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "typst": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "ghcr.io/johannesbrandenburger/typst-mcp:latest"
      ]
    }
  }
}

Or for local installation:

{
  "mcpServers": {
    "typst": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "ghcr.io/johannesbrandenburger/typst-mcp:latest"
      ]
    }
  }
}
Cursor

Create .cursor/mcp.json in your project root for project-specific configuration:

{
  "mcpServers": {
    "typst": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "ghcr.io/johannesbrandenburger/typst-mcp:latest"
      ]
    }
  }
}

Or create ~/.cursor/mcp.json for global configuration. For local installation:

{
  "mcpServers": {
    "typst": {
      "command": "python",
      "args": ["/path/to/typst-mcp/server.py"]
    }
  }
}
Roo Code

Create .roo/mcp.json in your project root for project-specific configuration:

{
  "mcpServers": {
    "typst": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "ghcr.io/johannesbrandenburger/typst-mcp:latest"
      ]
    }
  }
}

Or edit global settings via Roo Code MCP settings view. For local installation:

{
  "mcpServers": {
    "typst": {
      "command": "python",
      "args": ["/path/to/typst-mcp/server.py"]
    }
  }
}
OpenCode

Create or edit the opencode.json file in your project root:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "typst": {
      "type": "local",
      "command": ["docker", "run", "--rm", "-i", 
        "ghcr.io/johannesbrandenburger/typst-mcp:latest"
      ],
      "enabled": true
    }
  }
}

For local installation:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "typst": {
      "type": "local",
      "command": ["python", "/path/to/typst-mcp/server.py"],
      "enabled": true
    }
  }
}
Claude Code

Configure MCP servers in your Claude Code settings file (~/.claude/settings.json):

{
  "mcpServers": {
    "typst": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "ghcr.io/johannesbrandenburger/typst-mcp:latest"
      ]
    }
  }
}

Or for local installation:

{
  "mcpServers": {
    "typst": {
      "command": "python",
      "args": ["/path/to/typst-mcp/server.py"]
    }
  }
}
VS Code with Agent Mode

VS Code's Agent Mode has native MCP support (no extension required):

  1. Enable Agent Mode in VS Code settings (chat.agent.enabled)
  2. Create .vscode/mcp.json in your workspace:
{
  "servers": {
    "typst": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "ghcr.io/johannesbrandenburger/typst-mcp:latest"
      ]
    }
  }
}

For global configuration, add to your user profile via MCP: Open User Configuration command.

JSON Schema of the Typst Documentation

⚠️ The schema of the typst documentation is not stable and may change at any time. The schema is generated from the typst source code and is not guaranteed to be complete or correct. If the schema changes, this repository will need to be updated accordingly, so that the docs functionality works again.

Questions about Typst

What is the Typst MCP server?

Typst MCP Server is an MCP (Model Context Protocol) implementation that helps AI models interact with Typst, a markup-based typesetting system. The server provides tools for converting between LaTeX and Typst, validating Typst syntax, and generating images from Typst code. Typst is maintained by johannesbrandenburger on GitHub at johannesbrandenburger/typst-mcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Typst MCP server?

Typst doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (johannesbrandenburger/typst-mcp). Like most servers, Typst ends with a command or URL you paste into your AI app's MCP config.

Does Typst need an API key?

The registry lists no required keys for Typst. Check the Typst README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Typst an official MCP server?

No. Typst is a community server maintained by johannesbrandenburger. Community servers can be excellent; read the code and the open issues before you give Typst access to company data.

What license is Typst under?

Typst is released under the MIT license, according to its GitHub repository. The license covers the code of Typst; the service it connects to has its own terms.