cstcloud-latex-mcp
Provides tools for editing and managing LaTeX projects, reading/writing .tex, .bib, and .cls files, triggering remote compilation with pdflatex/xelatex/lualatex, and retrieving structured compile errors and warnings.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cstcloud-latex-mcp Compile my thesis project and show LaTeX errors"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cstcloud-latex-mcp
MCP Server for editing LaTeX projects on latex.cstcloud.cn from any IDE.
A Model Context Protocol (MCP) server and VS Code / Antigravity extension that lets you manage, edit, compile, and bidirectionally sync your CSTCloud LaTeX projects directly from VS Code, Cursor, Antigravity, and any other MCP-compatible editor.
VS Code Extension
Search CSTCloud LaTeX (or nowhere.cstcloud-latex) in the VS Code Extensions Marketplace (or Open VSX), or install directly from:
Related MCP server: overleaf-bridge
Features
📋 List Projects — Browse all your LaTeX projects
📁 File Tree — View the full file/folder structure of any project
📖 Read Files — Read
.tex,.bib,.cls, and other source files✏️ Write Files — Edit and save file content back to the cloud
🔨 Compile — Trigger remote LaTeX compilation (pdflatex, xelatex, lualatex)
📊 Compile Logs — Get structured error/warning reports from build logs
Quick Start
1. Get Your Cookie
Visit latex.cstcloud.cn and log in
Open DevTools (F12) → Application → Cookies
Copy the value of the
overleaf.sidcookie
2. Configure Your IDE
VS Code / Cursor
Add to your MCP settings (.vscode/mcp.json or user settings):
{
"mcpServers": {
"cstcloud-latex": {
"command": "npx",
"args": ["cstcloud-latex-mcp"],
"env": {
"CSTCLOUD_COOKIE": "your-overleaf.sid-cookie-value"
}
}
}
}Antigravity
Add to your MCP configuration:
{
"mcpServers": {
"cstcloud-latex": {
"command": "npx",
"args": ["cstcloud-latex-mcp"],
"env": {
"CSTCLOUD_COOKIE": "your-overleaf.sid-cookie-value"
}
}
}
}3. Start Using
Once configured, your AI assistant can use these tools:
Tool | Description |
| List all your LaTeX projects |
| Get the file tree of a project |
| Read a document's content |
| Update a document's content |
| Trigger remote LaTeX compilation |
| Get compilation errors and warnings |
| Start real-time bidirectional sync to a local folder |
| Stop an active bidirectional sync session |
| Inspect active sync sessions and logs |
4. Bidirectional Sync (Open in IDE)
Sync any CSTCloud project to a local folder and open it directly in your IDE:
# Continuous bidirectional sync
CSTCLOUD_COOKIE="your-cookie" node dist/index.js sync <projectId> ./my-paper
# One-shot reconciliation
CSTCLOUD_COOKIE="your-cookie" node dist/index.js sync <projectId> ./my-paper --onceOr ask your AI assistant to call start_sync with project_id and local_dir. Sync metadata is stored in ~/.cstcloud-sync/, and IDE/LaTeX temporary files are ignored by default (customizable via .cstcloudignore).
Example conversation:
You: "Show me my LaTeX projects on CSTCloud"
AI: (calls
list_projects) "You have 3 projects: ..."You: "Open the main.tex file in my thesis project and fix the bibliography errors"
AI: (calls
get_project_files→read_file→write_file→compile_project→get_compile_log)
Environment Variables
Variable | Required | Description |
| ✅ | Your |
| ❌ | Custom server URL (default: |
Development
# Clone the repo
git clone https://github.com/YOUR_USERNAME/cstcloud-latex-mcp.git
cd cstcloud-latex-mcp
# Install dependencies
npm install
# Build
npm run build
# Run locally
CSTCLOUD_COOKIE="your-cookie" node dist/index.jsRoadmap
Project listing and file tree
Document read/write
Remote compilation and log parsing
Bidirectional file sync (local ↔ cloud)
PDF download/preview
Multi-server support
License
Available Tools
10 toolscompile_projectA
Trigger a remote LaTeX compilation for a CSTCloud project. Returns the compilation status (success/failure) and a list of output files. After compiling, use get_compile_log to see detailed error messages.
Inputs: project_id (required), compiler.
configure_authA
Save and verify your CSTCloud LaTeX session cookie (overleaf.sid) to ~/.cstcloud-sync/config.json so all CSTCloud tools and bidirectional sync work without editing mcp_config.json.
Inputs: cookie (required), base_url.
get_compile_logA
Get the compilation log from the most recent LaTeX build of a CSTCloud project. Returns both the raw log text and parsed error/warning entries with file and line information. Call compile_project first to trigger a compilation.
Inputs: project_id (required), raw.
get_project_filesA
Get the file tree (all files and folders) of a CSTCloud LaTeX project. Returns a flat list of files with their IDs, names, types (doc/file), and full paths. You need the file ID from this list to read or write specific files.
Inputs: project_id (required).
list_projectsA
List all LaTeX projects on your CSTCloud (latex.cstcloud.cn) account. Returns project names, IDs, last-updated timestamps, and owner info. Use this to discover available projects before reading or editing files.
Inputs: no named parameters.
read_fileA
Read the content of a document (.tex, .bib, .cls, .sty, etc.) in a CSTCloud LaTeX project. Returns the full text content of the file. Use get_project_files first to find the file ID.
Inputs: file_id (required), project_id (required).
start_syncA
Start real-time bidirectional sync between a CSTCloud LaTeX project and a local folder, so you can open and edit the project directly in your IDE. Performs an initial sync immediately and keeps syncing in the background.
Inputs: local_dir (required), project_id (required), setup_ide_task.
stop_syncB
Stop an active bidirectional sync session for a CSTCloud LaTeX project.
Inputs: project_id (required).
sync_statusA
Get the status, statistics, and recent sync logs for active CSTCloud bidirectional sync sessions.
Inputs: project_id.
write_fileA
Write (replace) the content of a document in a CSTCloud LaTeX project. This replaces the entire file content with the provided text. WARNING: If another user is editing the same file simultaneously, changes may conflict. Use read_file first to get the current content, then modify and write back.
Inputs: content (required), file_id (required), project_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a clearly distinct resource or lifecycle stage: listing projects, inspecting a file tree, reading/writing a single file, compiling, fetching logs, and the start/stop/status of sync sessions. The hierarchy (list_projects -> get_project_files -> read_file) is explained in descriptions, so an agent can pick the right tool without confusion.
Nearly all tools follow a snake_case verb_noun pattern (list_projects, get_project_files, read_file, write_file, compile_project, get_compile_log, start_sync, stop_sync, configure_auth). The only deviation is sync_status, which is noun-only rather than verb_noun, a minor inconsistency within an otherwise predictable set.
Ten tools is well within the ideal range and each earns its place, covering project discovery, file operations, compilation, diagnostics, auth, and sync. There is no obvious redundancy or padding in the set.
The surface covers reading and replacing file content plus compilation and sync, but there is no way to create a new project, create a new file, or delete/rename files, so write_file only fully serves existing documents. These are notable gaps that would cause dead ends for common project-setup and cleanup workflows.
Maintenance
Related MCP Connectors
Browse and manage files in your Moxt AI workspace from any MCP client.
Project management shared by people and AI agents, with persistent project state through MCP.
Deploy and manage Jade Hosting projects from AI clients. Jade account and OAuth required.
Share one project context across ChatGPT, Claude, Telegram and any MCP client.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to read, write, compile, and manage Overleaf projects through MCP, including file operations, project administration, and LaTeX compilation diagnostics.16MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read, edit, upload, compile, and manage projects in a self-hosted Overleaf Community Edition via MCP, while also providing a git remote for cloning and pushing changes.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables a writer and their AI tools to edit, compile, and manage self-hosted LaTeX projects through authenticated MCP tools, with revision-safe edits, file history, and isolated TeX compilation.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to read and precisely edit LaTeX projects, review diffs, sync with Overleaf and GitHub, and compile locally or online with returned PDFs and diagnostics.3MIT