Sarmate.net Sarmate.net
Home Features Pricing Documentation Contact
Log in Sign up

Connect your AI to Sarmate — step-by-step guide

Allow an artificial intelligence to read, write, compile and correct your LaTeX files directly in your Sarmate drive. This guide details every step to connect your AI to your Sarmate workspace.

Available on all plans (free included), within your plan's compilation quota.

Operating principle

A so-called "agentic" artificial intelligence is a program installed on your computer, able to carry out tasks autonomously rather than merely responding. It is most often operated from a terminal — the command-input window — though some can be used from a browser or a dedicated application. MCP (Model Context Protocol) is a standard that tells artificial intelligences how to connect to an external service and interact with it. Your AI thus connects to Sarmate's MCP server, which authorises it to read, edit and compile the files in your drive, based on your natural-language instructions. Four notions summarise how it operates.

The AI runs on your computer

Installed on your machine, the AI opens, edits and compiles your files autonomously, from requests you formulate in natural language.

Your requests: in the terminal on your computer

The terminal is a window on your computer in which you type your requests: this is where you converse with the AI. (Some AIs also accept the browser.)

The result on your sarmate.net drive

When you ask the AI to perform an action from your computer, it carries it out on your sarmate.net drive. And if the file concerned is open in the sarmate.net editor, you see the changes live.

Under your control

Every change keeps a restorable backup for 30 days, file deletion is disabled, and you can revoke your AI's access to sarmate.net at any time, from the website.

On your computer in a terminal
> Fix the LaTeX errors in chapter 2 and recompile.
On the Sarmate site (browser)
chapter2.tex edited · PDF recompiled · visible in real time

In 3 main steps

The principle is always the same, whatever your AI:

1

Create a token

on sarmate.net

From sarmate.net, generate a personal key that lets your AI access your drive.

2

Install your AI

on your computer

Install the AI of your choice on your computer: Gemini CLI (free), Claude Code… (Le Chat, however, works in the browser, with no installation.)

3

Connect and use

on your computer, in a terminal

On your computer, paste the configuration (with your token) into a terminal prompt, then ask the AI, in natural language, to act on your sarmate.net files. (Le Chat, however, is configured in the browser.)

1

Create your MCP token

  1. Open the Sarmate file manager and click the MCP icon (top right).
  2. Click "New token", give it a name (e.g. "My Gemini").
  3. Copy the token (it starts with smt_). ⚠️ It is shown only once — keep it for step 3.
2

Pick your AI and follow the steps

To begin, you can for example try Gemini CLI, which offers a free agentic-AI tier. If you prefer to avoid the terminal, Le Chat is set up in the browser.

Gemini CLI free

Gemini CLI is a command-line tool that drives an agentic AI from the terminal. A free tier is available.

All the operations below take place in a terminal on your computer — both the Node.js installation and the Gemini commands. Open one (the prerequisite below explains how, depending on your system). You then formulate your requests in natural language; Gemini operates on your files, and the changes appear in real time on the Sarmate site in the browser.
Prior step (once): open a terminal and install Node.js

These tools need Node.js (free software). Choose your system:

  1. Go to nodejs.org and download the LTS version. Run the .msi file and click "Next" all the way.
  2. Open the terminal: Windows key, type PowerShell, Enter.
  3. Check with: node --version
  1. Go to nodejs.org, download the LTS version (.pkg file) and install it.
  2. Open the terminal: Cmd + Space, type Terminal, Enter.
  3. Check with: node --version
  1. Open your terminal (often Ctrl + Alt + T).
  2. Install Node.js. On Debian/Ubuntu:
    sudo apt update && sudo apt install -y nodejs npm
  3. Check with: node --version
  1. In the terminal, install Gemini CLI (once):
    npm install -g @google/gemini-cli

    macOS / Linux: if a permission error appears, add sudo at the start of the command.

  2. Connect Sarmate (paste this command, with your token):
    gemini mcp add --transport http --header "Authorization: Bearer smt_VOTRE_TOKEN" sarmate https://mcp.sarmate.net/mcp
    Replace smt_VOTRE_TOKEN with the token you copied in step 1.
  3. Start Gemini by simply typing: gemini
  4. Formulate your request in natural language, for example:
    List my Sarmate files, open my main document and fix the compilation errors.
  5. Open your Sarmate editor in the browser: you see the files change live. ✅

Le Chat (Mistral) no terminal · browser

If you wish to avoid the terminal: Le Chat is configured entirely in the browser, in a few clicks. Available on all Le Chat plans.

  1. On chat.mistral.ai → left sidebar → IntelligenceConnectors+ Add Connector.
  2. Choose the Custom MCP Connector tab.
  3. Fill in:
    • Name : Sarmate
    • Server : https://mcp.sarmate.net/mcp
    • Authentication : API token — Header Authorization, type Bearer, value smt_VOTRE_TOKEN
    Replace smt_VOTRE_TOKEN with the token you copied in step 1.
  4. Create — active immediately, no restart.

Claude Code most powerful · paid

The most accomplished agentic AI for code and LaTeX. It requires a Claude subscription (no free version) and is the reference in the field.

Like Gemini, everything is driven from the terminal on your computer; the effects appear in real time on the Sarmate site (browser).
Prior step (once): open a terminal and install Node.js

