
robertodure/mcp-latex-server
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
고급 LaTeX 파일 생성, 편집 및 관리 기능을 제공하는 포괄적 인 Model Context Protocol (MCP) 서버.
개요
LaTeX 파일 생성, 편집, 검증 및 컴파일을 위한 Model Context Protocol (MCP) 서버. FastMCP 및 Pydantic을 내장하여 유형 안전, 구조 출력. - 매개변수 또는 번들 템플릿 (입자, 빔, 보고서)의 LaTeX 문서 - 대체, 삽입, 부트 및 사전 처리 작업이있는 파일 - 안전한 기본 디렉토리 내의 .tex 파일 - 구문 - 버팀대, 환경, 참조, 필수 선언 - PDFlatex, xelatex 또는 lualatex - - - 유액을 통해 번들 템플릿 검색 및 검색 한국어 - - ( 컴파일용) : - Windows : MiKTeX 또는 TeX Live - macOS : MacTeX (brew install --cask mactex) - Linux : sudo apt install texlive-full (Debian / Ubuntu) 또는 sudo dnf install texlive-scheme-full (Fedora) 이 체크 파이썬 버전, 의존성을 설치하고 서버가 올바르게 가져올 수 있으며 선택적으로 Claude 데스크톱을 구성합니다. 서버는 단일 환경 변수를 사용합니다: 도구로 전달된 모든 파일 경로는 이 기본 디렉토리에 상대를 해결합니다.
개요(AI 번역)
LaTeX 파일 생성, 편집, 검증 및 컴파일을 위한 Model Context Protocol (MCP) 서버. FastMCP 및 Pydantic을 내장하여 유형 안전, 구조 출력.
특징
- Create LaTeX 문서 매개 변수 또는 번들 템플릿 (입자, 빔, 보고서)
- Edit 파일과 교체, 삽입, 추가 및 사전 처리 작업
-Read andlist
.tex안전한 기본 디렉토리 내 파일 - Validate 구문 - braces, 환경, 참조, 필수 선언
- **
pdflatex,xelatex], 또는lualatex로 PDF로 컴파일 ** -Resources -latex://를 통해 번들 템플릿을 검색 및 검색 한국어
필수품
- 피스톤 3.11.9+
- LaTeX 배포 ( 컴파일용):
- Windows: MiKTeX 또는 TeX 라이브
- macOS: MacTeX ([T5]])
- 리눅스:
sudo apt install texlive-full(Debian/Ubuntu) 또는sudo dnf install texlive-scheme-full(페도라)
설치
uv 사용 (추천)
pip 사용
빠른 설정 (Windows)
이 체크 파이썬 버전, 의존성을 설치하고 서버가 올바르게 가져올 수 있으며 선택적으로 Claude 데스크톱을 구성합니다.
구성
서버는 단일 환경 변수를 사용합니다:
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
MCP LaTeX Server
A Model Context Protocol (MCP) server for LaTeX authoring: create and edit documents, analyze multi-file projects, validate structure and references, run quality checks, inspect PDFs, and compile to PDF. Built with FastMCP/MCPServer and Pydantic for structured tool output.
Highlights
- Author article, report, book, letter, beamer, and minimal documents.
- Transact multiple edits atomically, snapshot and restore files, and edit named sections.
- Build custom templates with YAML metadata and double-brace variables.
- Analyze multi-file projects: includes, labels, references, bibliographies, and duplicate labels.
- Compile single files or whole projects with bibtex/biber sequencing, conditional reruns, timeouts, and optional latexmk.
- Check braces, environments, references, word counts, TODOs, chktex, latexindent, and spelling.
- Inspect PDF metadata, page counts, text, and optional page renders.
- Support MCP Python SDK 1.x and 2.x.
Requirements
- Python 3.11.9+
- MCP Python SDK 1.x or 2.x: mcp[cli]>=1.9.4
- LaTeX distribution for compilation only:
- Windows: MiKTeX or TeX Live
- macOS: MacTeX
- Linux: texlive-full or texlive-scheme-full
- Optional external tools, detected at runtime:
- chktex, latexindent, hunspell or aspell
- latexmk, bibtex, biber
- poppler utilities (pdftoppm) for PDF page rendering
- Python dependencies: pydantic, pyyaml, pypdf.
Editing, reading, listing, validation, project analysis, word counts, and PDF reading do not require LaTeX to be installed. Tools that need an external binary report available=false or a clear install hint instead of failing the server.
Installation
Using uv
git clone https://github.com/RobertoDure/mcp-latex-server
cd mcp-latex-server
uv venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"
Using pip
git clone https://github.com/RobertoDure/mcp-latex-server
cd mcp-latex-server
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate
pip install -e ".[dev]"
Quick setup
python scripts/quick_setup.py
The setup script checks Python, installs dependencies, verifies the server, and optionally writes a Claude Desktop configuration. Existing configs are backed up and malformed JSON is left untouched.
Entry points
After installation, launch the server with any of:
mcp-latex-server
python -m mcp_latex_server
python latex_server.py # compatibility shim
The canonical packaged entry point is mcp-latex-server. The root latex_server.py stays as a compatibility shim for existing MCP client configurations.
Docker
A container image is included for the server runtime. It does not include a TeX distribution; extend the image or mount a TeX installation if you need compilation inside the container.
docker build -t mcp-latex-server .
docker run --rm -i \
설치
docker run --rm -i \설정
{
"mcpServers": {
"latex-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-latex-server",
"run",
"mcp-latex-server"
],
"env": {
"LATEX_SERVER_BASE_PATH": "/path/to/your/latex/files"
}
}
}
}