overleaf-claude-mcp
overleaf-claude-mcp
Claude를 Overleaf 계정에 연결하세요. Claude는 프로젝트를 나열하고, 하나를 선택하고, LaTeX 및 그림을 읽고, 파일을 편집하고, 컴파일하고, PDF를 다시 가져올 수 있습니다.
Overleaf는 무료 요금제에서 공개 API를 제공하지 않습니다. Git 브리지와 Dropbox 동기화는 프리미엄 기능입니다. 따라서 이 서버는 Overleaf 웹 앱이 사용하는 것과 동일한 내부 HTTP 및 소켓 엔드포인트를 사용하며, 한 번 생성한 브라우저 세션으로 인증합니다. 모든 엔드포인트는 Overleaf 자체 JavaScript 번들에서 읽어낸 다음 실제 계정으로 테스트했습니다. 검증된 엔드포인트를 참조하세요.
튜토리얼
필요한 것
Node 20 이상 (
node -v)Chrome 또는 Edge 설치
Overleaf 계정 (무료 요금제로 충분)
Claude Code (
claude --version) 또는 Claude Desktop
1단계: 설정 실행
이 폴더에서 Windows의 경우:
setup.cmdmacOS 또는 Linux의 경우:
./setup.sh설정은 다섯 단계를 실행하고 각 단계를 출력합니다:
의존성 설치
dist/로 빌드작동하는 Overleaf 세션이 있는지 확인합니다. 없으면 Overleaf 로그인 페이지가 브라우저 창으로 열립니다.
연결이 작동하는지 증명하기 위해 실제 프로젝트 하나를 다시 읽습니다.
서버를 Claude Code에 등록할지 제안합니다.
2단계: 브라우저가 열리면 로그인
브라우저 창은 실제 Chrome입니다. 2FA를 포함해 평소와 같은 방식으로 로그인하세요. 어떤 것도 비밀번호를 대신 입력하지 않으며, 비밀번호는 절대 읽거나 저장되지 않습니다.
프로젝트 목록에 도달하면 창이 자동으로 닫히고 설정이 계속됩니다. 세션 쿠키는 ~/.overleaf-claude-mcp/session.json에 저장됩니다.
이 파일은 Overleaf 계정에 대한 전체 액세스 권한과 동일합니다. gitignore 처리되며 0600 권한으로 저장됩니다. 공유하거나 커밋하지 마세요.
3단계: 설정이 서버를 등록하도록 하기
5단계에서 프롬프트가 표시됩니다:
Register this server with Claude Code now? [y/N]y라고 답하면 다음이 실행됩니다:
claude mcp add overleaf -- node C:/CoolYEAH/overleaf-claude-mcp/dist/index.js건너뛰었거나 다른 클라이언트를 사용한다면 직접 등록하세요. Claude Code의 경우 위 명령을 실행하세요. Claude Desktop의 경우 Windows에서는 %APPDATA%\Claude\claude_desktop_config.json을(를), macOS에서는 ~/Library/Application Support/Claude/claude_desktop_config.json을(를) 편집하세요:
{
"mcpServers": {
"overleaf": {
"command": "node",
"args": ["C:/CoolYEAH/overleaf-claude-mcp/dist/index.js"]
}
}
}4단계: Claude 다시 시작
MCP 서버는 시작 시에만 인식됩니다. Claude Code 또는 Claude Desktop을 종료하고 다시 여세요.
로드되었는지 확인하세요:
claude mcp listoverleaf가 연결됨으로 표시되어야 합니다. Claude Code 세션에서 /mcp도 동일하게 표시됩니다.
5단계: 사용하기
평범한 언어로 요청하기만 하면 됩니다. Claude가 도구를 직접 선택합니다.
List my Overleaf projectsSelect the Efficient Reasoning projectRead sections/methodology.texIn sections/results.tex, change "Table 1" to "Table~\ref{tab:main}"Compile it and tell me what the LaTeX errors areShow me figures/fig1.pngSave the compiled PDF to C:/tmp/paper.pdf프로젝트를 한 번 선택하면 그 상태가 유지됩니다. 선택 항목은 ~/.overleaf-claude-mcp/state.json에 저장되어 다시 시작한 후에도 유지되므로, 전환하기 전까지 이후의 모든 요청은 해당 프로젝트에 적용됩니다. 전환하지 않고 한 번의 요청으로 다른 프로젝트를 작업하려면 이름을 지정하세요: "my thesis 프로젝트에서 main.tex을 읽어줘".
Related MCP server: claudeleaf
트리거 방법
슬래시 명령도 입력할 내용도 없습니다. Claude는 도구 설명을 읽고 요청이 일치하면 도구를 호출합니다. Overleaf 또는 이미 선택한 프로젝트나 파일을 언급하기만 하면 됩니다.
Claude가 도구를 사용하지 않는다면 일반적인 원인은 등록 후 다시 시작하지 않았거나 아직 선택된 프로젝트가 없는 것입니다. 확인하려면 "선택된 Overleaf 프로젝트가 무엇인가요?"라고 물어보세요.
도구
도구 | 용도 |
| 프로젝트를 나열하고 선택된 것을 표시 |
| id 또는 이름으로 활성 프로젝트 선택 |
| 선택된 프로젝트 표시 |
| 전체 파일 및 폴더 트리 |
| LaTeX 또는 기타 텍스트 파일 읽기 |
| 그림을 인라인으로 보기 |
| PDF를 포함한 모든 파일을 로컬에 저장 |
| 프로젝트 전체에서 정규식 검색 |
| 텍스트 파일 생성 또는 덮어쓰기 |
| 파일 내 정확한 문자열 교체 |
| 그림과 같은 로컬 파일 업로드 |
| 폴더 및 누락된 상위 폴더 생성 |
| 파일 또는 폴더 이름 바꾸기 |
| 파일 또는 폴더 이동 |
| 항목 삭제, |
| 서버 측 컴파일 |
| 컴파일하고 파싱된 LaTeX 오류 반환 |
| 컴파일하고 PDF 저장 |
| 컴파일된 단어 수 |
overleaf_select_project는 프로젝트 id 또는 프로젝트 이름의 일부를 받습니다. 이름이 둘 이상의 프로젝트와 일치하면 추측하지 않고 후보를 나열합니다. overleaf_delete는 confirm이 true가 아니면 실행되지 않으므로 Claude가 실수로 파일을 삭제할 수 없습니다.
문제 해결
"No Overleaf session at ..." — 아직 로그인하지 않았거나 세션이 만료되었습니다. npm run login 또는 setup.cmd를 다시 실행하세요.
Claude가 도구를 인식하지 못합니다 — 등록 후 Claude를 다시 시작하지 않았습니다. claude mcp list를 확인하세요.
도구가 갑자기 실패합니다 — Overleaf가 엔드포인트를 변경했을 수 있습니다. npm run recon을 실행하세요. 이 명령은 각 엔드포인트를 읽기 전용으로 검사하고 정확히 어떤 호출이 실패했는지 알려줍니다.
Claude 없이 터미널에서 설정을 확인하세요:
npm run read -- "Efficient Reasoning"일치하는 프로젝트의 파일 트리와 모든 섹션 제목을 출력합니다. 단일 파일을 덤프하려면 경로를 추가하세요:
npm run read -- "Efficient Reasoning" sections/methodology.tex언제든 설정을 다시 실행하세요. 작동하는 세션을 재사용하고 연결을 다시 확인하므로 상태 점검 역할도 합니다.
작동 방식
파일 트리는 Overleaf의 소켓 연결에서 가져옵니다. 엔티티 id를 제공하는 유일한 소스이고, 쓰기에는 id가 필요하기 때문입니다. 핸드셰이크는 GET /socket.io/1/?projectId=<id>이며, 이는 socket.io 0.9 프레이밍입니다. 그러면 서버가 rootFolder, 문서 id, 파일 해시를 포함한 전체 프로젝트와 함께 joinProjectResponse를 푸시합니다. 트리는 OVERLEAF_TREE_TTL_MS(기본값 15초) 동안 캐시되며 모든 쓰기 후 무효화됩니다.
텍스트 파일은 문서별로 읽히므로 읽기는 항상 현재 상태를 반영합니다. overleaf_grep은 대신 프로젝트 아카이브를 읽기 때문에 전체 프로젝트 검색은 파일당 한 번이 아니라 요청 한 번으로 처리됩니다.
쓰기는 업로드 엔드포인트를 통해 이루어집니다. 기존 이름 위에 업로드하는 것은 제자리 업데이트입니다. 엔티티 id가 보존되므로 Overleaf 기록과 문서의 다른 사용자도 계속 작동합니다. 누락된 상위 폴더가 먼저 생성됩니다.
검증된 엔드포인트
실제 계정으로 라이브 확인되었으며, 추측이 아닙니다:
작업 | 호출 | 비고 |
프로젝트 목록 |
|
|
CSRF |
|
|
새 프로젝트 |
|
|
파일 트리 |
|
|
경로만 |
| 저렴함, id 없음 |
문서 읽기 |
| 일반 텍스트 |
바이너리 읽기 |
| 해시는 트리에서 가져옴 |
아카이브 |
| grep에 사용 |
생성 또는 덮어쓰기 |
| multipart, 필드 |
문서/폴더 생성 |
| 본문 |
이름 바꾸기 |
| 204 |
이동 |
| 204, 본문 |
삭제 |
| 204 |
컴파일 |
|
|
단어 수 |
|
:type은 doc, file 또는 folder입니다.
스크립트
명령 | 설명 |
| 처음부터 전체 설정 |
| 동일하되 의존성이 설치되어 있다고 가정 |
| 인증만 다시 수행 |
| 터미널에서 프로젝트 검사 |
| 모든 엔드포인트를 읽기 전용으로 점검 |
| 임시 프로젝트에서 엔드투엔드 쓰기 테스트 |
|
|
npm run smoke는 claude-mcp-smoketest라는 프로젝트를 만든 다음 쓰기, 덮어쓰기, 이미지 업로드, 이름 바꾸기, 이동, 삭제, 컴파일을 실행합니다. 검사할 수 있도록 프로젝트를 계정에 남겨 둡니다. 작업이 끝나면 휴지통에 버리세요.
구성
모두 선택 사항입니다. .env.example을 참조하세요.
변수 | 기본값 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
제한 사항
이 중 어떤 것도 지원되는 API가 아니며 Overleaf는 언제든 이를 변경할 수 있습니다. 자신의 계정에만 사용하세요. 실시간 공동 편집은 구현되어 있지 않습니다. 쓰기는 문자 단위 연산을 보내는 대신 문서 전체를 교체하므로, 다른 사람이 입력하는 동안 파일에 쓰지 마세요.
Available Tools
19 toolsoverleaf_compileCompile the projectB
Run a server-side LaTeX compile and report status plus output files.
Inputs: draft, projectId, stopOnFirstError.
overleaf_compile_logCompile and read the logB
Compile the project and return parsed LaTeX errors and warnings.
Inputs: projectId.
overleaf_create_folderCreate a folderC
Create a folder, including any missing parents.
Inputs: folderPath (required), projectId.
overleaf_current_projectShow active projectA
Report which Overleaf project is currently selected.
Inputs: no named parameters.
overleaf_deleteDelete an entryB
Delete a file or folder from the project. Requires confirm to be true.
Inputs: confirm (required), filePath (required), projectId.
overleaf_download_fileDownload a fileC
Save any project file, including PDFs and images, to a local path.
Inputs: destPath (required), filePath (required), projectId.
overleaf_download_pdfDownload the compiled PDFA
Compile the project and save the resulting PDF locally.
Inputs: destPath (required), projectId.
overleaf_edit_fileEdit a text fileC
Replace an exact string inside a project file.
Inputs: filePath (required), newString (required), oldString (required), projectId, +1 more.
overleaf_grepSearch the projectA
Regex search across every text file in the project.
Inputs: pattern (required), flags, projectId, maxMatches.
overleaf_list_filesList project filesC
List every file and folder in the project.
Inputs: refresh, projectId.
overleaf_list_projectsList Overleaf projectsB
List projects on the signed-in Overleaf account.
Inputs: includeArchived.
overleaf_moveMove an entryB
Move a file or folder into another folder.
Inputs: filePath (required), destFolder (required), projectId.
overleaf_read_fileRead a text fileA
Read a LaTeX or other text file. Long files are truncated; use startLine and endLine to page through them.
Inputs: filePath (required), endLine, projectId, startLine.
overleaf_read_imageView an imageA
Fetch an image from the project so it can be viewed directly.
Inputs: filePath (required), projectId.
overleaf_renameRename an entryB
Rename a file or folder in place.
Inputs: newName (required), filePath (required), projectId.
overleaf_select_projectSelect active projectA
Choose the project every other tool works on. Accepts a project id or part of a project name.
Inputs: query (required).
overleaf_upload_fileUpload a local fileB
Upload a local file, such as a figure, into the project.
Inputs: filePath (required), localPath (required), projectId.
overleaf_word_countWord countC
Return the compiled word count for the project.
Inputs: projectId.
overleaf_write_fileWrite a text fileA
Create or overwrite a text file in the project. Missing parent folders are created.
Inputs: content (required), filePath (required), projectId.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools have distinct purposes (listing, reading, writing, compiling), but the three compile-related tools (overleaf_compile, overleaf_compile_log, overleaf_download_pdf) overlap in that they all trigger a compile, differing only in output handling. Similarly, read_file/read_image/download_file are distinct but share a 'get content' theme, though descriptions clarify their intended use.
All tools share the overleaf_ prefix and most follow a clear verb_noun pattern (e.g., list_projects, write_file, create_folder). Minor deviations exist: overleaf_current_project uses an adjective, overleaf_grep is just a verb, and overleaf_compile_log compounds nouns, but the overall style remains coherent and predictable.
With 19 tools, the set is slightly above the ideal 3-15 range but remains well-scoped for Overleaf's functionality, covering project selection, file operations, compilation, and reporting. Each tool adds value for typical LaTeX workflows, so the count feels justified rather than bloated.
The toolset covers the core workflow of selecting a project, editing files, uploading/downloading, and compiling with log and PDF output. Obvious gaps include lack of project creation or deletion (only listing/selecting existing projects), which may limit full lifecycle management but is not fatal for editing-focused use.
Maintenance
Related MCP Connectors
Edit your Overleaf LaTeX projects from Claude and ChatGPT; every change is a real Git commit.
Persistent AI LaTeX workspace: edit and compile multi-file projects, export publication-ready PDFs.
A hosted LaTeX editor your assistant can actually use. Search 1,019 free templates, create and edit projects, and compile them to PDF on a real TeX Live farm, getting back the PDF or the compile log when a build fails. Thirteen tools behind OAuth 2.1, with nothing to install and nothing to run locally.
- platform7nDeprecatedtech.p7n
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables editing Overleaf projects from Claude, with tools to list, read, edit, and sync files via Git.21 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude and AI agents to read and edit Overleaf documents in real time, with support for project listing, document manipulation, LaTeX compilation, and live collaboration.445 npm49MIT
- AlicenseNot gradedqualityBmaintenanceConnects Claude/ChatGPT to Overleaf projects via the Git integration, enabling read, edit, write, and file management through natural language commands.2AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables Claude, Cursor, or any MCP client to pull an Overleaf project, edit .tex files, check references, compile when a TeX binary is installed, and push changes back.MIT