DocumentPro MCP
OfficialDocumentPro 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/mcpTransport: Streamable HTTP (stateless, JSON responses)
Auth: DocumentPro API key in the
x-api-keyheader — create one freeBilling: 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()Related MCP server: Invoice Parser MCP
Tools
11 tools across four groups.
Extraction
Tool | Purpose |
| Submit a document ( |
| Poll an extraction job. When |
| File formats accepted by |
Templates (extraction schemas)
Tool | Purpose |
| List the extraction templates on the account (paginated, searchable). |
| Get a template's field definitions — the exact field names extraction results use. |
| Create a new template from a title and field schema. Agents can define extraction schemas on the fly. |
| 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 |
| Assign one of your labels to a document (inline |
| Save a reusable classifier (name + labels + optional page range). |
| 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 |
| Check remaining plan and top-up credits before starting a batch job. |
Example agent flows
Extract: list_templates → get_schema → extract_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 |
| Missing/unknown API key — fix the |
| Resource belongs to another account. |
| Bad id — re-list and retry with a valid id. |
| Input problem; message carries field-level detail — fix and retry. |
| OCR in progress — retry with the returned |
| Account out of credits — do not retry. Carries |
| Document exceeds the page cap for this account. Carries |
| Stored template schema can't be rendered — choose another template. |
| Transient server error — retry once, then contact support. |
Limits
Inline
file_base64uploads: 7 MB decoded max — host larger files and passfile_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
DocumentPro + MCP — quickstart and setup for any MCP client
Full API documentation — REST reference, guides
Sign up — free tier, no credit card
Contact — custom templates, high-volume use
License
MIT — see LICENSE. This repository documents the DocumentPro MCP server; the server implementation itself is closed-source and hosted by DocumentPro.
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/documentpro/documentpro-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server