MathType · MCP · AI Agent · Windows · Office Automation
Overview
This lets an AI agent create editable MathType 7 equations in Microsoft Word and PowerPoint. It ships as an installable agent skill, a Codex and Claude plugin, and a local MCP server, and Word documents also get MathType-native equation numbering and dynamic cross-references. The output is genuineEquation.DSMT4 objects, not Word OMath, images, or typed Unicode equations, so every equation stays editable in MathType.
Core features
- Creates genuine, editable
Equation.DSMT4objects instead of Word OMath, images, or typed Unicode equations - Inline and centered display equations in DOCX
- After scanning the complete document, classifies the mathematics in a raw manuscript as inline, unnumbered display, numbered display, or dynamic reference; a read-only scan finds plain-text mathematics (including Word sub/superscripts), and a mark step turns reviewed spans into markers
- Word equation numbers such as
(1)and dynamic references, both MathType-native - Centered floating MathType equations in PowerPoint, created through a hidden Word conversion document
- Source Office files are preserved and each output is validated; an existing output is not replaced unless
-Overwriteis explicit - Large Word documents render in resumable batches (
batch_size, default 40), optionally in the background with progress fromget_mathtype_render_status - A bilingual academic equation style reference: italic scalar variables, bold lowercase vectors, bold uppercase matrices and tensors, upright function names and SI units
- A portable cross-agent skill and plugin with a local MCP server for Codex and Claude; ChatGPT uses the same capability through a remote endpoint or a Secure MCP Tunnel
Architecture
Word rendering is driven by a JSON manifest. For each equation it lists the TeX, the layout (inline or display), and whether the equation is numbered, and it locates the equation by a marker that occurs exactly once in the document (for example{{MATH:id}}); each reference has its own marker pointing at a numbered equation.
On a timeout, the bridge terminates only the Office processes it logged as its own, and PowerPoint work never closes a PowerPoint instance you already had open. The repository layout:
mathtype-for-word
skills/mathtype-for-word · cross-agent skill, references, and launcher
SKILL.md
scripts · Office automation bridge, MCP server, and packager
mathtype-word.ps1 · Office bridge
mcp_server.py · MCP server
mathtype_batch.py · batch rendering
ensure-pwsh.ps1 · installs PowerShell 7
package_plugin.py · packaging
.claude-plugin/marketplace.json · Claude Code marketplace
.agents/plugins/marketplace.json · Codex marketplace
config/defaults.json · default Word equation-number profile
evals/fixtures · real Chinese and English DOCX and PPTX inputs
en-paper-draft.docx · used with en-word-manifest.json
en-presentation-draft.pptx · used with en-powerpoint-manifest.json
tests · static, MCP, live Office, rendering, and packaging checks
run-tests.ps1
dist · packaged output
mathtype-for-word-plugin.zip · plugin package, with a SHA-256 file
mathtype-for-word.skill · standalone skill package
CHANGELOG.md · changes in each release
Quick start
Check the requirements in the notes below first. The README also includes an install prompt that you can paste to an agent so it configures everything for the current environment; to install by hand, pick the path for your agent:1
Install the plugin in Claude Code
claude plugin marketplace update mathtype-for-word and claude plugin update mathtype-for-word@mathtype-for-word.2
Install the plugin in Codex
codex plugin marketplace upgrade mathtype-for-word and then the codex plugin add command again.3
Restart and verify the installation
Restart Claude Code or Codex after installing or upgrading, then run the checks:The three commands check the Word prerequisites, check the PowerPoint prerequisites, and run the tests including live Office; the paths are relative to the repository.
4
Hand a document to the agent
Tell the agent which DOCX or PPTX file to edit and which equations to create. The agent keeps the source file untouched and writes the result to a new file; the work counts as done only when validation returns
ok: true.Install options
Notes
In practice
This fits handing the equations in a paper draft or a presentation to an AI agent when the result has to stay editable in MathType. In Word, the numbers and cross-references are native MathType fields rather than typed text. The repository includes real Chinese and English DOCX and PPTX fixtures for a quick smoke test.Links
- GitHub: felimet/mathtype-for-word
- Installation matrix: installation-matrix.md
- MathType download page: mathtype.tw/download
- Listed in: hashgraph-online/awesome-ai-plugins
- Listed in: hol.org/plugins