RobertoDure/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.
5f032e92584amcp-latex-server2.0.0 in pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
Top risks in plain words
- MEDIUMTools
create_from_template,create_latex_file,edit_latex_file,list_latex_filesread or write any file path by design: an agent steered by prompt injection can use them that way.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Give it only the folder it needs
create_from_template,create_latex_file,edit_latex_file,list_latex_filescan read or write any file path. Mount a single project folder, read-only where you can. - Turn off the tools you do not use
Most MCP clients let you disable single tools. If you do not need
create_from_template,create_latex_file,edit_latex_fileand 1 more, switch them off. - Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 8 tools, 2 resources. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
create_from_template, create_latex_file, edit_latex_file, get_latex_structure, get_template, read_latex_file and 1 moreNo tool was seen to: start other programs on the machine; connect to the internet or other hosts; read passwords, tokens or keys; read environment variables; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files6 tools · create_from_template, edit_latex_file, get_latex_structure +3
Not all three are present in the tools the scanner traced.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (10: 8 tools, 2 resources)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
create_from_templatetool Create a LaTeX document from a bundled template file.Filesoutside textReads/writes files
Create a LaTeX document from a bundled template file.
create_latex_filetool Create a new LaTeX document with specified content and structure.FilesReads/writes files
Create a new LaTeX document with specified content and structure.
edit_latex_filetool Edit an existing LaTeX file by replacing, inserting, or appending content.Filesoutside textReads/writes files
Edit an existing LaTeX file by replacing, inserting, or appending content.
list_latex_filestool List all .tex files in a directory.Reads/writes files
List all .tex files in a directory.
get_templateresource Get the content of a specific template.Filesoutside text
Get the content of a specific template.
list_templatesresource List available LaTeX templates.
List available LaTeX templates.
compile_latextool Compile a LaTeX file to PDF using the specified engine.
Compile a LaTeX file to PDF using the specified engine.
get_latex_structuretool Extract document structure: class, title, author, packages, and section hierarchy.Filesoutside text
Extract document structure: class, title, author, packages, and section hierarchy.
read_latex_filetool Read and return the contents of a LaTeX file.Filesoutside text
Read and return the contents of a LaTeX file.
validate_latextool Perform LaTeX syntax validation (structure, braces, environments, references).Filesoutside text
Perform LaTeX syntax validation (structure, braces, environments, references).
Text the model reads (10)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
create_latex_file tool
Create a new LaTeX document with specified content and structure.
create_from_template tool
Create a LaTeX document from a bundled template file.
edit_latex_file tool
Edit an existing LaTeX file by replacing, inserting, or appending content.
read_latex_file tool
Read and return the contents of a LaTeX file.
list_latex_files tool
List all .tex files in a directory.
validate_latex tool
Perform LaTeX syntax validation (structure, braces, environments, references).
get_latex_structure tool
Extract document structure: class, title, author, packages, and section hierarchy.
compile_latex tool
Compile a LaTeX file to PDF using the specified engine.
list_templates resource
List available LaTeX templates.
get_template resource
Get the content of a specific template.
What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 10 tool handlers traced
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 10 tool handlers traced
- Reads or writes any file path MEDIUM6 findings in create_from_template, create_latex_file, edit_latex_file, list_latex_files
- Requests any addressNo tool sends a request to an address the caller supplies — 10 tool handlers traced
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 10 tool handlers traced
- Tools that start processesNot seen in the traced code of 10 capabilities; 10 more call code the scanner could not follow, where it may happen
- Tools that touch files7 of 10 capabilities touch files; 3 more call code the scanner could not follow, where it may happen
- Tools that call the networkNot seen in the traced code of 10 capabilities; 10 more call code the scanner could not follow, where it may happen
Where the code is: 10 handlers in 1 file at commit 5f032e92584a
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests2 manifests: pyproject.toml, requirements.txt
- Lockfiles checked against OSV1 file resolved and checked against the OSV database; 2 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked; requirements.txt: 2 dependency lines carry no exact version, so the installed version was not checked; pin them or add a lockfile
- Known vulnerabilities in production dependenciesNo production dependency with a known advisory
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK versionmcp >=1.9.4
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 10 capabilities; 10 more call code the scanner could not follow, where it may happen
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | mcp >=1.9.4 |
| Servers in the code | 1 (latex-server) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-11-12 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 4 catalogs (github_search, glama, mcp_toplist, mcpservers_org) |
|---|---|
| License | not stated |
| Created | 2025-06-22 |
| Topics | latex mcp-server pdf pydantic python |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.