Integrating Mathpix with Hermes
Using Composio Connect CLI
1. Install the Composio CLI
Run the install script directly, or paste https://composio.dev/hermes into your Hermes chat box to have it installed for you.
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.SIGN UP
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.LOG IN
You can keep a formula sheet from the photos you send, get typed notes from each day's lecture photos and check your worked solutions and track your mistakes from Hermes. Composio runs each call on its own Mathpix account, so you don't need a Mathpix API key, and your first $2 is free.
Hermes runs Mathpix through Composio, and the cost comes out of your free $2.
$2 ≈ 1000 images
| When you ask Hermes for | Hermes uses this tool | Cost | What $2 gets you |
|---|---|---|---|
| LaTeX from an equation image | OCR Image | $0.002 per image | About 1,000 images |
| A table from a screenshot | OCR Image | $0.002 per image | About 1,000 images |
| Math from handwriting strokes | Recognize Strokes | $0.002 per request | About 1,000 requests |
You pay Mathpix's price for each call with 0% markup, plus the regular Composio tool call charge. There's no Mathpix subscription, and you only pay for what you use.
2 of 28 Mathpix tools work without a key. For Convert Mathpix Markdown, Create App Token, Delete Conversion, Delete Document, Delete File, Finalize File Job and 20 more, connect your own Mathpix key. Read how Instant works.
Composio adds Mathpix to Hermes as an Instant toolkit. You connect Composio to Hermes once, and then Hermes can use Mathpix right away. There are two ways to do this:
You bring your own Mathpix API key, set it up, and use it.
Composio runs each call on its own Mathpix account, so you don't have to set anything up at Mathpix, and your first $2 is free.
You do the setup one time and it takes about a minute. If you build Mathpix into your own product, turn on Instant toolkits in your project settings so your agent can call Mathpix for each of your users without a Mathpix API key, and read Instant tools in the Composio docs for the setup steps and code examples.
Open your Composio wallet and turn on Instant. Your free $2 shows up there.
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.Open my wallet
Follow the setup below. You only do this once.
Try a Mathpix prompt. The cost comes out of your $2.
1. Install the Composio CLI
Run the install script directly, or paste https://composio.dev/hermes into your Hermes chat box to have it installed for you.
curl -fsSL https://composio.dev/install | bash
2. Authenticate
Once the CLI is installed, ask Hermes to authenticate with Composio.
3. Connect to Mathpix
Ask your agent to connect to Mathpix, or simply request any Mathpix-related task. Hermes will prompt you to authenticate and authorize access.
4. Done. You're all set with a new Mathpix connection.
1. Get your MCP URL and API Key
Go to dashboard.composio.dev and copy your Connect MCP URL and API key.

