
用于 Overleaf 项目的 MCP 服务器。通过 Git 同步 LaTeX 文件,解析截面、方程和引用,并向 AI 客户端展示,用于辅助论文审阅、修复 LaTeX 和内容生成。
概览
一个专注于 Overleaf 项目的 MCP 服务器(通过 Overleaf Git 同步)。 - 通过 Git 同步将兼容 MCP 的客户端连接到您的 Overleaf 项目。- 提供文件级工具,用于列出、读取、写入和同步项目内容。- 保持工作流程简单:拉取最新文件,编辑后再推回 Overleaf。 - Python 3.13+ - UV包管理器 - 一个带有个人、团体或机构许可的Overleaf套餐。查看你的机构是否提供免费访问,使用机构邮箱。如果你的机构未被列出,升级你的套餐。 1. - 在 Overleaf 上打开你的项目→ →在集成中启用。2. - 从浏览器的 URL(例如 https://www.overleaf.com/project/69a4f7cc4eaf13bd56de5b04 → 69a4f7cc4eaf13bd56de5b04)。3. - 在→ →。4. - 将 .env.example 复制到 .env 并填写: 如果你没有设置PROJECT_ID,也可以每次调用传递project_id。 服务器在 stdio 上监听——把你的 MCP 客户端(Claude Desktop 等)连接到它。 添加到 ~/。
概述(AI 翻译)
** 一个通过 Git 同步管理 Overleaf 项目的 MCP 服务器。**
PyPI 包 ·MCP 注册表
这个服务器的作用
- 通过 Git 同步将兼容 MCP 的客户端连接到你的 Overleaf 项目。
- 提供文件级工具,用于列出、读取、写入和同步项目内容。
- 保持工作流程简单:拉取最新文件,编辑后返回 Overleaf。
建筑
工具工作流程
要求
- Python 3.13+
uv包管理器- 带有Git集成的Overleaf计划(个人、团体或机构许可证)。查看你的机构是否提供免费访问,访问Overleaf for Institutions——使用机构邮箱。如果你的机构未被列出,请升级你的计划。
Git 设置
- 启用Git——在Overleaf上打开你的项目→菜单→在集成下启用Git。
- 复制项目ID——从浏览器URL中(例如
https://www.overleaf.com/project/69a4f7cc4eaf13bd56de5b04→69a4f7cc4eaf13bd56de5b04)。 - 生成Git令牌 - 账户设置 → Git集成认证令牌 → 生成新令牌。
- 配置
.env- 将.env.example复制到.env并填写:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Overleaf MCP Server
An MCP server for managing Overleaf projects through Git synchronization.
What This Server Does
- Connects MCP-compatible clients to your Overleaf project through Git sync.
- Exposes file-level tools to list, read, write, and sync project content.
- Keeps workflow simple: pull latest files, edit, then push back to Overleaf.
Architecture
flowchart LR
C[MCP Client\nClaude Desktop / other MCP host] -->|Tool Call| S[Overleaf MCP Server]
S -->|Git Sync| O[Overleaf Git Remote]
S -->|Read / Write| L[Local Repo Mirror]
L -->|Commit + Push| O
O -->|Pull / Fetch| L
S -->|Tool Result| C
Tool Workflow
sequenceDiagram
participant Client as MCP Client
participant Server as Overleaf MCP Server
participant Local as Local Mirror
participant Overleaf as Overleaf Git
Client->>Server: list_files / read_file
Server->>Local: Ensure local clone
Server->>Overleaf: git pull
Overleaf-->>Server: latest content
Server-->>Client: file list / file content
Client->>Server: write_file(path, content)
Server->>Local: update file
Server->>Local: git commit
Server->>Overleaf: git push
Server-->>Client: success + metadata
Requirements
- Python 3.13+
uvpackage manager- An Overleaf plan with Git integration (individual, group, or institution license). Check if your institution provides free access at Overleaf for Institutions - use your institutional email. If your institution is not listed, upgrade your plan.
Git Setup
- Enable Git - open your project on Overleaf → Menu → enable Git under Integrations.
- Copy project ID - from the browser URL (e.g.
https://www.overleaf.com/project/69a4f7cc4eaf13bd56de5b04→69a4f7cc4eaf13bd56de5b04). - Generate a Git token - Account Settings → Git integration authentication tokens → Generate new token.
- Configure
.env- copy.env.exampleto.envand fill in:
OVERLEAF_TOKEN=your_git_token
PROJECT_ID=your_project_id
project_idcan also be passed per tool call, butPROJECT_IDis still required by the server configuration.
The Overleaf Git token is account-wide credential material. Store it only in
the MCP client’s environment or a protected .env file, and rotate it if it
is exposed.
Safety Notes
安装
uvx --from git+https://github.com/younesbensafia/overleaf-mcp-server overleaf-mcp配置
{
"mcpServers": {
"overleaf": {
"command": "uv",
"args": ["--directory", "/path/to/overleaf-mcp-server", "run", "overleaf-mcp"],
"env": {
"OVERLEAF_TOKEN": "your_git_token",
"PROJECT_ID": "your_project_id"
}
}
}
}