tex-mcp-web 0.8.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. tex_mcp_web-0.8.2/.claude-plugin/marketplace.json +11 -0
  2. tex_mcp_web-0.8.2/.github/workflows/publish.yml +80 -0
  3. tex_mcp_web-0.8.2/.github/workflows/tests.yml +29 -0
  4. tex_mcp_web-0.8.2/.gitignore +33 -0
  5. tex_mcp_web-0.8.2/AGENTS.md +1 -0
  6. tex_mcp_web-0.8.2/INSTALL.md +62 -0
  7. tex_mcp_web-0.8.2/LICENSE +22 -0
  8. tex_mcp_web-0.8.2/PKG-INFO +244 -0
  9. tex_mcp_web-0.8.2/README.md +211 -0
  10. tex_mcp_web-0.8.2/docs/configuration.md +36 -0
  11. tex_mcp_web-0.8.2/docs/overleaf.md +240 -0
  12. tex_mcp_web-0.8.2/docs/reviewing.md +156 -0
  13. tex_mcp_web-0.8.2/examples/demo-paper/.tex-mcp-web.yaml +6 -0
  14. tex_mcp_web-0.8.2/examples/demo-paper/main.tex +65 -0
  15. tex_mcp_web-0.8.2/plugin/.claude-plugin/plugin.json +5 -0
  16. tex_mcp_web-0.8.2/plugin/hooks/guide_gate.py +172 -0
  17. tex_mcp_web-0.8.2/plugin/hooks/hooks.json +33 -0
  18. tex_mcp_web-0.8.2/plugin/monitors/monitors.json +7 -0
  19. tex_mcp_web-0.8.2/plugin/monitors/review.sh +49 -0
  20. tex_mcp_web-0.8.2/pyproject.toml +90 -0
  21. tex_mcp_web-0.8.2/server.json +28 -0
  22. tex_mcp_web-0.8.2/tests/__init__.py +1 -0
  23. tex_mcp_web-0.8.2/tests/conftest.py +10 -0
  24. tex_mcp_web-0.8.2/tests/test_browser.py +4405 -0
  25. tex_mcp_web-0.8.2/tests/test_cli.py +233 -0
  26. tex_mcp_web-0.8.2/tests/test_comment_drafts.py +173 -0
  27. tex_mcp_web-0.8.2/tests/test_comment_edits.py +155 -0
  28. tex_mcp_web-0.8.2/tests/test_comments.py +947 -0
  29. tex_mcp_web-0.8.2/tests/test_compiler.py +534 -0
  30. tex_mcp_web-0.8.2/tests/test_completion.py +74 -0
  31. tex_mcp_web-0.8.2/tests/test_config.py +281 -0
  32. tex_mcp_web-0.8.2/tests/test_imaging.py +307 -0
  33. tex_mcp_web-0.8.2/tests/test_overleaf.py +304 -0
  34. tex_mcp_web-0.8.2/tests/test_overleaf_git.py +493 -0
  35. tex_mcp_web-0.8.2/tests/test_overleaf_live.py +1001 -0
  36. tex_mcp_web-0.8.2/tests/test_overleaf_ot.py +183 -0
  37. tex_mcp_web-0.8.2/tests/test_overleaf_sync.py +1370 -0
  38. tex_mcp_web-0.8.2/tests/test_page_token.py +121 -0
  39. tex_mcp_web-0.8.2/tests/test_plugin_hooks.py +130 -0
  40. tex_mcp_web-0.8.2/tests/test_server.py +3590 -0
  41. tex_mcp_web-0.8.2/tests/test_source_roots.py +182 -0
  42. tex_mcp_web-0.8.2/tests/test_structure.py +338 -0
  43. tex_mcp_web-0.8.2/tests/test_synctex.py +490 -0
  44. tex_mcp_web-0.8.2/tests/test_terms.py +136 -0
  45. tex_mcp_web-0.8.2/tests/test_translate.py +178 -0
  46. tex_mcp_web-0.8.2/tests/test_watcher.py +595 -0
  47. tex_mcp_web-0.8.2/tex_mcp_web/__init__.py +3 -0
  48. tex_mcp_web-0.8.2/tex_mcp_web/agent/init.md +104 -0
  49. tex_mcp_web-0.8.2/tex_mcp_web/cli.py +361 -0
  50. tex_mcp_web-0.8.2/tex_mcp_web/comment_drafts.py +123 -0
  51. tex_mcp_web-0.8.2/tex_mcp_web/comments.py +2281 -0
  52. tex_mcp_web-0.8.2/tex_mcp_web/compiler.py +534 -0
  53. tex_mcp_web-0.8.2/tex_mcp_web/completion.py +158 -0
  54. tex_mcp_web-0.8.2/tex_mcp_web/config.py +366 -0
  55. tex_mcp_web-0.8.2/tex_mcp_web/imaging.py +411 -0
  56. tex_mcp_web-0.8.2/tex_mcp_web/mcp_client.py +249 -0
  57. tex_mcp_web-0.8.2/tex_mcp_web/mcp_server.py +1375 -0
  58. tex_mcp_web-0.8.2/tex_mcp_web/overleaf.py +477 -0
  59. tex_mcp_web-0.8.2/tex_mcp_web/overleaf_git.py +384 -0
  60. tex_mcp_web-0.8.2/tex_mcp_web/overleaf_live.py +565 -0
  61. tex_mcp_web-0.8.2/tex_mcp_web/overleaf_ot.py +377 -0
  62. tex_mcp_web-0.8.2/tex_mcp_web/overleaf_sync.py +1519 -0
  63. tex_mcp_web-0.8.2/tex_mcp_web/page_token.py +62 -0
  64. tex_mcp_web-0.8.2/tex_mcp_web/plugin_monitor.py +79 -0
  65. tex_mcp_web-0.8.2/tex_mcp_web/server.py +3297 -0
  66. tex_mcp_web-0.8.2/tex_mcp_web/static/ace/LICENSE +24 -0
  67. tex_mcp_web-0.8.2/tex_mcp_web/static/ace/ace.js +23 -0
  68. tex_mcp_web-0.8.2/tex_mcp_web/static/ace/ext-language_tools.js +8 -0
  69. tex_mcp_web-0.8.2/tex_mcp_web/static/ace/ext-searchbox.js +8 -0
  70. tex_mcp_web-0.8.2/tex_mcp_web/static/ace/keybinding-vim.js +8 -0
  71. tex_mcp_web-0.8.2/tex_mcp_web/static/ace/mode-bibtex.js +8 -0
  72. tex_mcp_web-0.8.2/tex_mcp_web/static/ace/mode-latex.js +8 -0
  73. tex_mcp_web-0.8.2/tex_mcp_web/static/ace/mode-text.js +8 -0
  74. tex_mcp_web-0.8.2/tex_mcp_web/static/ace/theme-one_dark.js +8 -0
  75. tex_mcp_web-0.8.2/tex_mcp_web/static/ace/theme-textmate.js +8 -0
  76. tex_mcp_web-0.8.2/tex_mcp_web/static/embedpdf/LICENSE +21 -0
  77. tex_mcp_web-0.8.2/tex_mcp_web/static/embedpdf/LICENSE.pdfium +196 -0
  78. tex_mcp_web-0.8.2/tex_mcp_web/static/embedpdf/browser-BKLM0ThC-CkSOgtCM.js +1 -0
  79. tex_mcp_web-0.8.2/tex_mcp_web/static/embedpdf/direct-engine-BA2WfEti.js +1 -0
  80. tex_mcp_web-0.8.2/tex_mcp_web/static/embedpdf/embedpdf-7TNsu-EA.js +3 -0
  81. tex_mcp_web-0.8.2/tex_mcp_web/static/embedpdf/embedpdf.js +1 -0
  82. tex_mcp_web-0.8.2/tex_mcp_web/static/embedpdf/pdfium.wasm +0 -0
  83. tex_mcp_web-0.8.2/tex_mcp_web/static/index.html +347 -0
  84. tex_mcp_web-0.8.2/tex_mcp_web/static/style.css +1368 -0
  85. tex_mcp_web-0.8.2/tex_mcp_web/static/viewer.js +5379 -0
  86. tex_mcp_web-0.8.2/tex_mcp_web/structure.py +338 -0
  87. tex_mcp_web-0.8.2/tex_mcp_web/synctex.py +414 -0
  88. tex_mcp_web-0.8.2/tex_mcp_web/terms.py +485 -0
  89. tex_mcp_web-0.8.2/tex_mcp_web/translate.py +291 -0
  90. tex_mcp_web-0.8.2/tex_mcp_web/watcher.py +332 -0
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "tex-mcp-web",
3
+ "owner": {"name": "MiiKiyoshi"},
4
+ "plugins": [
5
+ {
6
+ "name": "tex-mcp",
7
+ "source": "./plugin",
8
+ "description": "Keeps an agent from using tex-mcp's tools, guide() aside, until this context has read the files guide() lists, and listens for Call agent from the session's start to its end"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,80 @@
1
+ name: publish
2
+
3
+ # A release goes to PyPI, then to the MCP Registry, at the version pyproject.toml names.
4
+ on:
5
+ release:
6
+ types: [published]
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-24.04
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: actions/setup-python@v5
14
+ with:
15
+ python-version: "3.13"
16
+ - name: Build
17
+ run: |
18
+ version=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
19
+ if [ "v$version" != "$GITHUB_REF_NAME" ]; then
20
+ echo "release $GITHUB_REF_NAME is not version $version"
21
+ exit 1
22
+ fi
23
+ pip install build
24
+ python -m build
25
+ - uses: actions/upload-artifact@v4
26
+ with:
27
+ name: dist
28
+ path: dist/
29
+
30
+ pypi:
31
+ needs: build
32
+ runs-on: ubuntu-24.04
33
+ environment: pypi
34
+ permissions:
35
+ id-token: write
36
+ steps:
37
+ - uses: actions/download-artifact@v4
38
+ with:
39
+ name: dist
40
+ path: dist/
41
+ - uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
42
+
43
+ mcp-registry:
44
+ needs: pypi
45
+ runs-on: ubuntu-24.04
46
+ permissions:
47
+ id-token: write
48
+ contents: read
49
+ env:
50
+ MCP_PUBLISHER_VERSION: v1.8.9
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ - uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
54
+ - name: Download and verify mcp-publisher
55
+ run: |
56
+ set -euo pipefail
57
+ archive="mcp-publisher_linux_amd64.tar.gz"
58
+ base_url="https://github.com/modelcontextprotocol/registry/releases/download/${MCP_PUBLISHER_VERSION}"
59
+ curl --fail --location --silent --show-error --output "$archive" "$base_url/$archive"
60
+ curl --fail --location --silent --show-error --output "$archive.sigstore.json" "$base_url/$archive.sigstore.json"
61
+ cosign verify-blob \
62
+ --bundle "$archive.sigstore.json" \
63
+ --certificate-identity "https://github.com/modelcontextprotocol/registry/.github/workflows/release.yml@refs/tags/${MCP_PUBLISHER_VERSION}" \
64
+ --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
65
+ "$archive"
66
+ tar xzf "$archive" mcp-publisher
67
+ rm -f "$archive" "$archive.sigstore.json"
68
+ - name: Publish
69
+ run: |
70
+ # server.json takes the version from pyproject.toml, as the package on PyPI does.
71
+ version=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
72
+ jq --arg v "$version" '.version = $v | .packages[0].version = $v' server.json > server.tmp
73
+ mv server.tmp server.json
74
+ ./mcp-publisher login github-oidc
75
+ # The registry reads the README from PyPI, which can take a moment to show the release.
76
+ for attempt in 1 2 3 4 5; do
77
+ ./mcp-publisher publish && exit 0
78
+ sleep 30
79
+ done
80
+ exit 1
@@ -0,0 +1,29 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ tests:
10
+ runs-on: ubuntu-24.04
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ python: ["3.10", "3.13"]
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: ${{ matrix.python }}
20
+ - name: LaTeX
21
+ run: |
22
+ sudo apt-get update
23
+ sudo apt-get install -y --no-install-recommends latexmk texlive-latex-base
24
+ - name: Python packages
25
+ run: pip install -e ".[dev]" marionette_driver
26
+ - name: Tests
27
+ run: |
28
+ firefox --version
29
+ python -m pytest -o addopts="" -q
@@ -0,0 +1,33 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ *.egg
8
+ .eggs/
9
+
10
+ # Testing
11
+ .coverage
12
+ htmlcov/
13
+ .pytest_cache/
14
+
15
+ # IDE
16
+ .vscode/
17
+ .idea/
18
+
19
+ # TeX auxiliary
20
+ *.aux
21
+ *.log
22
+ *.out
23
+ *.toc
24
+ *.synctex.gz
25
+ *.fdb_latexmk
26
+ *.fls
27
+
28
+ # Generated by the included demo
29
+ examples/demo-paper/main.pdf
30
+ examples/demo-paper/.tex-mcp-web/
31
+
32
+ # Scenario scripts and media sources for the README, kept off the repository
33
+ private/
@@ -0,0 +1 @@
1
+ Work directly on main; do not create task branches; after delivery, local and origin expose only main.
@@ -0,0 +1,62 @@
1
+ # Installing tex-mcp-web
2
+
3
+ This file is for the agent the user asked to install tex-mcp-web. Fetch it with
4
+ `curl -fsSL`, since a summarizing fetch drops the commands. Inspect first, show one summary,
5
+ install after the user agrees. On a machine that already has it, the same steps update it.
6
+
7
+ ## 1. Inspect (change nothing)
8
+
9
+ - Python 3.10 or newer (the `mcp` package has no release for older ones): `python3 --version`.
10
+ When older, `command -v python3.13 python3.12 python3.11 python3.10`. None: stop and tell
11
+ the user. Use the one found as `python3` below.
12
+ - LaTeX: `command -v latexmk`, and record its directory. Missing: tell the user a TeX
13
+ distribution is needed and stop. Do not install one.
14
+ - Install directory: `$HOME/.local/share/tex-mcp-web`, unless the user named another.
15
+ Note whether it already holds a checkout.
16
+ - Agents: `command -v claude` and `command -v codex`. Register with each one found.
17
+ - Existing registration: `claude mcp get tex-mcp`, `codex mcp get tex-mcp`. Note a
18
+ command path that differs from the one below. `claude plugin list` shows whether the
19
+ `tex-mcp` plugin is already installed, in which case its install below is skipped.
20
+
21
+ ## 2. Confirm
22
+
23
+ Show one summary, in the user's language: install directory (new or update), Python,
24
+ latexmk's directory, the agents to register with, and any existing registration that will
25
+ be replaced. Registration is user-level, available in every folder. Do not ask about
26
+ scope. Ask once.
27
+
28
+ ## 3. Install
29
+
30
+ DIR="$HOME/.local/share/tex-mcp-web"
31
+ git clone https://github.com/MiiKiyoshi/tex-mcp-web.git "$DIR" # update: git -C "$DIR" pull --ff-only
32
+ python3 -m venv "$DIR/.venv"
33
+ "$DIR/.venv/bin/pip" install -q -U pip # editable installs need a recent pip
34
+ "$DIR/.venv/bin/pip" install -e "$DIR"
35
+ "$DIR/.venv/bin/tex-mcp-web" mcp --check # lists the tools
36
+
37
+ ## 4. Register
38
+
39
+ Remove a registration the user agreed to replace (`claude mcp remove --scope user tex-mcp`,
40
+ `codex mcp remove tex-mcp`), then:
41
+
42
+ BIN="$DIR/.venv/bin"
43
+ P="$BIN:<latexmk directory>:/usr/bin:/bin"
44
+ claude mcp add --scope user tex-mcp -e PATH="$P" -- "$BIN/tex-mcp"
45
+ codex mcp add tex-mcp --env PATH="$P" -- "$BIN/tex-mcp"
46
+
47
+ For Claude Code, also install the plugin from the checkout. It refuses tex-mcp's tools other
48
+ than `guide()` and `setup_info()` until that context has read the files `guide()` lists, again
49
+ after each compaction. Its monitor makes a session started in the paper's folder listen for
50
+ Call agent from its start to its end, unless another session listens to that paper already,
51
+ so a press reaches the agent with no request to listen, however long the review page sits
52
+ idle. It loads from the checkout in place, so an update of the checkout updates it.
53
+
54
+ claude plugin marketplace add "$DIR"
55
+ claude plugin install tex-mcp@tex-mcp-web
56
+
57
+ ## 5. Tell the user
58
+
59
+ The server loads when an agent session starts, so this session cannot use it yet. Start
60
+ the agent again in the paper's folder, then say "do tex init" once per paper and
61
+ "do tex listen" to open the review page. With the plugin, Claude Code started in a folder
62
+ already set up listens on its own.
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 spinoza
4
+ Copyright (c) 2026 MiiKiyoshi
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
@@ -0,0 +1,244 @@
1
+ Metadata-Version: 2.5
2
+ Name: tex-mcp-web
3
+ Version: 0.8.2
4
+ Summary: LaTeX MCP server for paper review: comment on the PDF while an AI agent edits the source, with Overleaf sync.
5
+ Project-URL: Homepage, https://github.com/MiiKiyoshi/tex-mcp-web
6
+ Project-URL: Repository, https://github.com/MiiKiyoshi/tex-mcp-web
7
+ Author: MiiKiyoshi
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: agent,annotation,latex,mcp,mcp-server,overleaf,pdf,review,tex,viewer,watcher
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Text Processing :: Markup :: LaTeX
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: aiohttp>=3.9.0
22
+ Requires-Dist: httpx
23
+ Requires-Dist: mcp<2,>=1.0
24
+ Requires-Dist: pydantic>=2.0
25
+ Requires-Dist: pymupdf>=1.24.3
26
+ Requires-Dist: pyyaml>=6.0
27
+ Requires-Dist: watchdog>=3.0.0
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
30
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
31
+ Requires-Dist: pytest>=7.0; extra == 'dev'
32
+ Description-Content-Type: text/markdown
33
+
34
+ <img src="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/logo.png" alt="" width="96">
35
+
36
+ # tex-mcp-web
37
+
38
+ [![tests](https://github.com/MiiKiyoshi/tex-mcp-web/actions/workflows/tests.yml/badge.svg)](https://github.com/MiiKiyoshi/tex-mcp-web/actions/workflows/tests.yml)
39
+ [![license](https://img.shields.io/github/license/MiiKiyoshi/tex-mcp-web)](https://github.com/MiiKiyoshi/tex-mcp-web/blob/main/LICENSE)
40
+ [![release](https://img.shields.io/github/v/release/MiiKiyoshi/tex-mcp-web)](https://github.com/MiiKiyoshi/tex-mcp-web/releases/latest)
41
+ [![python](https://img.shields.io/python/required-version-toml?tomlFilePath=https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/pyproject.toml)](https://github.com/MiiKiyoshi/tex-mcp-web/blob/main/pyproject.toml)
42
+
43
+ Review a LaTeX paper from its rendered PDF, on a desktop, tablet, or phone, while Claude Code or Codex edits the source.
44
+
45
+ <picture>
46
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/pdf-review-dark.webp">
47
+ <img alt="A sentence selected in the PDF takes a comment asking for a number. Called, the agent proposes a wording as a −/+ pair, which waits in to do, and the source marks the words it would replace. Applied with aa, it leaves to do empty, and once the paper is compiled, the PDF shows the new sentence." src="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/pdf-review.webp">
48
+ </picture>
49
+
50
+ Select words in the PDF, or draw a box over part of a figure, and write what should change.
51
+ Press **Call agent**, the bell above the comments, when they are ready. The agent edits the
52
+ source, compiles, and answers in the thread, at times with a wording to apply. The keys at the
53
+ bottom right are the ones pressed.
54
+
55
+ > ⭐ **If this helps your writing, please give it a star.** It helps others find the project.
56
+
57
+ ## Quick start
58
+
59
+ 1. Paste this into Claude Code or Codex, and start the agent again once it is done:
60
+
61
+ ```
62
+ Install tex-mcp-web by following https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/INSTALL.md
63
+ ```
64
+
65
+ The agent checks for Python 3.10 or newer and `latexmk`, shows where it will install and
66
+ which agents it will register with, and installs once you agree.
67
+
68
+ 2. Start the agent in the paper's folder and say `do tex init`. It finds the main `.tex` file
69
+ and a free port, shows you the settings, and writes `.tex-mcp-web.yaml` once you agree.
70
+
71
+ 3. Open `http://localhost:<port>`. On a machine other people log in to, say yes to the page
72
+ token at `do tex init`, and open the link `tex-mcp-web link` prints once in each browser.
73
+ The agent acts when you press **Call agent**. With the plugin the install adds, a Claude
74
+ Code session started in the paper's folder waits for that press by itself. In Codex, or in
75
+ an older Claude Code that does not support plugin monitors, say `do tex listen` first, and
76
+ again after the agent restarts.
77
+
78
+ ## Point at what words cannot
79
+
80
+ <picture>
81
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/pdf-area-dark.webp">
82
+ <img alt="On the PDF's second page, the box tool draws a box over a bare table, and the comment asks for rules. Called, the agent rules the table with booktabs and names the lines it changed, the paper compiles, and the PDF shows the ruled table." src="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/pdf-area.webp">
83
+ </picture>
84
+
85
+ For a figure, a table or a page's layout, take the box tool beside pan and pointer in the PDF's
86
+ toolbar, draw a box over it, and say what is wrong. The agent works from the box as from any
87
+ comment.
88
+
89
+ ## Answer your co-authors' Overleaf comments, with the agent
90
+
91
+ Press **Connect Overleaf** in the top bar and paste the project's link. Its comment threads
92
+ come into a tab of their own, **Comments** with a leaf, beside the comments you write here. In
93
+ a thread you talk with the agent, which drafts the reply for Overleaf under it, and you send
94
+ that reply once it reads right. Each tab opens on **to do**, what waits for you alone: a
95
+ suggestion to apply, a reply to send, a suggested edit to accept. The number on the tab counts
96
+ them, and once it is gone, nothing is left.
97
+
98
+ <picture>
99
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/overleaf-thread-dark.webp">
100
+ <img alt="A co-author's thread from Overleaf, where the agent misread the request and drafted a gushing reply. A reply to the agent sets it right, and once called, the agent fixes the sentence, the PDF shows it, and the draft for Overleaf becomes one short line, sent with ss." src="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/overleaf-thread.webp">
101
+ </picture>
102
+
103
+ Your talk with the agent stays on the page, in the thread between your co-authors' messages,
104
+ so the whole exchange reads in order. Overleaf gets only the replies you send.
105
+
106
+ <picture>
107
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/overleaf-thread-split-dark.png">
108
+ <img alt="The same thread twice. On the review page it holds the co-author's comment, the talk with the agent, each entry of it marked here only, and the reply sent. On Overleaf it holds the comment and the reply sent, and nothing else." src="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/overleaf-thread-split.png">
109
+ </picture>
110
+
111
+ Keeping the paper's files in step with Overleaf, by git, by hand or live, is in
112
+ [Working with Overleaf](https://github.com/MiiKiyoshi/tex-mcp-web/blob/main/docs/overleaf.md).
113
+
114
+ ## Raise a point with your co-authors on Overleaf
115
+
116
+ <picture>
117
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/new-thread-dark.webp">
118
+ <img alt="With the leaf beside the comment button pressed, the room temperature is selected in the source with v and gc, and a rough note tells the agent what to ask the co-author. The note waits in the leaf Comments tab under new thread. Called, the agent drafts a polite question, sent with ss: it opens on Overleaf alone, and the note stays on the page, marked here only." src="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/new-thread.webp">
119
+ </picture>
120
+
121
+ Press the leaf beside **+ Comment** in the editor's bar, select the words in the source, as
122
+ Overleaf puts a thread on source words, and tell the agent what to say, as roughly as you
123
+ like. It drafts the thread's first message, worded for your co-authors, and you send it. It
124
+ opens on Overleaf on those words, and your note stays here. Asked in any thread, the agent
125
+ drafts a new thread of its own the same way.
126
+
127
+ ## Accept or reject your co-authors' suggested edits
128
+
129
+ <picture>
130
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/suggested-edits-dark.webp">
131
+ <img alt="The co-author's edits made on Overleaf with track changes on wait in the leaf tab's to do: a word written over another, words put in, words taken out. Each opened with Space shows in the source, underlined or marked where words went. Two are accepted with aa and one rejected with dd, Get takes the rejection into the file, and to do is empty." src="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/suggested-edits.webp">
132
+ </picture>
133
+
134
+ Edits your co-authors make on Overleaf with track changes on come in as suggested edits, each
135
+ a card of what went and what came, and the editor marks them in the source. **Accept** and
136
+ **Reject**, or `aa` and `dd`, act on Overleaf for everyone in the project.
137
+
138
+ ## Go through the comments by keyboard
139
+
140
+ <picture>
141
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/keyboard-dark.webp">
142
+ <img alt="All without the mouse: gd into the introduction's file, v and gc to comment on a sentence, Ctrl+Alt+Enter to call the agent, K to its comment, Space and aa to apply its proposal, K back to the words, :make to compile, gss to find the sentence in the PDF, Ctrl+O back to main.tex, and R to resolve." src="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/keyboard.webp">
143
+ </picture>
144
+
145
+ The comment list goes by keys, as a notebook's cells do, and the editor has Vim keys. A ring
146
+ marks the comment the keys act on, and the list moves under it, so the eye stays put. `K` goes
147
+ between a comment and its words in the source, both ways.
148
+
149
+ | Key | Does |
150
+ |---|---|
151
+ | `j` `k` | Next and previous comment |
152
+ | Space | Open the comment and show its words |
153
+ | `K` | Into the source at its words, and `K` there back |
154
+ | `r` | Reply to the agent |
155
+ | `R` | Resolve |
156
+ | `aa` | Apply the suggestion, or accept a suggested edit |
157
+ | `ss` | Send the reply to Overleaf |
158
+ | `?` | Every key |
159
+
160
+ Keys that change the file, post to Overleaf or delete are pressed twice. Once you move by keys,
161
+ the ringed comment's buttons show their letters. Every key, and the editor's Vim keys, are in
162
+ [Reviewing in detail](https://github.com/MiiKiyoshi/tex-mcp-web/blob/main/docs/reviewing.md).
163
+
164
+ ## Review on a tablet or phone
165
+
166
+ <picture>
167
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/mobile-dark.png">
168
+ <img alt="The review page at a tablet's width and at a phone's, each on the same comment: the PDF above, zoomed to the commented sentence, and the thread with the agent's proposal below." src="https://raw.githubusercontent.com/MiiKiyoshi/tex-mcp-web/main/docs/images/mobile.png">
169
+ </picture>
170
+
171
+ The page is served where the agent runs. From a phone, forward its port over SSH from that
172
+ machine, with Termux on Android or Termius on iOS, then open `http://localhost:<port>` in the
173
+ phone's browser:
174
+
175
+ ```
176
+ ssh -L <port>:localhost:<port> <the machine the agent runs on>
177
+ ```
178
+
179
+ In Termius the same forward is a Local rule in its Port Forwarding screen. With the page token
180
+ on, open the link `tex-mcp-web link` prints on that machine instead, once.
181
+
182
+ ## Writes by your rules, in your field's terms
183
+
184
+ Rules told to an agent in conversation do not last. After its context is compacted a few
185
+ times it writes as if never told, and what Claude Code remembers for one paper's folder does
186
+ not reach the next paper in the same field. Kept in files, your writing rules and your
187
+ field's terms serve every paper that names them, and in Claude Code the agent cannot use
188
+ tex-mcp's tools until it has read them, again after every compaction (Codex does not hold
189
+ the tools back like this yet).
190
+
191
+ Write the rules you hold a paper to in a `GUIDELINE.md`, in a folder of its own under
192
+ `~/.config/tex-mcp-web/guidelines/`, and set `guideline` to the folder's name. A guideline can
193
+ build on another, so the rules for every paper and those of one field stay apart:
194
+
195
+ ```
196
+ ~/.config/tex-mcp-web/guidelines/
197
+ ├── plain-writing/GUIDELINE.md rules for every paper
198
+ └── my-field/GUIDELINE.md a field's own, opening with the lines below
199
+ ```
200
+
201
+ ```markdown
202
+ ---
203
+ extends: plain-writing
204
+ ---
205
+ ```
206
+
207
+ With `guideline: my-field`, the agent reads plain-writing first and my-field after it.
208
+
209
+ Left alone, an agent also describes a concept in words of its own where the papers of your
210
+ field use one term. Convert the papers yours builds on to Markdown with
211
+ [marker](https://github.com/datalab-to/marker), keep them in one folder, and set `references`
212
+ to it.
213
+
214
+ ## Configuration
215
+
216
+ `do tex init` writes `.tex-mcp-web.yaml` at the paper's root:
217
+
218
+ ```yaml
219
+ main: main.tex
220
+ watch:
221
+ - '*.tex'
222
+ - '*.bib'
223
+ ignore:
224
+ - '*_backup.tex'
225
+ compiler: auto
226
+ port: 8765
227
+ guideline: my-field
228
+ translation:
229
+ language: Korean
230
+ instructions: Keep cell names in English.
231
+ overleaf: https://www.overleaf.com/project/0123456789abcdef01234567
232
+ ```
233
+
234
+ Every field is in [Configuration](https://github.com/MiiKiyoshi/tex-mcp-web/blob/main/docs/configuration.md).
235
+
236
+ ## See also
237
+
238
+ [html-mcp-web](https://github.com/MiiKiyoshi/html-mcp-web) reviews an AI agent's HTML slides or report the same way and hands finished slides over as an editable PowerPoint deck.
239
+
240
+ ## Acknowledgements
241
+
242
+ tex-mcp-web is a hard fork of [queelius/scholia at commit `e6c7454`](https://github.com/queelius/scholia/commit/e6c745400d2ad70fb43eca053e31183d48765f89) (version 0.6.1), independently developed since under the MIT license. See [`LICENSE`](https://github.com/MiiKiyoshi/tex-mcp-web/blob/main/LICENSE). PDF viewing uses [EmbedPDF](https://github.com/embedpdf/embed-pdf-viewer) and its PDFium WebAssembly engine, whose notices are in [`tex_mcp_web/static/embedpdf/LICENSE`](https://github.com/MiiKiyoshi/tex-mcp-web/blob/main/tex_mcp_web/static/embedpdf/LICENSE) and [`tex_mcp_web/static/embedpdf/LICENSE.pdfium`](https://github.com/MiiKiyoshi/tex-mcp-web/blob/main/tex_mcp_web/static/embedpdf/LICENSE.pdfium). The bundled viewer differs from its release only in its zoom gesture, described in [Reviewing in detail](https://github.com/MiiKiyoshi/tex-mcp-web/blob/main/docs/reviewing.md#the-pdf). Source highlighting and completion use [Ace Editor builds 1.44.0](https://github.com/ajaxorg/ace-builds/tree/v1.44.0) under the BSD-3-Clause license, and its notice is in [`tex_mcp_web/static/ace/LICENSE`](https://github.com/MiiKiyoshi/tex-mcp-web/blob/main/tex_mcp_web/static/ace/LICENSE).
243
+
244
+ <!-- mcp-name: io.github.MiiKiyoshi/tex-mcp-web -->