- Home
- MCP servers
- Overleaf
Overleaf
- javascript
6
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ghoshsrinjoy-overleaf-mcp": {
"command": "node",
"args": [
"/path/to/OverleafMCP/overleaf-mcp-server.js"
],
"env": {
"REDIS_URL": "YOUR_REDIS_URL",
"PROJECTS_FILE": "./projects.json",
"HISTORY_LIMIT_MAX": "200",
"OVERLEAF_TEMP_DIR": "./temp",
"DIFF_CONTEXT_LINES": "3",
"OVERLEAF_GIT_TOKEN": "YOUR_GIT_TOKEN",
"REQUEST_QUEUE_NAME": "overleaf-mcp-requests",
"REQUEST_TIMEOUT_MS": "120000",
"OVERLEAF_PROJECT_ID": "YOUR_PROJECT_ID",
"REQUEST_CONCURRENCY": "4",
"DIFF_MAX_OUTPUT_CHARS": "120000",
"HISTORY_LIMIT_DEFAULT": "20",
"OVERLEAF_GIT_AUTHOR_NAME": "Overleaf MCP",
"OVERLEAF_GIT_AUTHOR_EMAIL": "author@example.com"
}
}
}
}You set up the Overleaf MCP Server to give Claude and other MCP clients safe, structured access to Overleaf projects via Git. The server reads LaTeX sources, understands document structure, and lets AI agents fetch content, summarize sections, and reason about your papers without exposing raw tokens or compromising your repository. All work is coordinated through a Redis-backed queue to handle concurrency across multiple projects.
How to use
You will interact with the Overleaf MCP Server through an MCP client. Start by configuring one or more MCP server connections (see installation steps) and then use the available tools to list projects, read files, inspect sections, and review diffs. Typical workflows include: listing all configured projects, reading main.tex or other LaTeX sources, extracting specific sections by title, and requesting a project view that includes structure and recent changes. The server exposes these capabilities as MCP endpoints that your client can call in a sequence that fits your task, such as analysis, summarization, or targeted content retrieval.
Key usage patterns you’ll likely adopt: - List all configured projects to verify connections. - Read a file like main.tex to inspect current content. - Get the list of sections in a LaTeX document to understand structure. - Retrieve the content of a specific section by title to feed to an AI assistant. - Request a project status summary to understand the overall structure and recent activity.
How to install
Prerequisites you need before installation are: Node.js installed on your workstation or server, and a Redis instance available (local or remote). You also need a project configuration file that maps Overleaf projects to their Git tokens and IDs.
Step-by-step setup: - Copy the example project map to your working configuration file. - Edit the project map with your Overleaf project details, including the projectId and gitToken for each project. - Install dependencies for the MCP server. - Start a Redis instance. - Run the MCP server so it becomes reachable by MCP clients.
Configuration and environment
All tool calls are coordinated through a Redis-backed BullMQ queue. Per-project operations are serialized with Redis locks to ensure safe concurrent work. You can tune a number of environment variables to fit your environment. Common settings include paths, Redis connection details, queue naming, and history/diff preview preferences.
Key environment variables shown in the configuration include: PROJECTS_FILE, OVERLEAF_TEMP_DIR, REDIS_URL (or REDIS_HOST/REDIS_PORT/REDIS_PASSWORD/REDIS_DB), REQUEST_QUEUE_NAME, REQUEST_CONCURRENCY, REQUEST_TIMEOUT_MS, PROJECT_LOCK_TTL_MS, PROJECT_LOCK_RETRY_MS, PROJECT_LOCK_MAX_WAIT_MS, OVERLEAF_GIT_TOKEN, OVERLEAF_PROJECT_ID, HISTORY_LIMIT_DEFAULT, HISTORY_LIMIT_MAX, DIFF_CONTEXT_LINES, DIFF_MAX_OUTPUT_CHARS, OVERLEAF_GIT_AUTHOR_NAME, OVERLEAF_GIT_AUTHOR_EMAIL. These control where configuration data lives, how Redis is used, how many concurrent jobs you allow, and how much history and diff data you expose.
Security and operation notes
Do not expose real credentials beyond the configured Overleaf project tokens and IDs. Redis is used to manage queues and per-project locks to prevent conflicts. Ensure your Redis instance is secured and only reachable by trusted components. When you deploy in production, prefer isolated containers or dedicated servers to avoid cross-project interference and to simplify scaling.
Troubleshooting
If you encounter issues: check that your Redis service is running, verify container or server names if you use containerized setups, and confirm that your Overleaf tokens and project IDs are correct. Look for errors related to Redis connection, project not found, or token validation, and address them by correcting configuration values or restarting the affected services.
Next steps and enhancements
You can plan to add smarter section extraction, scale workers for large document sets, and extend parsing to support additional formats like Markdown or BibTeX. Consider securing cached repositories with encryption and adding CI tests to verify Redis and lock integrity as you grow.
Available tools
list_projects
List all configured projects.
list_files
List files in a project with an optional extension filter.
read_file
Read a specific file from the project.
get_sections
Get all sections from a LaTeX file.
get_section_content
Get content of a specific section by title.
list_history
Show recent git commits.
get_diff
Get a git diff between refs or the working tree.
edit_file
Write a file with optional commit/push and dry-run support.
status_summary
Get a comprehensive project status summary.