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. The server provides the following tools: 1. listdocschapters(): Lists all chapters in the Typst documentation. - Lets the LLM
Add this skill
npx mdskills install johannesbrandenburger/typst-mcpWell-documented MCP server with useful Typst tools but complex setup dependencies
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.
⚠️ 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:
list_docs_chapters(): Lists all chapters in the Typst documentation.
get_docs_chapter(route): Retrieves a specific chapter from the Typst documentation.
get_docs_chapters(routes: list) for retrieving multiple chapters at once.latex_snippet_to_typst(latex_snippet): Converts LaTeX code to Typst using Pandoc.
latex_snippets_to_typst(latex_snippets: list) for converting multiple LaTeX snippets at once.check_if_snippet_is_valid_typst_syntax(typst_snippet): Validates Typst code.
check_if_snippets_are_valid_typst_syntax(typst_snippets: list) for validating multiple Typst snippets at once.typst_to_image(typst_snippet): Renders Typst code to a PNG image.
Clone this repository
git clone https://github.com/johannesbrandenburger/typst-mcp.gitClone the typst repository
git clone https://github.com/typst/typst.gitRun 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
main.json and the assets in the typst-docs folderInstall required dependencies: uv sync (install uv if not already installed)
Install Typst
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
For Docker installation and usage, see DOCKER.md for detailed build information and instructions.
This MCP server can be integrated with various AI coding platforms. Below are configuration instructions for popular platforms:
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"
]
}
}
}
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"]
}
}
}
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"]
}
}
}
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
}
}
}
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's Agent Mode has native MCP support (no extension required):
chat.agent.enabled).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.
⚠️ 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.
Install via CLI
npx mdskills install johannesbrandenburger/typst-mcpTypst MCP Server is a free, open-source AI agent skill. 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. The server provides the following tools: 1. listdocschapters(): Lists all chapters in the Typst documentation. - Lets the LLM
Install Typst MCP Server with a single command:
npx mdskills install johannesbrandenburger/typst-mcpThis downloads the skill files into your project and your AI agent picks them up automatically.
Typst MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.