Is the Overleaf MCP server safe? What it can reach
What the Overleaf MCP server can read, write and delete, how it signs in, and how to limit it in Claude Code and Codex.
Overleaf has no official MCP server that we found. This covers mjyoo2’s OverleafMCP, a community server that runs locally and reaches a project through Overleaf’s Git integration with a Git token. It can read LaTeX files and write them back with a commit. The README says the token gives full read and write access.
Who maintains it
| Implementation | Kind | Status |
|---|---|---|
| mjyoo2/OverleafMCP, npm @mjyoo2/overleaf-mcp (community, last push May 2026) | Community | active |
It runs as a local process on your machine.
How it signs in
An Overleaf Git token plus the project ID. The server acts with that token’s access to the project, and the README says it grants full read and write access.
What its tools can do
| Kind | Tools |
|---|---|
| Read | list_projects, list_files, read_file, get_sections, get_section_content, status_summary |
| Write | write_file, write_section |
| Can’t be undone | none documented |
write_file replaces a whole file and takes a required commit message. The README says paths are restricted to the cloned project directory.
Built-in limits
| Option | What it does |
|---|---|
OVERLEAF_GIT_TOKEN_FILE | Reads the token from a file instead of putting it in the client config. |
Project selection | OVERLEAF_PROJECT_ID names the project for single-project setups. A projects.json file can list several, and each tool takes an optional projectName. |
Path restriction | The README says traversal with .. and absolute paths are rejected. |
The risks
- write_file replaces a whole file in your manuscript, and an injected instruction in a file the agent reads could make it overwrite your own text.
- The README says the Git token grants full read and write access to the project and documents no read-only option, so any agent holding it can write.
- Anyone who can see the client config can read the token if you inline it. Use OVERLEAF_GIT_TOKEN_FILE instead.
Limit it in Claude Code
Add it from the documented launch settings, at local or user scope so a token never lands in a shared .mcp.json:
claude mcp add --env OVERLEAF_PROJECT_ID=... --env OVERLEAF_GIT_TOKEN=... overleaf -- npx -y @mjyoo2/overleaf-mcpClaude Code names MCP tools mcp__overleaf__<tool>. Deny rules win over ask rules, and ask rules over allow rules. Put these in ~/.claude/settings.json or the project’s .claude/settings.json:
{
"permissions": {
"ask": [
"mcp__overleaf__write_file",
"mcp__overleaf__write_section"
]
}
}Limit it in Codex
Codex reads MCP servers from ~/.codex/config.toml. disabled_tools removes tools, and enabled_tools keeps only the ones you list:
[mcp_servers.overleaf]
command = "npx"
args = ["-y", "@mjyoo2/overleaf-mcp"]
env_vars = ["OVERLEAF_PROJECT_ID", "OVERLEAF_GIT_TOKEN"]Checklist
- Use OVERLEAF_GIT_TOKEN_FILE instead of an inline token.
- Point it at one project, not several.
- Keep approval on for write_file and write_section.
- Delete the Git token in your Overleaf account settings when you finish.
Checked against the vendor documentation on November 25, 2026. mjyoo2/OverleafMCP README · mjyoo2/OverleafMCP repository
What Excellent covers
Excellent doesn’t inspect MCP servers themselves. Its free scan reads supported logs on the Mac (Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code) and reports findings for review, so you can see what an agent did after a session. Run the free scan · See a sample report · How to vet any MCP server
Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Pro is US-only for now. Agent coverage · Pricing