DocumentPro MCP

DocumentPro MCP

Extract structured, schema-typed data from invoices, purchase orders, receipts, and tax forms, and classify documents into custom label sets — via a hosted MCP server. Free tier included.

Category
访问服务器

README

DocumentPro MCP Server

Connect an AI agent to DocumentPro's document extraction and classification platform via the Model Context Protocol — no parsing pipeline to build, no template guessing.

DocumentPro reads invoices, purchase orders, receipts, and tax forms and returns typed JSON keyed to an exact field schema. The MCP server is a thin layer over the same REST API used by DocumentPro's direct API customers — same auth, same metering, same extraction pipeline. Anything an agent does through MCP behaves identically to the REST API.

  • Endpoint: https://api.documentpro.ai/mcp
  • Transport: Streamable HTTP (stateless, JSON responses)
  • Auth: DocumentPro API key in the x-api-key header — create one free
  • Billing: tool calls consume credits exactly like the equivalent REST calls, under your existing plan

Connecting

Claude Code

claude mcp add --transport http documentpro https://api.documentpro.ai/mcp \
  --header "x-api-key: YOUR_API_KEY"

Claude Desktop / JSON-config clients

{
  "mcpServers": {
    "documentpro": {
      "type": "http",
      "url": "https://api.documentpro.ai/mcp",
      "headers": { "x-api-key": "YOUR_API_KEY" }
    }
  }
}

Python (MCP SDK)

from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

async with streamablehttp_client(
    "https://api.documentpro.ai/mcp",
    headers={"x-api-key": "YOUR_API_KEY"},
) as (read, write, _):
    async with ClientSession(read, write) as session:
        await session.initialize()
        tools = await session.list_tools()

Tools

11 tools across four groups.

Extraction

Tool Purpose
extract_document Submit a document (file_url or file_base64 ≤7 MB) for structured extraction against a template. Async — returns request_id.
check_extraction_status Poll an extraction job. When request_status is completed, results.data holds the extracted fields.
list_supported_formats File formats accepted by extract_document / classify_document (pdf, png, jpg, jpeg, tiff, tif, txt, doc, docx, html).

Templates (extraction schemas)

Tool Purpose
list_templates List the extraction templates on the account (paginated, searchable).
get_schema Get a template's field definitions — the exact field names extraction results use.
create_template Create a new template from a title and field schema. Agents can define extraction schemas on the fly.
update_template Replace a template's schema and/or rename it.

Template schemas look like:

{
  "fields": [
    {"name": "invoice_number", "type": "text", "description": "The invoice number"},
    {"name": "total", "type": "number"},
    {"name": "line_items", "type": "table", "subFields": [
      {"name": "description", "type": "text"},
      {"name": "amount", "type": "number"}
    ]}
  ]
}

Field names: lowercase letters/digits/underscores/spaces (max 50 chars, unique). Types: text, number, date, radio, checkbox, boolean, object, table. table/object require subFields. Every field is nullable. Optional description (max 500 chars) and enum improve accuracy.

Classification

Tool Purpose
classify_document Assign one of your labels to a document (inline labels or a saved classifier_id). Synchronous — returns label + confidence scores.
create_classifier Save a reusable classifier (name + labels + optional page range).
list_classifiers List saved classifiers with their labels.

New documents are OCR'd automatically before classification; classify_document waits briefly, and returns DOCUMENT_NOT_READY with a document_id if OCR outlasts the wait — retry with that document_id after ~15 seconds.

Account

Tool Purpose
get_credit_balance Check remaining plan and top-up credits before starting a batch job.

Example agent flows

Extract: list_templatesget_schemaextract_document(file_url=...) → poll check_extraction_status(request_id) until completed.

Classify then route: create_classifier(labels=[invoice, purchase_order, other]) once → for each inbound file, classify_document(classifier_id=..., file_url=...) → pick the matching template → extract_document.

Author a template from scratch: get_schema on a similar template for a worked example → create_template(title, schema)extract_document with the new template_id → inspect results → update_template to refine fields.

Errors

Tools return structured errors: {"error_code": ..., "message": ...}.

Code Meaning / agent action
UNAUTHORIZED Missing/unknown API key — fix the x-api-key header.
FORBIDDEN Resource belongs to another account.
NOT_FOUND Bad id — re-list and retry with a valid id.
INVALID_INPUT Input problem; message carries field-level detail — fix and retry.
DOCUMENT_NOT_READY OCR in progress — retry with the returned document_id in ~15s.
INSUFFICIENT_CREDITS Account out of credits — do not retry. Carries credits_remaining and upgrade_url.
PAGE_LIMIT_EXCEEDED Document exceeds the page cap for this account. Carries page_limit.
SCHEMA_UNAVAILABLE Stored template schema can't be rendered — choose another template.
INTERNAL_ERROR Transient server error — retry once, then contact support.

Limits

  • Inline file_base64 uploads: 7 MB decoded max — host larger files and pass file_url.
  • Extraction is asynchronous; classification is synchronous (after OCR).
  • Tool calls are metered by your API key's usage plan, same as the REST API.

Learn more

License

MIT — see LICENSE. This repository documents the DocumentPro MCP server; the server implementation itself is closed-source and hosted by DocumentPro.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选