latex-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LATEX_PROJECT_ROOT | Yes | Directory of the LaTeX project that this server instance manages. | |
| LATEX_MCP_HTTP_HOST | No | Loopback-only host for Streamable HTTP. Defaults to 127.0.0.1. | 127.0.0.1 |
| LATEX_MCP_HTTP_PATH | No | Path for the Streamable HTTP MCP endpoint. Defaults to /mcp. | /mcp |
| LATEX_MCP_HTTP_PORT | No | Port for Streamable HTTP. Defaults to 8000. | 8000 |
| LATEX_MCP_LOG_LEVEL | No | Set to info to show request lines while debugging. Request logging is hidden by default. | |
| LATEX_MCP_TRANSPORT | No | Transport to use. Supported values are stdio and streamable-http. Defaults to stdio. | stdio |
| LATEX_MCP_PUBLIC_URL | No | Optional publicly reachable origin. When set, protected-resource metadata advertises ${LATEX_MCP_PUBLIC_URL}${LATEX_MCP_HTTP_PATH}. | |
| LATEX_WORKSPACE_ROOT | No | Optional dedicated workspace root. When set, LATEX_PROJECT_ROOT must resolve below it. | |
| LATEX_MCP_AUTH0_ISSUER_URL | No | Auth0 issuer URL used when LATEX_MCP_HTTP_AUTHENTICATION is auth0. | |
| LATEX_MCP_HTTP_ALLOWED_HOSTS | No | Comma-separated allowed Host values for Streamable HTTP DNS-rebinding protection. Local defaults allow only 127.0.0.1, localhost, and ::1. | |
| LATEX_MCP_HTTP_AUTHENTICATION | No | Opt-in Streamable HTTP authentication mode. Set to auth0 to enable Auth0 resource-server token validation. | |
| LATEX_MCP_HTTP_ALLOWED_ORIGINS | No | Comma-separated allowed Origin values for Streamable HTTP DNS-rebinding protection. Local defaults allow only HTTP origins for loopback hosts. | |
| LATEX_MCP_AUTH0_JWKS_CACHE_SECONDS | No | Successful Auth0 JWKS cache lifetime in seconds. Defaults to 300; allowed range is 1-86400. | 300 |
| LATEX_MCP_AUTH0_RESOURCE_SERVER_URL | No | Auth0 API identifier and required JWT audience used when LATEX_MCP_HTTP_AUTHENTICATION is auth0. | |
| LATEX_MCP_MAX_CONCURRENT_TOOL_CALLS | No | Controls the maximum number of concurrent tool calls. The README states at most eight tool calls run concurrently. | |
| LATEX_MCP_HTTP_MAX_REQUEST_BODY_BYTES | No | Maximum HTTP request body size in bytes. Defaults to 2500000 and is capped at 8000000. | 2500000 |
| LATEX_MCP_MAX_CONCURRENT_COMPILATIONS | No | Controls local compilation slots. One active compilation is permitted by default. | 1 |
| LATEX_MCP_COMPILE_QUEUE_TIMEOUT_SECONDS | No | Queue timeout for waiting for a compilation slot. Defaults to zero, so excess requests fail immediately. | 0 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Manage only the configured local LaTeX project. Use project-relative paths. Compile a known .tex document with pdflatex, xelatex, or lualatex.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_filesC | List files and directories below a project-relative directory. |
| read_fileB | Read a bounded UTF-8 text file using a project-relative path. |
| write_fileB | Replace an existing project file. This never creates a new file. |
| create_fileB | Create a new project file and safe missing parent directories; never overwrite. |
| delete_fileB | Delete one project file. Directories and the project root cannot be deleted. |
| search_filesB | Find matching lines in bounded UTF-8 project files, optionally by extension. |
| compile_latexC | Compile a project .tex file with an allowlisted local TeX engine only. |
| get_compile_errorsA | Extract structured LaTeX errors and warnings from the latest build or log. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
Each tool has a clearly distinct file or LaTeX-build operation. The create_file/write_file boundary is explicitly documented, and list/read/delete/search/compile/error tools are unambiguous.
All tools follow a consistent snake_case verb_noun pattern, such as list_files, read_file, write_file, and compile_latex. No mixed casing or vague verb-only names appear.
Eight tools are well scoped for a LaTeX project file and compilation server. Each tool covers a necessary operation without redundant variants.
The surface covers file listing, reading, creation, replacement, deletion, and searching, plus LaTeX compilation and structured error extraction. This provides complete lifecycle coverage for the stated purpose with no obvious dead ends.