Mathpix MCP by usefulapi
Run OCR billed by Mathpix on images and PDFs, read results and usage, delete outputs in Mathpix.
Sollte ich dies verwenden
Qualität und Sicherheit
Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.
Kontextkosten
Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.
Installieren
Installation mit einem Klick
Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:
{
"mcpServers": {
"mathpix": {
"url": "https://mathpix.usefulapi.io/mcp"
}
}
}Remote-Endpunkte
https://mathpix.usefulapi.io/mcpstreamable-httpWas es kann
Tool-Inventar
Tools (12)
🟢mathpix_get_usage(from_date, to_date, group_by, timespan)
API usage counts for this Mathpix account over a date range, grouped by usage type (image, image-async, pdf ...), request arguments or app id and aggregated by a timespan. Use it to reconcile billing and watch consumption. Free to call. GET /v3/ocr-usage.
Eingabe-Schema
{
"type": "object",
"properties": {
"from_date": {
"description": "Start (included): ISO 8601 date or date-time.",
"type": "string"
},
"to_date": {
"description": "End (excluded): ISO 8601 date or date-time.",
"type": "string"
},
"group_by": {
"description": "What to group the counts by (default usage_type).",
"type": "string",
"enum": [
"usage_type",
"request_args_hash",
"app_id"
]
},
"timespan": {
"description": "Aggregation period, a lowercase word such as month (default), week or day. Mathpix rejects values it does not know.",
"type": "string",
"pattern": "^[a-z]{2,16}$"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢mathpix_list_image_results(from_date, to_date, text, tags, is_printed, ...)
Search and list stored results of earlier image/strokes OCR requests (/v3/text etc.), newest first: the recognized text, confidence, detected content types and the request options. Requests made with improve_mathpix=false are not stored. Free to call. GET /v3/ocr-results.
Eingabe-Schema
{
"type": "object",
"properties": {
"from_date": {
"description": "Only results at or after this ISO 8601 date or date-time.",
"type": "string"
},
"to_date": {
"description": "Only results before this ISO 8601 date or date-time.",
"type": "string"
},
"text": {
"description": "Only results whose recognized text contains this string.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"tags": {
"description": "Only results carrying these tags (as set on the OCR request).",
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"is_printed": {
"description": "true: results containing printed text/math.",
"type": "boolean"
},
"is_handwritten": {
"description": "true: results containing handwritten text/math.",
"type": "boolean"
},
"contains_table": {
"description": "true: results containing a table.",
"type": "boolean"
},
"contains_chemistry": {
"description": "true: results containing chemistry diagrams.",
"type": "boolean"
},
"contains_diagram": {
"description": "true: results containing diagrams.",
"type": "boolean"
},
"page": {
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 10000
},
"per_page": {
"description": "Results per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢mathpix_list_documents(from_date, to_date, page, per_page)
List documents previously submitted for async processing (/v3/pdf), newest first: pdf_id, input file or URL, status (received, loaded, split, completed, error), page counts and timestamps. Use the pdf_id with the get/output tools. Free to call. GET /v3/pdf-results.
Eingabe-Schema
{
"type": "object",
"properties": {
"from_date": {
"description": "Only documents at or after this ISO 8601 date or date-time.",
"type": "string"
},
"to_date": {
"description": "Only documents before this ISO 8601 date or date-time.",
"type": "string"
},
"page": {
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 10000
},
"per_page": {
"description": "Results per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢mathpix_get_document_status(pdf_id)
Processing status of a submitted document: status (received, loaded, split, completed, error), pages done, and the status of each requested conversion. Poll this until status is completed before reading the output (percent_done reaches 100 before the output files exist). Free to call. GET /v3/pdf/{pdf_id}.
Eingabe-Schema
{
"type": "object",
"properties": {
"pdf_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{6,128}$",
"description": "The pdf_id returned by mathpix_submit_document or listed by mathpix_list_documents."
}
},
"required": [
"pdf_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢mathpix_get_conversion_status(id)
Status of the output-format conversions of a document (the pdf_id) or of a Markdown conversion (the conversion_id): one entry per requested format with status processing, completed or error. Free to call. GET /v3/converter/{id}.
Eingabe-Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{6,128}$",
"description": "A pdf_id, or the conversion_id returned by mathpix_convert_markdown."
}
},
"required": [
"id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢mathpix_get_document_output(id, format, offset, max_chars)
Read the TEXT result of a processed document: mmd (Mathpix Markdown, the primary output), md (plain Markdown), html, latex (single .tex) or lines.json (line-by-line data with geometry). Long outputs come back in slices (offset / next_offset). Binary formats (docx, pdf, zip, images) cannot be fetched through this server. Only call once mathpix_get_document_status says completed. Free to call. GET /v3/pdf/{pdf_id}.{ext}.
Eingabe-Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{6,128}$",
"description": "The pdf_id of a completed document."
},
"format": {
"type": "string",
"enum": [
"mmd",
"md",
"html",
"latex",
"lines.json"
],
"description": "Output format: mmd, md, html, latex, lines.json."
},
"offset": {
"description": "Character offset to start from (default 0). Pass the previous reply's next_offset to read on.",
"type": "integer",
"minimum": 0,
"maximum": 100000000
},
"max_chars": {
"description": "Characters to return, up to 45000 (default 40000); fewer come back when the text needs heavy escaping, so always continue from next_offset.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 45000
}
},
"required": [
"id",
"format"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢mathpix_get_conversion_output(id, format, offset, max_chars)
Read the TEXT result of a Markdown conversion started with mathpix_convert_markdown: md, html or latex. Long outputs come back in slices (offset / next_offset). Binary formats cannot be fetched through this server. Free to call. GET /v3/converter/{conversion_id}.{ext}.
Eingabe-Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{6,128}$",
"description": "The conversion_id returned by mathpix_convert_markdown."
},
"format": {
"type": "string",
"enum": [
"md",
"html",
"latex"
],
"description": "Output format: md, html, latex."
},
"offset": {
"description": "Character offset to start from (default 0). Pass the previous reply's next_offset to read on.",
"type": "integer",
"minimum": 0,
"maximum": 100000000
},
"max_chars": {
"description": "Characters to return, up to 45000 (default 40000); fewer come back when the text needs heavy escaping, so always continue from next_offset.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 45000
}
},
"required": [
"id",
"format"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡mathpix_ocr_image(src, formats, enable_document_layout, include_smiles, include_line_data, ...)
BILLED BY MATHPIX (pay as you go, per image; see mathpix.com/pricing/api): recognize math, text, tables and chemistry in ONE image and return Mathpix Markdown (LaTeX math inside \( \) / \[ \]), and optionally HTML, styled LaTeX or structured data. The image must be a public URL (or a small data URI); local files are not reachable. Each call is a new billed request. POST /v3/text.
Eingabe-Schema
{
"type": "object",
"properties": {
"src": {
"type": "string",
"minLength": 8,
"maxLength": 1000000,
"description": "Image to read: a PUBLIC http(s) URL that Mathpix can download (up to 10 MB), or a data:image/png|jpeg|gif|webp|bmp|tiff;base64,... string (up to 1000000 characters; prefer a URL). This server cannot read local files."
},
"formats": {
"description": "Output formats (default: text = Mathpix Markdown). data = extracted asciimath/mathml/latex/svg/tsv; latex_styled = single-equation LaTeX.",
"minItems": 1,
"maxItems": 4,
"type": "array",
"items": {
"type": "string",
"enum": [
"text",
"data",
"html",
"latex_styled"
]
}
},
"enable_document_layout": {
"description": "true for a full page (lists, multi-line layout); default is snippet mode.",
"type": "boolean"
},
"include_smiles": {
"description": "true to read chemistry diagrams as <smiles> notation.",
"type": "boolean"
},
"include_line_data": {
"description": "true to also return line-by-line data with positions (larger reply).",
"type": "boolean"
},
"tags": {
"description": "Tags stored with the result, searchable with mathpix_list_image_results.",
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"improve_mathpix": {
"description": "Set false to opt this request out of Mathpix using the image/document to improve its models (it then also will not appear in the results-query tools). Omit to use the account default.",
"type": "boolean"
}
},
"required": [
"src"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡mathpix_submit_document(url, page_ranges, include_smiles, improve_mathpix)
BILLED BY MATHPIX (pay as you go, per page processed; see mathpix.com/pricing/api): start async conversion of a PDF, DOCX, PPTX, EPUB or similar document at a PUBLIC URL into Mathpix Markdown. Returns a pdf_id immediately; poll mathpix_get_document_status until completed, then read it with mathpix_get_document_output. Use page_ranges to limit the pages billed. Each call is a new billed job. POST /v3/pdf.
Eingabe-Schema
{
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 4096,
"description": "PUBLIC http(s) URL where Mathpix can download the document (PDF, DOCX, PPTX, EPUB, ... up to 1 GB). This server cannot read local files."
},
"page_ranges": {
"description": "Pages to process (and be billed for), e.g. \"2,4-6\"; \"2 - -2\" = page 2 to the next-to-last. Default: all pages.",
"type": "string",
"maxLength": 200
},
"include_smiles": {
"description": "Read chemistry diagrams as <smiles> notation (default true at Mathpix).",
"type": "boolean"
},
"improve_mathpix": {
"description": "Set false to opt this request out of Mathpix using the image/document to improve its models (it then also will not appear in the results-query tools). Omit to use the account default.",
"type": "boolean"
}
},
"required": [
"url"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡mathpix_convert_markdown(mmd, formats, improve_mathpix)
Convert Mathpix Markdown (MMD) text into plain Markdown, HTML or LaTeX. Returns a conversion_id; read the result with mathpix_get_conversion_output (check mathpix_get_conversion_status first). Conversions may be billed by Mathpix under your plan; see mathpix.com/pricing/api. Each call creates a new conversion. POST /v3/converter.
Eingabe-Schema
{
"type": "object",
"properties": {
"mmd": {
"type": "string",
"minLength": 1,
"maxLength": 500000,
"description": "The Mathpix Markdown text to convert (up to 500000 characters)."
},
"formats": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"md",
"html",
"latex"
]
},
"description": "Output formats to produce: md, html and/or latex."
},
"improve_mathpix": {
"description": "Set false to opt this request out of Mathpix using the image/document to improve its models (it then also will not appear in the results-query tools). Omit to use the account default.",
"type": "boolean"
}
},
"required": [
"mmd",
"formats"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴mathpix_delete_document(pdf_id)
PERMANENTLY delete a processed document's output at Mathpix (Markdown, JSON lines, images, all converted formats) and the uploaded source copy. Cannot be undone; read what you need first. Only billing metadata is kept. DELETE /v3/pdf/{pdf_id}.
Eingabe-Schema
{
"type": "object",
"properties": {
"pdf_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{6,128}$",
"description": "The pdf_id of the document to delete."
}
},
"required": [
"pdf_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴mathpix_delete_conversion(conversion_id)
PERMANENTLY delete the output files of a Markdown conversion at Mathpix. Cannot be undone; read what you need first. DELETE /v3/converter/{conversion_id}.
Eingabe-Schema
{
"type": "object",
"properties": {
"conversion_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{6,128}$",
"description": "The conversion_id of the conversion to delete."
}
},
"required": [
"conversion_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}Community
Nachweis