Sarmate supports Model Context Protocol (MCP). Claude Desktop, Cursor, Gemini CLI or ChatGPT read, write and compile your LaTeX files directly in your Sarmate drive — no more copy-paste, no more duplicate files.
Instead of copy-pasting files back and forth, your AI works directly in your drive — secure, auditable, and live-synced with your Sarmate editor.
Your AI reads and writes your .tex files directly. No duplicates, no stale versions, no friction.
The AI compiles, reads error logs, fixes, recompiles — until it works. You watch the conversation, without a single copy/paste. On a complex manuscript, that saves hours.
Snapshot before every modification (30 days), deletion disabled, audit log, revocable token, optional scope limitation.
Setup in under 2 minutes, valid for all common MCP clients.
In the Sarmate file manager (user menu → My MCP tokens), generate a secure token in one click.
The wizard generates the exact config for your client (Claude Desktop, Cursor, Gemini CLI…) — token already injected.
"Fix the errors in chap3.tex and compile." The AI reads, writes and compiles directly in your drive.
Any client supporting MCP via streamable HTTP with Bearer token works.
Prompts actually used by Sarmate users.
Fix the LaTeX errors in chap3.tex and compile until it passes without error.
read_file → write_file → compile (loop)
Write a new section on heat transfer in section4.tex following the style of the other chapters.
list_files → read_file (×N) → create_file
Unify the bibliography style across my whole thesis.
search_files → write_file (×N)
Show me the recent snapshots of main.tex and restore Thursday's version.
list_history → restore_version
Convert my cours.tex into mathpad HTML and add a quiz after each exercise.
convert_latex_to_mathpad → read_file → write_file
Write me an interactive HTML course on linear functions, with definitions, theorems, variation table and runnable Python.
get_mathpad_html_spec → create_file
Six guardrails from day one, to protect your files from misuse by an external AI.
MCP is available on all plans — bounded by your plan's compile quota. Pro / Etab offer unlimited compile.
Both methods use the same AI. The difference: the number of manual steps between your prompt and the final PDF.
write_file into your drivecompile, gets the logwrite_file)compile)read_pdf to verify the content
The key: Sarmate gives the AI compile, get_compile_log and read_pdf — it can read its own work AND its own errors. With a local AI without drive access, you are the middleman.
Since May 2026, the compile tool also accepts .md files (Pandoc + xelatex server-side), and a new read_pdf tool lets the AI read the resulting PDF. Full write-compile-analyse cycle for an AI, without any local install on the user side — unique on the market.
convert_latex_to_mathpad converts a .tex document into a responsive interactive HTML page (mp-chapter, mp-definition, mp-exercise, mp-figure with PNG of tikz/pstricks figures, KaTeX, BibTeX), and get_mathpad_html_spec gives the AI the full spec of mp-* tags to write a course from scratch. Three modes: converter only, hybrid converter+AI, or 100% AI from the .tex. See the conversion page for details.Setup in 2 minutes. Available on every plan, free included.