Oleafly MCP
A LaTeX, Typst and Markdown editor with a local MCP server: an agent reads, edits and compiles the open project
- 1,181 ★ on the repository
- Last commit
- AGPL-3.0
Extended access
Why this level
- The agent reads, creates, renames and deletes files in the open project and can overwrite manuscripts if you approve an edit
- The token in `mcp.json` opens a local port while the server runs
Install
- Works in
Manual install
claude mcp add --transport http oleafly http://127.0.0.1:5323/mcp --header "Authorization: Bearer <token>"Turn the server on in the Oleafly settings first and take the token from there.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The agent reads, creates, renames and deletes files in the open project and can overwrite manuscripts if you approve an edit
- The token in `mcp.json` opens a local port while the server runs
This is third-party code. Review the repository files before installing.
What it does
Oleafly is a desktop editor for scientific writing in LaTeX, Typst and Markdown on macOS, Windows and Linux. It can act as an MCP server: any MCP client drives the project open in the editor with the same tools and the same approval prompts as the built-in assistant. No API key is needed inside Oleafly for that, the external client brings the model. The tools fall into groups. Orientation: `get_status`, `list_projects`, `open_project`, `list_files`, `project_map`, `search_project`. Reading: `read_file`, `get_log`, `get_pdf_text`, `verify_pdf_pages`. Editing: `write_file`, `replace_in_file`, `create_file`, `rename_file`, `delete_file`, `set_main_doc`. Build and figures: `compile`, `preview_figure`, `insert_figure`, `load_image`. The server listens on `127.0.0.1` only, runs while the app is open and requires a token from the settings.
Who it is for. Researchers and students who write papers and theses in LaTeX or Typst and want Claude Code or Codex to edit text inside their project.
Good fit when
- A paper does not compile and the agent should read the build log, find the error in the `.tex` file and fix it
- Before submission you want to find unresolved references and missing figures from the project map
- You want a TikZ or Typst figure from a description: the agent builds it, looks at the PNG and inserts it
- You already have a Claude subscription and do not want to pay for a separate API key for the editor
Not a fit when
- The project lives in Overleaf or another cloud and is not open in Oleafly: the server works with the open project only
- The app is closed or the computer is off: the server disappears with the editor process
- The agent has to run on a remote machine: the server listens on this computer only
Example request
Compile my project, read the log, fix the error in chapter 3 and show what changedMCP
- Transport
- http, stdio
- Authentication
- API key
Limitations
The project is in beta. The server is turned on manually under Settings, Integrations, Oleafly MCP, and the token lives in an `mcp.json` file next to the Oleafly data while the server runs; treat it as a local secret. The default port is 5323, and if it is busy another one is picked and remembered. Deleting files always requires a connected editor window. The license is AGPL-3.0. Building needs a compiler: Tectonic, Typst and Pandoc are built in, while a full TeX Live distribution has to be installed separately.
How to disable. Switch off Enable MCP server in the Oleafly settings or quit the app, then remove the oleafly block from the client config, for example `claude mcp remove oleafly`.
FAQ
How do I connect Oleafly to Claude Code?
Enable the server in the Oleafly settings and run `claude mcp add --transport http oleafly http://127.0.0.1:5323/mcp --header "Authorization: Bearer <token>"`. The live URL and token are shown in the same settings, and the port may differ from 5323.
Do I need an API key inside Oleafly?
No. The external app brings its own model and Oleafly gives it the project tools.
How do I connect Claude Desktop?
Claude Desktop prefers stdio, so a bridge via `mcp-remote` goes into `claude_desktop_config.json`: the `npx` command with `-y mcp-remote@latest`, the server URL, the Authorization header and `--transport http-only`.
Can the agent delete project files?
Yes, there is a `delete_file` tool, but deletion always goes through a connected editor window and follows the same approval prompts as the built-in assistant.
Which document formats are supported?
LaTeX, Typst and Markdown. `get_status` reports the document engine, and `preview_figure` and `insert_figure` work in LaTeX and Typst projects.
Discussion
No questions or reviews yet.
Related
MCP serversAn MCP server for Overleaf: the agent reads a LaTeX project over Git, finds sections and edits them with a commit
An Overleaf CLI that pulls LaTeX projects to a folder, pushes edits, compiles PDFs and exposes them to an agent through MCP
Overleaf MCP Server: LaTeX projects over Git
Overleaf MCP Server (YounesBensafia)
An agent reads and edits Overleaf project files through standard Git sync and pushes the changes to the project itself
Aldine is a self-hosted LaTeX editor with collaboration and git, whose built-in MCP lets Claude edit and typeset a document.
The OpenMarkdown plugin for Claude Code opens agent Markdown documents in a local editor and gives shared editing over MCP
A local MCP server for arXiv literature work: section-level paper reads, BibTeX from metadata, topic watches
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Oleafly (this card) | yes | API key | 1,181 | |
| Typst agent skills | no | 239 | skills for writing Typst documents, with no editor, compilation or control of an open project | |
| Overleaf Remote Skill | no | 120 | a skill for working with an Overleaf project rather than a local build in a desktop editor |
README in short
The text presents Oleafly as a live collaborative editor for research with local compilation, Git history, literature search and pre-submission checks. Agents get a separate mention: Claude Code, Codex and 12 more work inside the project, and the MCP server is documented in `docs/mcp.md`.