Skip to content

Repository files navigation

vibeTeX

vibeTeX is an MCP server that lets Claude and other MCP clients work with LaTeX projects, including Overleaf projects, through a Git bridge, project sync, and LaTeX compile.

npm npm downloads License: MIT MCP CI

npx -y @oscardvs/vibetex

Add to Cursor · Docs · Tools · Configuration


vibeTeX is an independent open-source project and is not affiliated with, endorsed by, or sponsored by Overleaf or Digital Science. "Overleaf" is used here only nominatively to describe interoperability.


Install

Client Install
Claude Code claude mcp add vibetex -e OVERLEAF_GIT_TOKEN=your_token -e OVERLEAF_PROJECT_ID=your_project_id -- npx -y @oscardvs/vibetex
Cursor Add to Cursor or paste the mcp.json snippet below
VS Code paste the mcp.json snippet below into your MCP config
Claude Desktop download vibetex.dxt from the latest release and double-click it
claude.ai (hosted, paid) add a custom connector pointing at https://mcp.vibetex.dev/mcp

Cursor / VS Code: add this to your MCP config (mcp.json):

{
  "mcpServers": {
    "vibetex": {
      "command": "npx",
      "args": ["-y", "@oscardvs/vibetex"],
      "env": {
        "OVERLEAF_GIT_TOKEN": "your_overleaf_git_token",
        "OVERLEAF_PROJECT_ID": "your_24_hex_project_id"
      }
    }
  }
}

Get your Git authentication token in Overleaf under Account Settings → Git Integration (a paid Overleaf feature). The project id is the 24-hex string in your project URL: overleaf.com/project/<this>. Without a paid plan, see the four capability tiers below; local compile needs no Overleaf account.


What it does

vibeTeX pulls an Overleaf project over the official Git bridge, lets the model read and edit files, compiles to PDF with a local TeX install or a self-hosted CLSI, parses the compile log into file and line diagnostics, checks references and citations, and pushes the result back to Overleaf. It detects four capability tiers at startup, from the paid Overleaf Git token down to an experimental free-tier path, and exposes only the tools that will work in your environment. It runs over stdio or Streamable HTTP, and can be self-hosted as an OAuth 2.1 remote for claude.ai.

What you can do

  • Pull, edit, compile, push. "Pull my thesis, fix the undefined references in chapter 3, recompile, and push." vibeTeX pulls over the Git bridge, edits the files, runs latexmk, and pushes the commit back to Overleaf.
  • Compile and read the log. latex_compile builds the PDF; latex_log returns the parsed errors and warnings (file, line, message) so the model can fix the build.
  • Check before submission. latex_check_refs finds undefined \ref/\cite keys, missing citations, and duplicate labels; latex_lint runs chktex; latex_outline returns the document structure; latex_word_count counts words with texcount, excluding markup.
  • Draft, then hand off. Generate LaTeX and overleaf_create_project opens it as a new Overleaf project through the official "Open in Overleaf" flow. No token is required.
  • Inspect history and diffs. overleaf_history, overleaf_status, and overleaf_diff show what changed in the working copy and in the project history.
  • Flatten for submission. latex_flatten inlines every \input/\include/\subfile into one .tex file, for arXiv or any single-file export.
  • Find the right tool. 26 overleaf_* / latex_* tools with structured output. overleaf_whoami reports which tiers are active and latex_search_tools searches the tool catalog by keyword.

The four capability tiers

vibeTeX detects what your environment can do and exposes only those tools. Run overleaf_whoami to see which tiers are active.

  1. Git bridge (official; requires a paid Overleaf Git authentication token). Full read/write of every file plus history, over Overleaf's official Git integration. Set OVERLEAF_GIT_TOKEN and OVERLEAF_PROJECT_ID (or OVERLEAF_PROJECTS for several).
  2. Open in Overleaf (official; no auth). One-way: create a new project from LaTeX you generated. Always available, nothing to configure.
  3. Local / CLSI compile (no paid plan needed). Compile to PDF and parse logs with your local latexmk / tectonic / pdflatex, or point VIBETEX_CLSI_URL at a self-hosted CLSI. Works with no Overleaf account.
  4. Session cookie (unofficial; experimental; off by default). Gives free-tier Overleaf users list / pull / push / compile against their hosted projects. It is best-effort and a grey area under Overleaf's terms. You paste your own overleaf_session2 cookie; no password is stored. Enable with VIBETEX_EXPERIMENTAL_SESSION=true and OVERLEAF_SESSION_COOKIE=….

