Connect AI Terminals (MCP)
Hand your LaTeX Agent projects to Claude Code, Cursor, and other AI terminals.
LaTeX Agent ships an MCP (Model Context Protocol) tool server: Claude Code, Cursor, and other AI terminals can read and write your project files, trigger cloud compiles and fetch the PDF, search literature, read your paper library, and process review comments — say "compile my paper" in the terminal and the loop completes end to end.
Prerequisite: API tokens are available to paid subscribers only (free/trial tiers cannot mint one).
Create a token under Profile → API Token (it looks like lxa_... and the plaintext is shown exactly once), ticking scopes per this table:
| Scope | Grants | Notes |
|---|---|---|
| project:write | Project file read/write (edit, overwrite, append) | Recommended default; the write foundation besides compile |
| compile:run | Trigger cloud compiles and fetch the PDF | Tick it separately for compiles (least-privilege recommendation) |
| papers:read | Read the paper library (listing and page-by-page text) | Not implied by project:write |
| review:read / review:write | Review comments read-only / reply and resolve | Tick when working through advisor comments; review:read to read, review:write to act |
Tokens can be revoked at any time; revocation takes effect immediately.
Pick one of the three mainstream setups (the domain below is generated from the site you are on — after copying, replace lxa_YOUR_TOKEN with your token):
claude mcp add --transport http latex-agent https://your-site/mcp --header "X-API-Key: lxa_YOUR_TOKEN"{
"mcpServers": {
"latex-agent": {
"url": "https://your-site/mcp",
"headers": {
"X-API-Key": "lxa_YOUR_TOKEN"
}
}
}
}{
"transport": "streamable-http",
"url": "https://your-site/mcp",
"headers": {
"X-API-Key": "lxa_YOUR_TOKEN"
}
}Authentication always goes through the X-API-Key header; do not use the web session's Bearer token.
Most tools need a project_id — it is the value of the ?project= parameter in the project URL in your browser (a short id); paste it to the AI. Then try saying:
Here is my project_id: <paste id>. List the project file structure first, make the opening of the introduction section more academic, then compile and give me the PDF link.
An API key is write access to the project's main branch — save a version on the web first before major changes, or have the AI snapshot a version before each big edit.
If a token leaks, revoke it from your profile immediately — it takes effect at once.
Compiles are long-running; some clients impose timeouts — just retry on timeout.
Team and shared projects are supported: tools follow your project role (viewer/commenter/editor/owner) and report clearly when a role is not enough; your API key's scopes still apply separately.
Related Documents