Home / Servers

overleaf-git-mcp

by Junfei-Z

Overleaf Git MCP

A model-agnostic MCP server for token-efficient reading, editing, and synchronization of Overleaf LaTeX projects through Git.

<p align="center"> <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/Node.js-%3E%3D18-339933?logo=node.js&logoColor=white" alt="Node.js >= 18"></a> <a href="https://modelcontextprotocol.io/"><img src="https://img.shields.io/badge/MCP-Compatible-0A84FF" alt="MCP compatible"></a> <a href="https://developers.openai.com/codex/mcp"><img src="https://img.shields.io/badge/Codex-CLI%20%7C%20IDE-111111?logo=openai&logoColor=white" alt="Codex CLI and IDE"></a> <a href="https://claude.ai/"><img src="https://img.shields.io/badge/Claude-Code%20%7C%20Desktop-D97706?logo=anthropic&logoColor=white" alt="Claude Code and Desktop"></a> <a href="https://www.overleaf.com/"><img src="https://img.shields.io/badge/Overleaf-Git%20Bridge-47A141?logo=overleaf&logoColor=white" alt="Overleaf Git Bridge"></a> <a href="https://github.com/Junfei-Z/overleaf-git-mcp/releases"><img src="https://img.shields.io/badge/version-1.1.0-blueviolet" alt="Version 1.1.0"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT License"></a> <a href="https://github.com/Junfei-Z/overleaf-git-mcp/stargazers"><img src="https://img.shields.io/github/stars/Junfei-Z/overleaf-git-mcp?style=social" alt="GitHub stars"></a> </p>

Overleaf Git MCP connects Codex, Claude Code, Claude Desktop, and other MCP clients that support local STDIO servers to your Overleaf projects.

It is designed for real research-writing workflows in which LaTeX projects are large, edits are usually local, and repeatedly transferring an entire file wastes context and tokens. The server provides targeted patching, sparse checkout, diff-based re-reading, section-aware access, and explicit Git push operations.

Key capabilities

  • Read project files and inspect LaTeX section structure.
  • Apply targeted edits without rewriting complete files.
  • Commit and push changes back to Overleaf through its Git bridge.
  • Skip figures and other binary assets during synchronization.
  • Return only changed content on repeated reads when smart diff mode is enabled.
  • Manage multiple Overleaf projects from one local MCP server.
  • Keep write operations local until an explicit push_changes call.

Why use this MCP server?

A thesis or long paper can contain an 80–100 KB main.tex file, which may correspond to roughly 35K tokens. A naive agent workflow may repeatedly read or rewrite that entire file even when only one sentence changes.

The examples below illustrate the intended efficiency gains:

ScenarioNaive workflowOverleaf Git MCPExpected effect
Read a 35K-token file twice70K tokensFirst read + subsequent diffAbout 50% less repeated content
Replace a 50-word sentenceRewrite the full fileAbout 100–200 tokens with patch_fileMore than 99% less generated text
Clone a figure-heavy projectDownload all assetsDownload supported text files onlyLower bandwidth and faster setup
Revisit the same file in one sessionReturn the full file each timeReturn only detected changesStable context usage

These figures are illustrative and depend on the project structure, client behavior, and requested edit.


What is new in v1.1.0?

Sparse checkout

Only supported text files are synchronized:

  • .tex
  • .bib
  • .bst
  • .cls
  • .sty
  • .bbl
  • .cfg

Images, PDFs, and other binary assets are skipped. This keeps clone and pull operations lightweight for projects with many figures.

Read/write separation

  • Read operations pull the latest state from Overleaf.
  • Write operations modify the local working copy without automatically pulling.
  • push_changes pulls before committing and pushing, reducing the risk of overwriting remote work.

Smart diff mode

After the first read_file call, subsequent reads

Related servers

n8n

by n8n-io

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

NOASSERTION198,904

@modelcontextprotocol/server-everything

Official

by modelcontextprotocol

MCP server that exercises all the features of the MCP protocol

89,105

@modelcontextprotocol/server-filesystem

Official

by modelcontextprotocol

MCP server for filesystem access

SEE LICENSE IN LICENSE89,105

mcp-server-fetch

Official

by modelcontextprotocol

A Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

89,105