npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@markfu909/overleaf-mcp

v1.0.0

Published

MCP server for Overleaf integration - read LaTeX files, analyze document structure, and manage Overleaf projects via Git

Readme

@markfu909/overleaf-mcp

English | 中文

一个 MCP (Model Context Protocol) 服务器,通过 Git 集成提供对 Overleaf 项目的访问。允许 Claude 和其他 MCP 客户端读取 LaTeX 文件、分析文档结构并从 Overleaf 项目中提取内容。

功能特性

  • 文件管理: 列出和读取 Overleaf 项目中的文件
  • 文档结构: 解析 LaTeX 章节和子章节
  • 内容提取: 按标题提取特定章节
  • 项目概览: 获取项目状态和结构概览
  • 多项目支持: 管理多个 Overleaf 项目

快速开始 (npx)

最简单的使用方式是通过 npx。在 Claude Desktop 配置中添加:

{
  "mcpServers": {
    "overleaf": {
      "command": "npx",
      "args": ["-y", "@markfu909/overleaf-mcp"]
    }
  }
}

然后在用户主目录创建配置文件 ~/.overleaf-mcp/projects.json

{
  "projects": {
    "default": {
      "name": "我的论文",
      "projectId": "你的OVERLEAF项目ID",
      "gitToken": "你的OVERLEAF_GIT令牌"
    }
  }
}

手动安装

  1. 克隆仓库:

    git clone https://github.com/tianhao909/overleaf-mcp.git
    cd overleaf-mcp
  2. 安装依赖:

    npm install
  3. 设置项目配置:

    cp projects.example.json projects.json
  4. 编辑 projects.json,填入你的 Overleaf 凭证:

    {
      "projects": {
        "default": {
          "name": "我的论文",
          "projectId": "你的OVERLEAF项目ID",
          "gitToken": "你的OVERLEAF_GIT令牌"
        }
      }
    }

获取 Overleaf 凭证

  1. Git 令牌:

    • 进入 Overleaf 账户设置 → Git Integration
    • 点击 "Create Token"
  2. 项目 ID:

    • 打开你的 Overleaf 项目
    • 在 URL 中找到: https://www.overleaf.com/project/[项目ID]

Claude Desktop 配置

将以下内容添加到 Claude Desktop 配置文件:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Linux: ~/.config/claude/claude_desktop_config.json

{
  "mcpServers": {
    "overleaf": {
      "command": "node",
      "args": [
        "/path/to/OverleafMCP/overleaf-mcp-server.js"
      ]
    }
  }
}

配置后重启 Claude Desktop。

可用工具

list_projects

列出所有已配置的项目。

list_files

列出项目中的文件(默认: .tex 文件)。

  • extension: 文件扩展名过滤器(可选)
  • projectName: 项目标识符(可选,默认为 "default")

read_file

读取项目中的特定文件。

  • filePath: 文件路径(必填)
  • projectName: 项目标识符(可选)

get_sections

获取 LaTeX 文件中的所有章节。

  • filePath: LaTeX 文件路径(必填)
  • projectName: 项目标识符(可选)

get_section_content

获取特定章节的内容。

  • filePath: LaTeX 文件路径(必填)
  • sectionTitle: 章节标题(必填)
  • projectName: 项目标识符(可选)

status_summary

获取项目状态概览。

  • projectName: 项目标识符(可选)

使用示例

# 列出所有项目
使用 list_projects 工具

# 获取项目概览
使用 status_summary 工具

# 读取 main.tex 文件
使用 read_file,参数 filePath: "main.tex"

# 获取引言章节
使用 get_section_content,参数 filePath: "main.tex",sectionTitle: "Introduction"

# 列出文件中的所有章节
使用 get_sections,参数 filePath: "main.tex"

多项目使用

projects.json 中添加多个项目:

{
  "projects": {
    "default": {
      "name": "主论文",
      "projectId": "project-id-1",
      "gitToken": "token-1"
    },
    "paper2": {
      "name": "第二篇论文", 
      "projectId": "project-id-2",
      "gitToken": "token-2"
    }
  }
}

然后在工具调用中指定项目:

使用 get_section_content,参数 projectName: "paper2", filePath: "main.tex", sectionTitle: "Methods"

文件结构

OverleafMCP/
├── overleaf-mcp-server.js    # 主 MCP 服务器
├── projects.json             # 你的项目配置(已加入 gitignore)
├── projects.example.json     # 示例配置
├── package.json              # 依赖配置
├── README.md                 # 英文文档
└── README.zh-CN.md           # 中文文档

安全说明

  • projects.json 已加入 gitignore 以保护你的凭证
  • 不要提交真实的项目 ID 或 Git 令牌
  • 使用提供的 projects.example.json 作为模板

致谢

本项目 fork 自 mjyoo2/OverleafMCP。感谢原作者创建了这个优秀的 MCP 服务器。

本 fork 的改进:

  • 添加 npm 包支持(可通过 npx 安装)
  • 添加中文文档
  • 支持多配置文件路径
  • 各种部署优化改进

许可证

MIT License