Snip Snipping Tool Chrome Extension OCR API Files API Private Cloud OCR Secure Conversion Service
Make Documents Accessible Process Chemical Documents Collaborate on Documents Developer Solutions Train Language Models Support Academic Research Artificial Intelligence Fintech Edtech Pharma & Chemical Universities & Schools
Handwriting Recognition Digital Ink On-prem PDF Cloud Mathpix Markdown All Supported Languages Image Conversion PDF Conversion Markdown Conversion Table OCR Mathpix CLI PDF Search PDF Reader PDF Data Extraction Chrome Extension View Conversion Gallery
Snip APIs Private Cloud OCR SCS
Mobile Desktop Web Chrome Extension
Mathpix Snip Apps Mathpix OCR API Mathpix Markdown Python SDK
Blog
About Careers Contact
Contact Get Started
← Back to Blog

Introducing the Mathpix CLI: run OCR and document conversion from your terminal

2026-09-22 · api, updates
We are excited to introduce mpx, the Mathpix command-line interface. It is a single static binary that runs Mathpix OCR and document conversion straight from your terminal, with nothing to install alongside it.

Install

One command installs it on macOS, Linux, or Windows (WSL):
curl -fsSL https://mathpix.com/mpx-cli/install.sh | sh
The script detects your OS and CPU, downloads the matching release, verifies its checksum, and puts mpx on your PATH.

Configure

mpx configure
mpx configure prompts for your credentials and defaults and stores them under ~/.mpx. Bring the app_id and app_key from your Mathpix account. You can also supply them with the MATHPIX_APP_ID / MATHPIX_APP_KEY environment variables, and keep separate identities in named profiles.

Convert a document

mpx is organized as mpx <service> <command>. The scs service wraps our OCR and document API, and the output file’s extension picks the format:
mpx scs convert paper.pdf paper.mmd
mpx scs convert paper.pdf paper.docx
mpx scs convert notes.md notes.docx         # Markdown in, DOCX out
mpx scs convert equation.png equation.mmd   # an image

Convert a folder

Point it at a directory and it converts every document in parallel, one progress line per file, and writes a report you can re-run:
mpx scs convert ./scans/ ./out/ --map pdf:docx,md:docx

Adding request options

Common options have flags (--page-ranges, --rm-spaces, --include-equation-tags); every other API option is reachable through --options-json:
mpx scs convert paper.pdf paper.mmd --options-json '{"rm_fonts": true, "include_chemistry": true}'
Add --async to submit through the Files API and write results straight to your own bucket.

Private Cloud OCR

If you run Private Cloud OCR in your own infrastructure, the same tool drives it. Point --endpoint at your deployment:
mpx pco --endpoint http://pco.internal:8080 convert ./scans/ ./out/ --formats docx
mpx pco --endpoint http://pco.internal:8080 status
The source is on GitHub, and full documentation is at mathpix.com/docs/mpx.