Smart OCR
Multi-provider AI OCR and structured JSON/table extraction API for PDFs, invoices, and receipts.
我该使用它吗
质量与安全性
发现(3)
- HIGH
- MEDIUM在 extract_document_json 中
- MEDIUM在 get_smartocr_status 中
基于对工具定义和协议合规性的自动分析。
上下文开销
这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。
安装
一键安装
将以下内容添加到你的 `claude_desktop_config.json` 文件中:
{
"mcpServers": {
"smartocr": {
"url": "https://api.smartocr.dev/mcp"
}
}
}远程端点
https://api.smartocr.dev/mcpstreamable-http它能做什么
工具清单
工具(3)
🟢extract_document_table(file_url, file_base64, file_name, preset, custom_headers, ...)
Extract structured table rows (line items, transactions, headers, document metadata, summary totals, Markdown table, and CSV) from a PDF or image (invoice, bank statement, credit card statement, receipt, timesheet, or scanned table). Works immediately on the free tier (2 free documents/day) or with an optional Smart OCR API key.
输入模式
{
"type": "object",
"properties": {
"file_url": {
"type": "string",
"description": "Public HTTP/HTTPS URL to a PDF, PNG, JPG, WEBP, or TIFF document to extract."
},
"file_base64": {
"type": "string",
"description": "Base64-encoded document content (raw base64 or data:...;base64,... URI). Provide either file_url or file_base64."
},
"file_name": {
"type": "string",
"description": "Optional filename with extension (e.g., \"invoice.pdf\", \"statement.pdf\", \"receipt.png\"). Defaults to \"document.pdf\"."
},
"preset": {
"type": "string",
"enum": [
"auto",
"invoice",
"bank_statement",
"receipt"
],
"description": "Document preset: \"invoice\" for vendor invoices/bills, \"bank_statement\" for bank or credit card statements, \"receipt\" for retail/expense receipts, or \"auto\" to auto-detect."
},
"custom_headers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional list of custom column headers to extract (e.g., [\"Date\", \"Description\", \"Amount\", \"Balance\"])."
},
"api_key": {
"type": "string",
"description": "Optional Smart OCR API key from https://smartocr.dev (can also be sent via x-api-key header). If omitted, uses the free tier (2 free docs/day)."
}
}
}🟢extract_document_json(file_url, file_base64, schema, file_name, api_key)
Extract strict, structured JSON matching any custom JSON schema or field template from a PDF or image (PNG, JPG, WEBP, TIFF). Ideal for developer pipelines, ERP/accounting ingestion, and custom document fields. Works on the free tier (2 free docs/day) or with a Smart OCR API key (10 free credits at https://smartocr.dev).
输入模式
{
"type": "object",
"properties": {
"file_url": {
"type": "string",
"description": "Public HTTP/HTTPS URL to a PDF, PNG, JPG, WEBP, or TIFF document to extract."
},
"file_base64": {
"type": "string",
"description": "Base64-encoded document content (raw base64 or data:...;base64,... URI). Provide either file_url or file_base64."
},
"schema": {
"type": "object",
"description": "Target JSON schema or key-value object template describing the fields to extract (e.g., {\"vendorName\": \"string\", \"invoiceNumber\": \"string\", \"invoiceDate\": \"string\", \"totalAmount\": \"number\", \"lineItems\": [{\"description\": \"string\", \"quantity\": \"number\", \"amount\": \"number\"}]}).",
"additionalProperties": true
},
"file_name": {
"type": "string",
"description": "Optional filename with extension (e.g., \"invoice.pdf\")."
},
"api_key": {
"type": "string",
"description": "Optional Smart OCR API key from https://smartocr.dev (can also be sent via x-api-key header). If omitted, uses the free tier (2 free docs/day)."
}
},
"required": [
"schema"
]
}🟢get_smartocr_status(api_key)
Check Smart OCR service status, remaining free daily document quota (2 free documents/day), or developer API key credit balance, plus links to the web converter (https://read.smartocr.dev) and API portal (https://smartocr.dev).
输入模式
{
"type": "object",
"properties": {
"api_key": {
"type": "string",
"description": "Optional Smart OCR API key to check your remaining API credit balance."
}
}
}社区
证据