The experimental session tier is unofficial and may break at any time. It exists so free-tier users have a path. It is off by default; you opt in explicitly and supply your own cookie. Prefer the Git bridge (tier 1) whenever you have a paid Overleaf plan.

How it works

  1. Install: one npx command, or the .dxt for Claude Desktop.
  2. Connect: set your Overleaf Git token and project id, or use a local TeX install for compile only (no account needed).
  3. Ask: the model can now pull, edit, compile, check, and push your Overleaf project.

vibeTeX uses the official Overleaf Git bridge for read, write, and history; runs LaTeX locally (or against a CLSI) for compile and log parsing; uses the no-auth "Open in Overleaf" flow to create new projects; and, only if you opt in, a best-effort session-cookie path for free-tier accounts. Each tier is detected at startup and reported by overleaf_whoami.

Configuration

All configuration is via environment variables. The full list lives in src/config.ts; the essentials:

Variable Default Purpose
OVERLEAF_GIT_TOKEN none Tier 1. Overleaf Git authentication token (paid feature).
OVERLEAF_PROJECT_ID none Default 24-hex project id.
OVERLEAF_PROJECTS none alias=projectId,… to register several projects.
OVERLEAF_BASE_URL https://www.overleaf.com Overleaf web base (Server Pro: your site).
OVERLEAF_GIT_BASE_URL https://git.overleaf.com Git bridge base (Server Pro: <site>/git).
VIBETEX_EXPERIMENTAL_SESSION false Tier 4. Enable the unofficial session-cookie path.
OVERLEAF_SESSION_COOKIE none Your own overleaf_session2 cookie (tier 4 only).
VIBETEX_COMPILE_ENGINE auto auto|latexmk|tectonic|pdflatex|xelatex|lualatex.
VIBETEX_CLSI_URL none Self-hosted CLSI base for remote compile (tier 3).
VIBETEX_LATEX_TIMEOUT_SEC 120 Hard cap on a single compile run.
VIBETEX_READ_ONLY false Expose only read tools (recommended for public endpoints).
VIBETEX_ALLOW_DELETE false Must be true to expose file deletion.
VIBETEX_DATA_DIR OS data dir Where cloned projects / compile workdirs live.

For a shared or remote instance (OAuth, rate limits, metrics), see .env.example and the remote hosting docs.

Tools reference

26 tools, namespaced overleaf_* (project and sync) and latex_* (compile and quality). Discover them at runtime with latex_search_tools.

Discovery: overleaf_whoami · latex_search_tools

Project sync (Git bridge / session): overleaf_list_projects · overleaf_pull · overleaf_status · overleaf_push · overleaf_diff · overleaf_history · overleaf_list_files · overleaf_read_file · overleaf_write_file · overleaf_edit_file · overleaf_delete_file · overleaf_create_project · overleaf_download_zip

Compile (local / CLSI / session): latex_compile · latex_compile_plan · latex_log · latex_get_pdf

Quality: latex_outline · latex_check_refs · latex_lint · latex_format · latex_word_count · latex_bib · latex_flatten

Documentation

vibetex.dev has the quickstart, the four tiers, the tools reference, and the remote hosting guide.

Pricing

Self-hosting is free. The optional hosted remote at mcp.vibetex.dev/mcp, which lets claude.ai and other cloud clients connect without running anything locally, is a one-time €30 purchase for a license key that expires after one year. There is no subscription.

Contributing

Contributions of all kinds are welcome; see CONTRIBUTING.md and CODE_OF_CONDUCT.md. For security issues, see SECURITY.md.

Security

vibeTeX does not take or store your Overleaf password. The Git token and the optional session cookie you provide stay in your environment or local config. For public or remote deployments, run with VIBETEX_READ_ONLY=true and the OAuth layer enabled; see .env.example. Report vulnerabilities privately as described in SECURITY.md.

Acknowledgements

Built on the Model Context Protocol and the LaTeX toolchain (latexmk, tectonic, TeX Live). Interoperates with Overleaf via its official Git integration and "Open in Overleaf" flow.


vibeTeX is an independent open-source project and is not affiliated with, endorsed by, or sponsored by Overleaf or Digital Science. Overleaf® is a trademark of Digital Science.

MIT © 2026 Oscar Devos

About

MCP server for LaTeX and Overleaf projects: Git bridge, project sync and compile for Claude and any MCP client.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages