Configure Multi-Project Support via projects.json
masterIf you need to manage multiple Overleaf projects, use a projects.json file instead of environment variables. When using this method, omit the env block from your Claude Desktop configuration.
1. Create the projects.json file:
Place this file in the following location:
- Windows:
%APPDATA%\overleaf-mcp\projects.json - macOS / Linux:
~/.config/overleaf-mcp/projects.json(or$XDG_CONFIG_HOME/overleaf-mcp/projects.json)
File Content Format:
{
"projects": {
"default": {
"name": "Main Paper",
"projectId": "...",
"gitToken": "olp_..."
},
"thesis": {
"name": "PhD Thesis",
"projectId": "...",
"gitToken": "olp_..."
}
}
}2. Update Claude Desktop Config:
{
"mcpServers": {
"overleaf": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@mjyoo2/overleaf-mcp"]
}
}
}(Note: Remove cmd /c on macOS/Linux)
3. Usage:
Reference a specific project in tool calls using the projectName parameter (e.g., projectName: "thesis"). If omitted, the default entry is used. To use a custom path for the config file, set the OVERLEAF_PROJECTS_CONFIG environment variable.
{
"projects": {
"default": {
"name": "Main Paper",
"projectId": "...",
"gitToken": "olp_..."
},
"thesis": {
"name": "PhD Thesis",
"projectId": "...",
"gitToken": "olp_..."
}
}
}