2. Open the Hermes config file
nano ~/.hermes/config.yaml3. Add the Composio Connect MCP server
mcp_servers:
composio:
url: "https://connect.composio.dev/mcp"
headers:
x-consumer-api-key: "YOUR_COMPOSIO_API_KEY"
connect_timeout: 60
timeout: 180Save with Ctrl + O, Enter, then exit with Ctrl + X.
4. Restart your Hermes agent
Once restarted, ask your agent to connect to Mathpix or request any Mathpix-related task. It will prompt you to authenticate and authorize access.
5. Done!
Start a new chat and try this prompt:
From now on, whenever I send you a photo of a formula, convert it to LaTeX and add it to my formula sheet for [course], with a short name for each one. Every Friday at 5 pm, send me the full sheet grouped by topic.
Hermes runs it on Instant and shows you the result. It doesn't ask you for a Mathpix key, and the cost comes out of your $2. You can see each call in your wallet.
If you want Convert Mathpix Markdown, Create App Token, Delete Conversion, Delete Document, Delete File, Finalize File Job and 20 more, you need your own key. Ask Hermes to connect your Mathpix account, and it gives you a Composio link:
Connect my Mathpix account using Composio.
Open the link, paste your Mathpix API key and click Connect Account. You can get a key from Mathpix Console. After that, Composio uses your key first and doesn't charge Instant for those calls.
Each prompt runs on Instant, and the cost next to it is about what it takes from your $2.
Converts each formula photo you send to LaTeX, adds it to a running sheet and sends the sheet every Friday.
From now on, whenever I send you a photo of a formula, convert it to LaTeX and add it to my formula sheet for [course], with a short name for each one. Every Friday at 5 pm, send me the full sheet grouped by topic.
Types up the handwritten notes you photographed that day into one Markdown note, every weekday evening.
Every weekday at 6 pm, take the photos of handwritten notes I sent you that day and type them up as one Markdown note with the math in LaTeX. Put any open questions from yesterday's note at the top so I can follow up.
Reads a photo of your math working, finds the first wrong step and keeps a tally of your common mistakes.
Whenever I send you a photo of a worked math solution, read it and check each step. Tell me the first step that's wrong and why. Keep a tally of the kinds of mistakes I make and send me a summary every Sunday.
| Tool | What it does | Works without a key | Cost on Instant |
|---|---|---|---|
| OCR Image | Extract text, math, tables, diagrams, or chemistry from one image URL or base64 data URI and return the requested OCR representations. | Yes | $0.002 per image OCR request |
| Recognize Strokes | Recognize handwritten math or text from aligned x/y digital-ink stroke arrays and return OCR representations. | Yes | $0.002 per non-session digital-ink request |
| Convert Mathpix Markdown | Submit Mathpix Markdown, wait for one requested format to finish, then return the conversion ID and downloadable output file. | Needs your own key | Billed to your own Mathpix key |
| Create App Token | Mint a short-lived client OCR credential, optionally with a live ink strokes session. | Needs your own key | Billed to your own Mathpix key |
| Delete Conversion | Permanently delete one Mathpix Markdown conversion's hosted output data after explicit confirmation. | Needs your own key | Billed to your own Mathpix key |
| Delete Document | Permanently delete one Mathpix document source and its hosted outputs after explicit confirmation. | Needs your own key | Billed to your own Mathpix key |
| Delete File | Permanently delete one terminal Files API file and its Mathpix-hosted results. | Needs your own key | Billed to your own Mathpix key |
| Finalize File Job | Permanently close one Files API job to new file additions and arm its completion webhook. | Needs your own key | Billed to your own Mathpix key |
| Get App Token | Get expiry and ownership metadata for a specific short-lived Mathpix app token. | Needs your own key | Billed to your own Mathpix key |
| Get Conversion Result | Wait for an existing Mathpix Markdown conversion and requested format to finish, then return its status and downloadable output file without creating a conversion. | Needs your own key | Billed to your own Mathpix key |
| Get Document Result | Wait for an existing Mathpix document job and requested format to finish, then return its status and downloadable output file without creating a new job. | Needs your own key | Billed to your own Mathpix key |
| Get File Job | Get aggregate status, file and page counters, and timestamps for one Files API job. | Needs your own key | Billed to your own Mathpix key |
| Get File Result | Wait for an existing Files API file and selected format to finish, then return its status and downloadable output without creating a file. | Needs your own key | Billed to your own Mathpix key |
| Get Job File by Custom ID | Get the complete Files API processing status for one job member using the exact caller-defined custom ID assigned at submission. | Needs your own key | Billed to your own Mathpix key |
| Get OCR Usage | Return one page of aggregated Mathpix OCR usage for a date range, optionally grouped by usage type, request configuration, or application. | Needs your own key | Billed to your own Mathpix key |
| Get Storage Onboarding Identities | Get the Mathpix AWS, Azure, and GCP identities needed to grant cloud-storage access. | Needs your own key | Billed to your own Mathpix key |
| List Conversions | List one page of retained Mathpix Markdown conversion records, optionally filtered by date, and return IDs usable by conversion result or deletion tools. | Needs your own key | Billed to your own Mathpix key |
| List Data Sources | List cloud-storage data sources registered with Mathpix, returning only allowlisted non-secret metadata. | Needs your own key | Billed to your own Mathpix key |
| List Documents | List retained document OCR jobs for the connected account, optionally filtered by date or document ID, and return one page. | Needs your own key | Billed to your own Mathpix key |
| List File Job Files | List one cursor-paginated page of files in a Mathpix Files API job, optionally filtered by member status. | Needs your own key | Billed to your own Mathpix key |
| Tool | What it does | Works without a key | Cost on Instant |
|---|---|---|---|
| List File Jobs | List one cursor-paginated page of Files API jobs newest first, optionally bounded by inclusive UTC dates. | Needs your own key | Billed to your own Mathpix key |
| OCR Document | Submit a PDF, office document, or ebook URL, wait for OCR and the requested conversion to finish, then return its Mathpix job ID and downloadable output file. | Needs your own key | Billed to your own Mathpix key |
| Process File URI | Submit one public or registered-cloud document URI to the paid Files API, wait for OCR and one requested output, and return the retained file ID and downloadable result. | Needs your own key | Billed to your own Mathpix key |
| Process Image Batch | Submit a paid asynchronous batch of 1-100 named public image URLs, wait until every key has a semantically successful OCR result, and return the retained batch ID and results. | Needs your own key | Billed to your own Mathpix key |
| Revoke App Token | Irreversibly revoke one short-lived app token immediately. | Needs your own key | Billed to your own Mathpix key |
| Search OCR Results | Search retained image and stroke OCR history by date, identifiers, content, tags, or detected content and return one page of results. | Needs your own key | Billed to your own Mathpix key |
| Submit File Job | Submit up to 200,000 remote documents in a paid asynchronous Mathpix Files job, subject to a 10 MB encoded request limit. | Needs your own key | Billed to your own Mathpix key |
| Upload and Process File | Upload one local document to the paid Mathpix Files API, wait until OCR and one requested output are ready, then return the retained Mathpix file ID and a downloadable result. | Needs your own key | Billed to your own Mathpix key |
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.Open my Composio wallet
You may have asked for something that needs your own key, like Convert Mathpix Markdown, Create App Token, Delete Conversion, Delete Document, Delete File, Finalize File Job and 20 more. Those tools don't run on Instant. For everything else, check that Instant is turned on in your Composio wallet, then ask again.
Open your wallet in the Composio dashboard and check that Instant is turned on. If the $2 still isn't there, email support@composio.dev from the address you signed up with.
Your balance is empty. Add funds to your wallet on a Pro plan, or connect your own Mathpix key, then try again.
Google Drive is a cloud storage platform for uploading, sharing, and collaborating on files. It's perfect for keeping your documents accessible and organized across devices.
Google Docs is a cloud-based word processor that enables document creation and real-time collaboration. Its seamless sharing and version history make team editing and content management a breeze.
Google Super is an all-in-one suite combining Gmail, Drive, Calendar, Sheets, Analytics, and more. It gives you a unified platform to manage your digital life, boosting productivity and organization.
ActiveMerge is a document automation platform for generating documents, images, merged files, and e-signature workflows. It helps teams turn templates and stored files into finished, shareable documents faster.
Not for the 2 tools that run on Instant. Composio runs those calls on its own Mathpix account, and you only add Composio to your agent. The other 26 tools need your own Mathpix key.
Yes. Every Composio account gets $2 of Instant credit once you turn on Instant, and you can use it on Mathpix or on any other Instant toolkit.
You can get about 1,000 images, about 1,000 images or about 1,000 requests. The price list on this page shows the cost of each tool.
Instant calls stop. You can add funds to your wallet on a Pro plan, or connect your own Mathpix key.
You pay Mathpix's price for each call with 0% markup, plus the regular Composio tool call charge.
Yes. Connect your key from the Mathpix toolkit in your Composio dashboard. Composio always uses your own connection first, and it doesn't charge Instant for those calls.
You can use 2 of the 28 tools without a key, including OCR Image and Recognize Strokes. The other 26 tools need your own Mathpix key.
Composio is SOC 2 Type II compliant.
New accounts get a one-time $2 starter credit for Instant calls.Run Mathpix from your agent with no Mathpix key.
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.Get $2 starter credit