First public release on the npm registry:
@mjyoo2/overleaf-mcp@1.0.0.
Highlights
- 📦 Installable via
npx— no clone, nonpm install, noprojects.jsonfile. Just a Claude Desktop config block with two env vars. - ✏️ Write tools —
write_file(full-file overwrite + commit + push) andwrite_section(level-aware LaTeX section replacement, leaves the rest of the file untouched). Both pull before writing and surface clear errors on conflict / push rejection. - 🪟 Cross-platform — Windows, macOS, Linux. Replaces the previous Unix-only
test -d/findshell calls withfs/promises. - 🔒 Hardened —
execFile([args])everywhere git is invoked (no shell injection viacommitMessage/filePath),..traversal is rejected, the Overleaf token is masked from any error returned to the MCP client. - 🧠 Smarter LaTeX parser — brace-balanced parser handles
\section*,\section[short]{long}, nested braces in titles, plus\chapterand\part. Replaces the prior regex that broke on those.
Install
Drop this into your Claude Desktop config (%APPDATA%\Claude\claude_desktop_config.json on Windows, ~/Library/Application Support/Claude/claude_desktop_config.json on macOS, ~/.config/claude/claude_desktop_config.json on Linux) and restart Claude Desktop.
macOS / Linux
{
"mcpServers": {
"overleaf": {
"command": "npx",
"args": ["-y", "@mjyoo2/overleaf-mcp"],
"env": {
"OVERLEAF_PROJECT_ID": "YOUR_OVERLEAF_PROJECT_ID",
"OVERLEAF_GIT_TOKEN": "YOUR_OVERLEAF_GIT_TOKEN"
}
}
}
} Windows (needs cmd /c to find npx)
{
"mcpServers": {
"overleaf": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@mjyoo2/overleaf-mcp"],
"env": {
"OVERLEAF_PROJECT_ID": "YOUR_OVERLEAF_PROJECT_ID",
"OVERLEAF_GIT_TOKEN": "YOUR_OVERLEAF_GIT_TOKEN"
}
}
}
}Get credentials from Overleaf → Account Settings → Git Integration. The project ID is the last segment of the project URL.
Configuration
Single-project via env vars is the recommended path. For multiple projects, set OVERLEAF_PROJECTS_CONFIG=/path/to/projects.json. See the https://github.com/mjyoo2/OverleafMCP#configuration-reference for the full priority chain (env → explicit file → user config dir → cwd → package dir).
Credits
Write tool design and initial cross-platform fix by https://github.com/SemPlaatsman (PRs #3 and #4, merged into the line that landed here).
Compatibility
- Node.js ≥ 18
- Any MCP client (tested with Claude Desktop on Windows; Cursor / Windsurf use the same config shape)