MathMagic MCP Pro
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MATHMAGIC_EXE | Yes | Path to the MathMagic Pro executable, e.g. MathMagic Pro 9.31 InD.exe. | |
| MATHMAGIC_DEFAULT_MODE | No | Default operating mode for the server, e.g. "offline". | offline |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
MathMagic MCP Pro: native, editable MathMagic equations in Adobe InDesign, driven only by window messages and InDesign COM (no keyboard, mouse, clipboard or focus stealing in the default offline mode).
MathMagic is driven ONLY through these mathmagic_* tools. Never use Windows MCP, computer-use, browser automation or scripts that send keys/clicks to MathMagic or InDesign windows; if a tool is missing or fails, stop and report.
Never click or close the MathMagic license/Authorization ("Try") dialog; ask the user. LICENSE_REQUIRED means wait for them.
Workflow: mathmagic_preflight -> mathmagic_set_style (book font/size, once) -> text with unique [[MM:ID]] markers is written by the InDesign MCP and saved -> mathmagic_backup_indd -> mathmagic_preview_batch -> mathmagic_run_batch(confirm=true, verify_latex=true, remove_markers=true; repeat with start_index=next_index) -> mathmagic_list_equations.
Do not edit the same InDesign document with another MCP while a MathMagic tool runs. BUSY = another session holds the lock.
LATEX_MISMATCH: MathMagic built a different structure; fix the source LaTeX (wrap operands of \int/\sum: {x^2}). EMPTY_RENDER: typed characters were lost twice (e.g. the user held Alt/Ctrl); simply run again.
Stacked inline fractions need fixed paragraph leading (~1.75 x text size); auto leading overlaps.
Geometry accents: write angles as m(\widehat{DEF}) (triangular wide hat) and arcs as \overarc{AB}. MathMagic's own TeX import cannot build these (\widehat loses its content), so the server builds them through MathMagic's native .mmf format automatically. \hat{X} is for ONE letter only; never \stackrel. Do not combine \overbrace with them.
Question banks: the soru-bankasi-uret-pro skill (scripts/prepare_mathmagic.py, indesign/MATHMAGIC-ENTEGRASYON.md) produces the marker text and manifests.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| mathmagic_policyC | What this server does and never does; modes, synchronisation and focus behaviour. |
| mathmagic_preflightA | Read-only readiness check (files, pywin32, InDesign/MathMagic running and responsive, license dialog). |
| mathmagic_statusC | Read-only: MathMagic windows/documents/dialogs, InDesign documents and plugin actions, style state, foreground. |
| mathmagic_capabilitiesA | Read-only live inventory of ALL MathMagic menu commands and InDesign plugin actions, classified for automation. |
| mathmagic_inspect_indesignA | Read-only InDesign probe (never launches InDesign): documents, selection, MathMagic plugin actions. |
| mathmagic_probe_uiaB | Read-only UI Automation capability scan of MathMagic with modal-dialog detection. |
| mathmagic_preview_equationB | Validate LaTeX/marker/size and show the planned steps. No changes. |
| mathmagic_preview_batchA | Validate a JSON manifest (up to 5000 equations; optional per-item size_pt). No changes. |
| mathmagic_verify_equationC | Read-only: native MathMagic equation before [[MM:ID]]? Link, embedding, plugin recognition, labels. |
| mathmagic_list_equationsA | Read-only inventory of MathMagic equations in a document (ids, page, embedded, style, optional LaTeX). |
| mathmagic_get_styleA | Read-only: MathMagic's current default style (fonts per role, base size) and available StyleSets. |
| mathmagic_capture_editorA | Save a PNG of the open MathMagic equation window (PrintWindow, no focus change). |
| mathmagic_launchA | Start MathMagic without activating it; reports LICENSE_REQUIRED if the Authorization dialog appears. |
| mathmagic_dismiss_dialogsA | Acknowledge only known harmless MathMagic dialogs (font warning, Tip of the Day). Never the license dialog. |
| mathmagic_create_equationA | Insert a native MathMagic equation at an [[MM:ID]] marker (no keyboard/mouse/clipboard); returns verification, timing and a focus report. One InDesign undo step (offline). |
| mathmagic_edit_equationA | Replace the equation before [[MM:ID]] with new LaTeX (offline: re-render + replace; plugin: Edit Equation). |
| mathmagic_export_equationB | Render LaTeX with MathMagic to a file; format from the extension: .eps .pdf .svg .png .jpg .gif .bmp .wmf .mmf .mml/.mathml/.html (MathML) .tex (LaTeX, ams=true for AMS) .amath .mathtxt. |
| mathmagic_render_epsB | Alias of mathmagic_export_equation for .eps output. |
| mathmagic_place_epsB | Place a MathMagic EPS inline at [[MM:ID]] (fit, embed, Default Baseline, label) as one undo step. |
| mathmagic_run_batchA | Process a manifest ({equations:[{id,marker,latex,size_pt?}]}, e.g. from soru-bankasi-uret-pro prepare_mathmagic.py) within a time budget; skips finished items, journals progress, relaunches MathMagic if it exits, retries an empty equation once, optional periodic save. Stops on the first error (LATEX_MISMATCH shows latex_exported). Returns next_index to continue. |
| mathmagic_rerender_equationsC | Re-render labelled equations from their stored LaTeX with the current StyleSet and replace them in place. |
| mathmagic_set_styleA | Create a StyleSet (font for text/function/variable/vector/number, base size pt, italic variables) from the current default, back up the old default as a StyleSet, make it MathMagic's default and verify with a probe render. |
| mathmagic_apply_stylesetB | Make an existing StyleSet (see get_style) MathMagic's default, e.g. to restore the backup. |
| mathmagic_prepare_offline_batchC | Write each manifest LaTeX to .tex in an empty folder (inputs only). |
| mathmagic_backup_inddB | Copy the last saved .indd to another folder (unsaved changes excluded). |
| mathmagic_save_documentB | Save the InDesign document in place (only if it already has a file). |
| mathmagic_cleanup_markerB | Remove an [[MM:ID]] marker; by default only if a verified equation precedes it. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 27 tools
The read-only diagnostic tier overlaps heavily: mathmagic_status already covers MathMagic windows, InDesign documents and plugin actions, which is also what mathmagic_inspect_indesign and mathmagic_capabilities report, so an agent must guess which probe to run. Similarly, preview_equation, preview_batch and prepare_offline_batch share a validation-only purpose that only the descriptions disambiguate, and render_eps is an admitted alias of export_equation. The create/edit/rerender/style tools are cleanly distinct, so the overlaps are contained rather than pervasive.
Every tool carries the mathmagic_ prefix and most follow a verb_noun pattern (create_equation, edit_equation, list_equations, get_style, set_style, save_document). A handful are bare nouns with no verb (policy, preflight, status, capabilities), which is a minor deviation but still readable and predictable. No camelCase/snake_case mixing.
At 27 tools the surface is heavy for the domain and several are redundant rather than earning their place: an explicit .eps alias of export_equation, three separate preview/validation tools, and four or five overlapping read-only probes. The core workflow (create/edit/verify/style/batch) could be expressed in roughly half the tools.
Coverage is genuinely broad: readiness checks, launch/dialog handling, create/edit/rerender, multi-format export, style set lifecycle, batch processing, verification, marker cleanup, document save and .indd backup. The main gap is that there is no explicit delete/remove-equation operation separate from cleanup_marker, and no document open/close handling, but these are minor for the stated purpose.