Skip to main content
Glama

Overleaf MCP

从 Claude 读取和编辑 Overleaf 项目,使用 Overleaf git 桥接。

警告:当你向 MCP 提供项目 ID 时,这会让 Claude 访问整个项目目录。

要求

  • Overleaf 高级版(请检查你所在机构的访问权限!)

  • uvgit、TeX 发行版,以及 pdftocairo(在 Mac 上可以 brew install poppler

Related MCP server: overleaf-mcp

设置

  1. 克隆仓库。

  2. 创建 ~/.overleaf-mcp/projects.json。示例见 projects.json.example。项目 ID 是 Overleaf URL 中 /project/ 后面的字符串。

    { "default": "paper", "projects": { "paper": "<project-id>" } }
  3. 将服务器添加到你的 Claude 配置中。你可以在 Overleaf 账户设置中生成 git 令牌。

    {
      "mcpServers": {
        "overleaf": {
          "command": "/absolute/path/to/uv",
          "args": ["run", "--directory", "/absolute/path/to/overleaf-mcp", "overleaf-mcp"],
          "env": { "OVERLEAF_TOKEN": "your_git_token" }
        }
      }
    }
  4. 重启 Claude。

工作原理

一个项目在 open_project 成功之前处于 unverified 状态,该操作会检查每个 \usepackage 是否能在你的本地 TeX 环境中解析,并对每个根文件进行基线编译。

在 open_project 通过之前,所有写入操作都会被拒绝

包含 \documentclass.tex 文件是 根文件,而 子文件 通过 \input/\include/\subfile 被包含。编辑子文件会重新编译包含它的根文件。例如,这适用于标准的 main.tex + sections/ 项目、单文件论文,甚至是包含多个独立单页文档的文件夹,规则相同。此外,任何错误都会阻止推送,而警告仅被报告。

工具

工具

描述

open_project

拉取、验证环境,并进行基线编译

files

列出 .tex 文件,标记根文件

outline

显示结构及行号

read

读取内容,可指定行号范围(lines="150-190"

grep

正则搜索,返回 file:line: match 格式

edit

替换精确的唯一片段,受编译门控

write

创建或覆盖文件,受编译门控

add_asset

复制图片或二进制文件

compile

编译所属根文件,返回摘要

render

将一页渲染为图片——对查看布局非常有用

Install Server
F
license - not found
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Edit your Overleaf LaTeX projects from Claude and ChatGPT; every change is a real Git commit.

  • Read, edit, publish, and preview your pepita websites from Claude.

  • Persistent context for Claude. Your AI always knows your projects and next actions across sessions.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/meaninglessC0de/Overleaf-Claude-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server