These tools need Node.js (free software). Choose your system:

  1. Go to nodejs.org and download the LTS version. Run the .msi file and click "Next" all the way.
  2. Open the terminal: Windows key, type PowerShell, Enter.
  3. Check with: node --version
  1. Go to nodejs.org, download the LTS version (.pkg file) and install it.
  2. Open the terminal: Cmd + Space, type Terminal, Enter.
  3. Check with: node --version
  1. Open your terminal (often Ctrl + Alt + T).
  2. Install Node.js. On Debian/Ubuntu:
    sudo apt update && sudo apt install -y nodejs npm
  3. Check with: node --version
  1. Connect Sarmate (one command):
    claude mcp add --transport http sarmate https://mcp.sarmate.net/mcp --header "Authorization: Bearer smt_VOTRE_TOKEN"
    Replace smt_VOTRE_TOKEN with the token you copied in step 1.
  2. Check: claude mcp listsarmate ✓ Connected
  3. Run claude and ask it to act on your Sarmate files.

Claude Desktop

The Claude desktop app. No daily terminal, but a small technical setup at first (and Node.js installed).

Prior step (once): open a terminal and install Node.js

These tools need Node.js (free software). Choose your system:

  1. Go to nodejs.org and download the LTS version. Run the .msi file and click "Next" all the way.
  2. Open the terminal: Windows key, type PowerShell, Enter.
  3. Check with: node --version
  1. Go to nodejs.org, download the LTS version (.pkg file) and install it.
  2. Open the terminal: Cmd + Space, type Terminal, Enter.
  3. Check with: node --version
  1. Open your terminal (often Ctrl + Alt + T).
  2. Install Node.js. On Debian/Ubuntu:
    sudo apt update && sudo apt install -y nodejs npm
  3. Check with: node --version
  1. Open (or create) the configuration file:
    • macOS : ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows : %APPDATA%\Claude\claude_desktop_config.json
  2. Paste:
    { "mcpServers": { "sarmate": { "command": "npx", "args": ["-y", "mcp-remote", "https://mcp.sarmate.net/mcp", "--header", "Authorization: Bearer smt_VOTRE_TOKEN"] } } }
    Replace smt_VOTRE_TOKEN with the token you copied in step 1.
  3. Fully quit Claude (Cmd+Q on Mac) then relaunch.

ChatGPT (developer mode)

In the browser, no terminal, but file writing is often limited depending on your OpenAI plan.

  1. ChatGPT → SettingsApps & ConnectorsAdvanced settings → enable Developer mode.
  2. Create a connector: URL https://mcp.sarmate.net/mcp, transport Streamable HTTP, header Authorization: Bearer smt_VOTRE_TOKEN.
    Replace smt_VOTRE_TOKEN with the token you copied in step 1.
ChatGPT Plus/Pro is often read-only; writing is reserved for Business/Enterprise/Edu plans.

Cursor

AI code editor. No terminal: one config file.

  1. Open (or create) ~/.cursor/mcp.json and paste:
    { "mcpServers": { "sarmate": { "url": "https://mcp.sarmate.net/mcp", "headers": { "Authorization": "Bearer smt_VOTRE_TOKEN" } } } }
    Replace smt_VOTRE_TOKEN with the token you copied in step 1.
  2. Check in Cursor → Settings → MCP (green dot).

Cline / Continue (VS Code)

Cline : Cline sidebar → MCP Servers → Configure MCP Servers, then paste:

{ "mcpServers": { "sarmate": { "url": "https://mcp.sarmate.net/mcp", "headers": { "Authorization": "Bearer smt_VOTRE_TOKEN" }, "disabled": false } } }

Continue : ~/.continue/config.yaml

mcpServers: - name: sarmate url: https://mcp.sarmate.net/mcp headers: Authorization: Bearer smt_VOTRE_TOKEN
Replace smt_VOTRE_TOKEN with the token you copied in step 1.

Other client

Any MCP-compatible client works with these 3 details:

  • URL : https://mcp.sarmate.net/mcp
  • Transport : Streamable HTTP / SSE
  • Header : Authorization: Bearer smt_VOTRE_TOKEN

For a stdio-only client (no HTTP), use the bridge:

npx -y mcp-remote https://mcp.sarmate.net/mcp --header "Authorization: Bearer smt_VOTRE_TOKEN"
Replace smt_VOTRE_TOKEN with the token you copied in step 1.
Need technical details (tools list, advanced FAQ)? Technical documentation →

Frequently asked questions

Is terminal proficiency required?
It is not necessary. You simply copy two or three commands provided, once; interactions with the AI then take place in natural language. If you prefer not to use the terminal, Le Chat is configured entirely in the browser.
What is Node.js and why install it?
It's free software that Gemini CLI, Claude Code and Claude Desktop use to run. You install it once, in a few clicks (see "Prerequisite" in each relevant section). Le Chat and ChatGPT don't need it.
Which plan do I need? Is free enough?
MCP is open to all plans, free included, bounded by your plan's compilation quota. On the AI side: Gemini CLI has a free tier; Claude Code requires a Claude subscription.
It doesn't connect, the tool doesn't appear.
Check: (1) did you restart the tool after config? (2) is the token copied in full, prefixed with Bearer ? (3) for Gemini/Claude, does node --version respond (Node.js installed)?
Can I connect Claude.ai (the website / app)?
Not yet (Claude.ai requires OAuth, not implemented yet). In the meantime, Claude Desktop and Claude Code offer the same capabilities with the same AI.

Ready to connect your AI?

Create your token, then follow Gemini CLI (free) in step 2.