Foreword

In DSH agent development, a common requirement is to have the model process LaTeX projects in Overleaf: reading files, viewing chapters, modifying content, and then writing changes back to the project. If you just have the model manually copy-paste or operate the browser, the process chain becomes quite long and is not suitable for stable tool calls.

dsh-overleaf solves this problem: as a DSH bundle, it connects multiple Overleaf projects to DSH via OverleafMCP, enabling the model to call the corresponding tools to perform reading and writing operations.

What is this

dsh-overleaf is a DSH bundle maintained by fly233338, licensed under MIT.

It connects multiple Overleaf projects to DSH via @fly233338/overleaf-mcp and uses the DSH MCP Client provided by the host.

Core Features

Here are the confirmed capabilities:

  • Connect multiple Overleaf projects to DSH via @fly233338/overleaf-mcp.
  • Browse and read files in multiple Overleaf projects.
  • View document sections and their content.
  • Write files or sections back to Overleaf via Git.
  • Use the DSH MCP Client provided by the host.
  • Generate an internal .dsh-overleaf.projects.json OverleafMCP project configuration upon startup.

Requirements

First, ensure your environment meets the following conditions:

  • DSH 0.1.0-rc.5 or a compatible version.
  • Node.js 22.19.0 or a higher version.
  • An Overleaf Git integration token.

The plugin does not read .env and does not require Overleaf environment variables.

Installation and Enabling

When DSH is available, run:

dsh plugin --profile web add dsh-overleaf

As per the plugin instructions, the npm install command will be available after the package is published.

Configuration

The plugin will save dsh-overleaf.config.json to:

$DSH_HOME/dsh-overleaf/

If DSH_HOME is not set, it uses:

~/.dsh/dsh-overleaf/

The configuration requires a shared token and a list of project IDs:

{
  "gitToken": "your-overleaf-git-token",
  "projectIds": [
    "project-id-a",
    "project-id-b"
  ]
}

The project IDs are obtained from the <id> in the Overleaf project URL.

After editing the configuration file, you need to restart DSH. The plugin will generate an internal .dsh-overleaf.projects.json upon startup. Do not edit this generated file.

Also, do not include the token in public source repositories or published package content.

Typical Usage

Tell the model which project to work on:

Please work on Overleaf project project-id-a and read its main.tex.

The model will first call:

mcp__overleaf__list_projects

Then pass the selected project ID as projectName to subsequent Overleaf tools.

Write operations require an explicit commitMessage and will push a Git commit to Overleaf.

Use Cases and Notes

dsh-overleaf is suitable for scenarios where DSH needs to read, understand, and modify multiple Overleaf projects via Git.

Currently, the plugin does not compile documents, review PDFs, or automate browsers.

The plugin runs with the permissions of the current DSH process and accesses the Overleaf projects specified in the configuration. Before installation, it is recommended to review the source code, dependencies, and MIT license to ensure the token does not enter public repositories or release artifacts.

Links

  • GitHub: https://github.com/fly233338/dsh-overleaf