Sarmate.net Sarmate.net
Home Features Pricing Documentation Contact
Log in Sign up
New — May 2026

Connect your AI directly to your LaTeX drive

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.

Why MCP on Sarmate?

Instead of copy-pasting files back and forth, your AI works directly in your drive — secure, auditable, and live-synced with your Sarmate editor.

No more copy-paste

Your AI reads and writes your .tex files directly. No duplicates, no stale versions, no friction.

Self-correcting loops

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.

Safe by design

Snapshot before every modification (30 days), deletion disabled, audit log, revocable token, optional scope limitation.

3 steps to get started

Setup in under 2 minutes, valid for all common MCP clients.

1

Create a token

In the Sarmate file manager (user menu → My MCP tokens), generate a secure token in one click.

2

Configure your AI client

The wizard generates the exact config for your client (Claude Desktop, Cursor, Gemini CLI…) — token already injected.

3

Ask your AI

"Fix the errors in chap3.tex and compile." The AI reads, writes and compiles directly in your drive.

Compatible with your favourite AI client

Any client supporting MCP via streamable HTTP with Bearer token works.

Claude Desktop
Mac / Win / Linux
Claude.ai
Web / iOS / Android
Claude Code
CLI
Cursor
IDE
Cline
VS Code
Continue
VS Code
ChatGPT
Developer Mode
Gemini CLI
CLI
Le Chat (Mistral)
Web · 🇫🇷 EU

Real-world use cases

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

Security and privacy

Six guardrails from day one, to protect your files from misuse by an external AI.

Bcrypt storage — Tokens stored only as hashes, never in plaintext.
Pre-edit snapshots — Every write creates a restorable backup. 30-day retention.
Deletion disabled — An AI cannot delete a file via MCP, only via your file manager.
Audit log — Every MCP call is logged, viewable by you.
Instant revocation — Revoke a token in one click. The AI client is disconnected instantly.
Granular scope — Limit a token to a specific folder and/or read-only.

MCP across plans

MCP is available on all plans — bounded by your plan's compile quota. Pro / Etab offer unlimited compile.

Free
MCP enabled
Compile quota: 1 min / 2 h
See pricing

MCP vs "local AI + copy/paste"

Both methods use the same AI. The difference: the number of manual steps between your prompt and the final PDF.

Without MCP — manual loop

  1. You: "write me some LaTeX for…"
  2. AI: outputs code in chat
  3. You: copy/paste into Overleaf/editor
  4. You: compile, see an error
  5. You: copy/paste the log back to the AI
  6. AI: suggests a fix
  7. You: copy/paste the fix into the editor
  8. Back to step 4 — as many times as needed
In practice : 5–10 min per bug, heavy mental load. At 6 iterations, you lose 30–60 min and your focus.

With Sarmate MCP — autonomous loop

  1. You: "write this chapter and compile it"
  2. AI calls write_file into your drive
  3. AI calls compile, gets the log
  4. AI reads the error and fixes it (write_file)
  5. AI recompiles (compile)
  6. … until clean. Optional: read_pdf to verify the content
  7. ✓ You read the conversation and the final PDF
In practice : One prompt, a few minutes of waiting, clean PDF. You stay focused on the content, not on the workflow plumbing.

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.

NEW

Markdown → PDF, autonomously by an AI

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.

You ▶ "Compile draft.md, read the PDF, summarise."
AI ▶ compile(.md) → pdf_path → read_pdf(.pdf) → text → résumé
Learn more about Markdown × Sarmate Tool reference

Frequently asked questions

Concretely, what is MCP?
Model Context Protocol is an open standard developed by Anthropic to connect AI clients (Claude, Cursor, Gemini, ChatGPT…) to external tools. Sarmate exposes an MCP server that provides tools to read, write and compile your LaTeX files.
Do I need an Anthropic / OpenAI / Google API key?
No. You use your existing AI client (your Claude Desktop account, for example), and Sarmate only provides an MCP token to access your drive. These tokens are independent.
What if the AI breaks a file?
An automatic snapshot is created before every write (30-day retention). You can restore any previous version via the restore_version tool or directly from the file manager.
Can I scope a token to a single folder?
Yes. When creating the token, you can specify one or more authorised directories. You can also enable read-only mode — the token will only see that scope, nothing else.
Which tools are available?
14 tools: Drive — get_account_info, list_files, search_files, read_file, read_pdf, write_file, create_file, rename_file, list_history, restore_version ; LaTeX — compile, get_compile_log ; HTML mathpad — convert_latex_to_mathpad, get_mathpad_html_spec. Full details in the technical documentation.
Does MCP also handle mathpad HTML?
Yes. Two dedicated tools complement the LaTeX ones: 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.
See full documentation

Ready to let your AI work in your drive?

Setup in 2 minutes. Available on every plan, free included.