
johannesbrandenburger/typst-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Johannesbrandenburger/Typst-MCPは、https://github.com/johannesbrandenburger/typst-mcp.からインポートされたMCPサーバー候補です。
概要
Johannesbrandenburger/Typst-MCPは、https://github.com/johannesbrandenburger/typst-mcp.からインポートされたMCPサーバー候補です。
概要(AI 翻訳)
Typst MCP Serverは、AIモデルがマークアップベースの組版システムであるTypstと連携するのを支援するMCP(Model Context Protocol)実装です。このサーバーは、LaTeXとTypst間の変換、Typst構文の検証、Typstコードからの画像生成のためのツールを提供します。
利用可能なツール
⚠️ 現在、すべての機能は
toolsで実装されています。なぜなら、カーソルとVSコードはまだ他のプリミティブを処理できていないからです。
サーバーは以下のツールを提供します:
list_docs_chapters():Typstドキュメント内の全章を一覧化。
- LLMがドキュメントの概要を把握し、読む章を選択できるようにします。
- LLMは、目の前の課題に基づいて読むべき章を選択します。
get_docs_chapter(route):Typstドキュメントから特定の章を取得します。
- LLMが選択した章に基づいて、このツールはその章の内容を取得します。
- 複数の章を同時に取得できる
get_docs_chapters(routes: list)としても利用可能です。
latex_snippet_to_typst(latex_snippet): Pandocを使ってLaTeXコードをTypstに変換します。
- LLMはTypstよりもLaTeXの記述が優れているため、このツールはLaTeXコードをTypstに変換するのに役立ちます。
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
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:
-
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.
-
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.
-
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.
-
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.
-
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.jsonand the assets in thetypst-docsfolder
-
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:
インストール
docker run --rm -i ghcr.io/johannesbrandenburger/typst-mcp:latest設定
{
"mcpServers": {
"typst": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"ghcr.io/johannesbrandenburger/typst-mcp:latest"
]
}
}
}