C2MV's picture
πŸš€ Deploy LaTeX MCP Server v2.0 β€” 7 tools (Modules A-F)
b16049c verified
raw
history blame contribute delete
575 Bytes
import { compileLaTeX } from "./dist/latex-compiler.js";
import fs from "fs/promises";
import path from "path";
async function test() {
const baseDir = path.join(process.cwd(), "temp_projects", "test_mcp_1");
await fs.mkdir(baseDir, { recursive: true });
await fs.writeFile(path.join(baseDir, "main.tex"), `
\\documentclass{article}
\\begin{document}
Hello MCP Server! This is an automated LaTeX test compiled using XeLaTeX.
\\end{document}
`);
console.log("Compiling LaTeX to PDF...");
const res = await compileLaTeX(baseDir);
console.log(res);
}
test();