docreadi-mcp
A local MCP server for DocReadi — document data extraction for finance. It runs on your machine, reads documents off your disk, and calls the hosted DocReadi API with your API key, so an AI client (Claude Desktop, Claude Code, Cursor, …) can extract documents and query your DocReadi corpus without leaving the chat.
Status: v1 published — on PyPI as
docreadi-mcp; run withuvx docreadi-mcp(see Install / configure below). Plan + history:../../MCP_SERVER_PLAN.md.
How it works
Your MCP client spawns docreadi-mcp as a local subprocess and talks to it over
stdio. The server is a thin courier — all extraction/storage happens on the
hosted DocReadi API; the server just translates tool calls into HTTPS requests
and (for ingestion) reads local files. Your API key lives only in your client
config, never in this repo.
Install / configure
Add the server to your MCP client config with your DocReadi API key (get one at docreadi.com → Settings → API keys):
{
"mcpServers": {
"docreadi": {
"command": "uvx",
"args": ["docreadi-mcp"],
"env": {
"DOCREADI_API_KEY": "dr_live_…"
// "DOCREADI_BASE_URL": "https://docreadi.com" // override if self-hosting
}
}
}
}
| Env var | Required | Default |
|---|---|---|
DOCREADI_API_KEY |
yes | — |
DOCREADI_BASE_URL |
no | https://docreadi.com |
Tools
| Tool | What it does |
|---|---|
check_connection |
First-run self-test — is DocReadi reachable and is your API key valid? Never errors; returns a diagnostic. |
extract_document |
Extract structured data from a local PDF/JPG/PNG — uploads, waits for extraction, returns the fields + line items + totals + confidence. |
get_document |
Fetch a document's status + extracted data by id. |
extract_adhoc |
One-off, non-destructive extraction of caller-defined fields from a document already in DocReadi (e.g. "who signed these delivery notes?"). |
classify_document |
(Re)classify a document's type; returns the type + reasoning. |
search_documents |
Search/list the workspace's documents (by vendor, number, type, status, or date range) — a summary row per match. |
list_counterparties |
List vendors/customers (VAT, aliases, doc counts), paginated. |
list_reports |
List the workspace's saved reports. |
run_report |
Run a saved report and return its rows — the way to query/search the corpus. |
export_report_csv |
Run a saved report and write the result as a CSV to a local path. |
(search_documents is the raw query surface; for richer column selection and
saved queries, author a report in the UI and use run_report /
export_report_csv.)
Verify your key (--check)
Before wiring it into a client, confirm the service is reachable and your key works — straight from a terminal, no MCP client needed:
DOCREADI_API_KEY=dr_live_… uvx docreadi-mcp --check
# ✓ Connected — DocReadi reachable at https://docreadi.com, API key valid.
Exit code: 0 connected · 1 reachable but the key failed · 2 no key set.
(docreadi-mcp --version prints the version; no flags runs the server over
stdio.)
Development
This package lives in the DocReadi monorepo so it's reviewed and CI'd alongside
the API it wraps. Its layering keeps the dependency-free parts testable in the
main CI without the mcp SDK:
docreadi_mcp/config.py— env config.docreadi_mcp/catalog.py— pure-data tool→endpoint registry (the maintenance anchor:tests/test_mcp_catalog_contract.pybinds it toagent_guide.GUIDE).docreadi_mcp/client.py— httpx client (tested withMockTransport).docreadi_mcp/server.py— thin FastMCP glue (lazy-imports themcpSDK).
# from the repo root
pip install -e services/mcp # installs mcp + httpx
DOCREADI_API_KEY=dr_… python -m docreadi_mcp # run over stdio
Maintenance contract: when a DocReadi API endpoint a tool wraps changes,
update docreadi_mcp/catalog.py (and the tool) — the contract test fails CI
otherwise. See MCP_SERVER_PLAN.md §5.
Metadata
Release files for docreadi-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| docreadi_mcp-0.1.1.tar.gz | 13.3 kB | Without provenance | Details for docreadi_mcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| docreadi_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for docreadi_mcp-0.1.1-py3-none-any.whl |
Total release size: 29.0 kB
Release files / docreadi_mcp-0.1.1.tar.gz
| Download URL | docreadi_mcp-0.1.1.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a55a1c04718b909780fe96104ea0020337f993e56cb26dd9342bb0584a3262b
|
|
BLAKE2b-256 checksum How to use checksums |
2e321fff02930230279d5e1d984c7c6829365b4ccbf329339e62d0304fa30b63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / docreadi_mcp-0.1.1-py3-none-any.whl
| Download URL | docreadi_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc4f8419fee0df2ee20044196537145512dd122ec5239633ecd9c941efec35a0
|
|
BLAKE2b-256 checksum How to use checksums |
5cce47bc4d790c8edb8e12ef801a265cd7cfcc43374aa78d1bd3d2f580a55f28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for docreadi-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.