Docspeed
Extract structured fields and ask cited questions about PDFs and images through a hosted MCP server.
Hosted MCP Server
npx add-mcp 'https://api.docspeed.ai/mcp/'Installs into Claude Code, Codex, Cursor and more
Documentation
Your agent. Docspeed document tools.
Read and structure documents, extract fields and tables, ask cited questions, compare document evidence, or build a reusable workflow with Docster inside the agent you already use.
Create an account Connect your agent
New accounts created directly with Docspeed start with 10 credits of API balance. Check your balance in the dashboard. Hosted Claude connects through OAuth; terminal clients can use an API key. Paid top-ups are currently unavailable.
Native MCP connection · Optional companion skill for terminal clients · No ZIP or Python required
Official MCP Registry record: ai.docspeed/docspeed · 0.1.0 (JSON). Install and connect below; a registry listing does not automatically install or enable tools in your client.
Connect Claude (claude.ai)
You need a verified Docspeed account with sufficient API balance, and a Claude account with custom connectors available. Organization admins may control connector access. Normal Docspeed processing and Docster validation charges apply; connecting does not grant free processing or change account limits.
- In claude.ai → Settings → Connectors, choose Add custom connector. Enter Docspeed and the remote MCP URL
https://api.docspeed.ai/mcp/. - Leave advanced OAuth client ID and client secret fields empty. Claude uses OAuth dynamic client registration (DCR), authorization code and S256 PKCE. No static headers, API key, shared client secret or pre-pasted access token is needed.
- Choose Connect, sign in to Docspeed, and review the consent screen, client name, redirect destination and
documentsscope. Choose Allow only for the connection you intend, or Deny to cancel. An existing Docspeed sign-in can skip the password step; a new authorization still requires consent. - Enable Docspeed in your conversation and review Claude's tool permission prompts. The connector exposes 19 document/workflow tools. Check
files_geton an uploaded file before starting processing.
To revoke access, open Docspeed → Connected tools and disconnect the Claude grant; you can also remove the connector in Claude. Docspeed disconnect revokes that grant's access and refresh tokens. A later connection requires fresh consent. Disconnecting does not delete uploaded documents, Ask sessions or saved workflows.
Supply documents from the same Docspeed account
Open Playground → Upload, sign in with the account used for consent, and upload an authorized PDF or supported document image. Select the uploaded document, open Parse → Get API Code, and copy only the input.file_id shown in the request example; no Parse run is needed. Give that ID to Claude, without an API key. Reuse that ID for later operations. A file from another account is unavailable even if its identifier is known.
Importing Claude chat attachments is unavailable: files_import is disabled. Attaching a PDF to Claude does not create a Docspeed file ID. The server cannot read a local path or ingest an arbitrary URL. Use Playground or an authenticated same-account direct upload; files_upload also accepts small base64 inputs. See terminal upload for local clients.
“Using Docspeed file_id MY_UPLOADED_FILE_ID, extract the invoice number, currency and total with source evidence. Keep absent values null.”
Quota-aware use and recovery
Run document calls serially, reuse uploaded IDs and Ask session IDs, and wait for complete results. Long operations can take several minutes. Your account's balance, page and concurrency limits still apply. For document_busy or HTTP 429, wait for the reported retry interval before another attempt. For insufficient balance (402), check the dashboard or contact support; do not repeatedly rerun paid operations.
A missing file or page: check the account, file_id, page count and zero-based page index with files_get. An invalid schema: correct the reported field, including required field descriptions. An expired/revoked connection (401): reconnect through consent. A timeout with an uncertain Docster outcome: keep the attempt_id and check docster_status before resubmitting a build or revision. A running or needs_revision attempt is not ready.
Docster build and revision require your supplied happy, unhappy and stress cases with independent source-backed contracts. Read the supplied-case contract and complete example below. MCP Docster cannot generate replacement validation documents or other images/PDFs.
See error guidance, support or email [email protected]. Include the tool, time, error code and trace ID when provided; never send an API key, OAuth token or password. Review processors and privacy notices, document, question and workflow retention, and terms before uploading.
Connect Codex or Claude Code in a terminal
Create your account and API key. Open your document project in a macOS or Linux terminal using Bash or zsh. Run this block, paste the key at the hidden prompt, and press Enter:
printf 'Docspeed API key (input hidden): '
read -r -s DOCSPEED_API_KEY
printf '\n'
export DOCSPEED_API_KEY
The key stays in this terminal's environment, outside command history and MCP configuration. Keep this terminal open for installation and launch; repeat the hidden prompt in a new terminal. Do not paste the key into chat or shared files. A separately launched desktop app does not automatically inherit this terminal's key; these steps launch the terminal clients.
Open a terminal in your document project. Choose your installed client and paste its command. It adds the native MCP connection and fetches the companion skill directly. Already customized this skill? Preserve it and use the ZIP installer's conflict checks.
Codex
codex mcp add docspeed --url https://api.docspeed.ai/mcp/ --bearer-token-env-var DOCSPEED_API_KEY && \
mkdir -p .agents/skills/docspeed-documents/agents .agents/skills/docspeed-documents/scripts && \
curl --fail --silent --show-error https://api.docspeed.ai/agent-tools/skills/docspeed-documents/SKILL.md -o .agents/skills/docspeed-documents/SKILL.md && \
curl --fail --silent --show-error https://api.docspeed.ai/agent-tools/skills/docspeed-documents/agents/openai.yaml -o .agents/skills/docspeed-documents/agents/openai.yaml && \
curl --fail --silent --show-error https://api.docspeed.ai/agent-tools/skills/docspeed-documents/scripts/upload.py -o .agents/skills/docspeed-documents/scripts/upload.py
Codex registers the MCP server in your user configuration and the skill in this project. From the same terminal, start a fresh session here:
codex -c mcp_servers.docspeed.tool_timeout_sec=1200
The timeout preserves normal permissions. For recurring use, set tool_timeout_sec = 1200 in the Docspeed server table below.
Claude Code
claude mcp add --transport http --scope project docspeed https://api.docspeed.ai/mcp/ --header 'Authorization: Bearer ${DOCSPEED_API_KEY}' && \
mkdir -p .claude/skills/docspeed-documents/scripts && \
curl --fail --silent --show-error https://api.docspeed.ai/agent-tools/skills/docspeed-documents/SKILL.md -o .claude/skills/docspeed-documents/SKILL.md && \
curl --fail --silent --show-error https://api.docspeed.ai/agent-tools/skills/docspeed-documents/scripts/upload.py -o .claude/skills/docspeed-documents/scripts/upload.py
Claude registers both in this project. Keep the server name and URL before --header, and keep the single quotes so the saved configuration contains the variable name, never the key. From the same terminal, launch:
MCP_TOOL_TIMEOUT=1200000 claude
If claude mcp get docspeed shows Pending approval, start the interactive session above, accept the workspace trust prompt for your project, and review and approve the docspeed project MCP server when asked. Registration alone does not approve the connection.
Your first grounded result
Inside the new client session, enter /mcp (not in your terminal shell). Follow the client's normal trust and tool permission prompts: review the connection, then allow the requested document operation when you intend to send that document. Confirm Docspeed is connected and the docspeed-documents skill is available. Attach an authorized invoice and ask:
“Extract the invoice number, supplier, currency, tax, total, and every line item. Show the supporting page and source evidence for each value. Mark values absent from the document as missing.”
Check each returned value against the original and open its source evidence. Uploading sends the document to Docspeed and normal processing charges apply. A connected server proves discovery, not document accuracy.
If MCP is still connecting, the skill retries discovery once. If tools remain unavailable, it explicitly offers native/local reading for you to choose. Ask provides source boxes that make answers easier to check in scans and long documents.
Read the skill before installing. Commands follow the Codex MCP documentation and Claude MCP documentation.
Upload a local document in one command
With DOCSPEED_API_KEY set in the same terminal, run the installed helper on a document you authorize sending to Docspeed. Python 3.10+ is needed for this optional helper, with no extra packages:
# Codex project:
python3 .agents/skills/docspeed-documents/scripts/upload.py "/absolute/path/to/document.pdf"
# Claude Code project:
python3 .claude/skills/docspeed-documents/scripts/upload.py "/absolute/path/to/document.pdf"
The helper streams multipart bytes directly to POST https://api.docspeed.ai/api/v1/upload using the existing files form field. It keeps document bytes out of your agent conversation and prints only:
{"file_id":"your-returned-file-id","filename":"document.pdf"}
Give that reference to your agent with your document question. Use file_id in each tool's actual file_id or file_ids parameter; Docster samples also use filename. Reuse it across calls. The upload and MCP connection must belong to the same account.
The helper accepts one nonempty supported PDF/image up to 50 MiB; the API validates it. It reads the key only from the environment, requires verified HTTPS, and follows no redirects or automatic retries. If a connection fails after sending bytes, the upload outcome can be unknown; do not blindly retry. No URL publishing or new credential flow is needed. Uploading does not itself run extraction.
Use direct upload for anything larger than 4 KiB. For a tiny files_upload input only, this portable Python/stdin command works on macOS and Linux and refuses larger files:
python3 -c 'import base64,sys; data=sys.stdin.buffer.read(4097); len(data)<=4096 or sys.exit("Use direct upload for files larger than 4 KiB"); print(base64.b64encode(data).decode("ascii"))' < "/absolute/path/to/tiny.pdf"
Pass that tiny result as content_base64 with the original filename. Never print a larger document's base64 into the conversation.
Inspect a result before integrating
Open the original synthetic invoice beside its recorded extraction. Select a field or line-item cell to see the exact source region returned with that value, then download the PDF and result JSON.
Explore the source-review example
One recorded Codex run: 11 invoice fields and 15 line-item values were checked against the source. This is a historical synthetic test, not a live demo, a customer result or a general accuracy guarantee. No API key or processing charge is needed to inspect it.
Or inspect a recorded Q&A and follow-up with source citations. This synthetic invoice example shows two saved Ask calls from an internal MCP check, with the returned answers and source areas. It is not a recorded agent conversation or a live processing demo.
Compare two synthetic agreements with cited Q&A. This recorded direct API run shows a notice-period comparison and its source boxes. The initial fee answer omits the payer and due date; both limitations are visible alongside the original passages.
- Inspect the evidence. Compare a returned value with the text inside its source box. The example preserves printed zero and numeric types.
- Connect the tools. Follow the setup below using your own account and the package's full capability guide.
- Try your document task. Use the direct upload command for an authorized PDF/image and give its returned file ID to your agent. Tiny inputs can also use
files_upload. The hosted MCP cannot read a local path or ingest a URL on its own. Normal processing charges apply.
Choose the operation your application needs: OCR or Parse for document content; Classify and Split for packets; Layout, Tables, Charts or Equations for page elements; Schema Auto and Extract for fields; Ask for cited answers; Compare for corresponding document values. Synthesize uses its separate API and is not exposed in the current MCP catalog; fidelity limits remain under validation. Docster adds reusable workflows through the authenticated interface described below. The download explains the supported paths and limitations.
MCP compare returns a compact verdict, items and source evidence by default. Set include_extractions: true for full per-document extractions. Both modes keep source page geometry and unchanged grounding regions; existing HTTP API clients keep the full response by default.
ZIP installer fallback
Download the integration ZIP. Unpack the download and open a terminal inside docspeed-agent-tools. Use Python 3.10 or later. On Python 3.10, install its TOML dependency with python3 -m pip install -r requirements.txt; Python 3.11+ uses its standard library.
Set your API key with the hidden prompt above, then run the helper and launch your client from that same terminal. Keep the key out of chat and shared files.
1. Check the connection
python3 scripts/setup.py check --catalog-out /tmp/docspeed-tools.json
The check authenticates, initializes MCP, and lists the available tools. It does not upload a document or run extraction.
2. Install for your client
python3 scripts/setup.py install --client codex --project /absolute/path/to/your/project
# For Claude Code:
python3 scripts/setup.py install --client claude --project /absolute/path/to/your/project
The installer adds the project connection and skill, preserves unrelated settings, and stores only the credential variable name. Conflicting existing Docspeed settings require manual review.
3. Start a fresh session
Open the project in your agent, follow its normal trust and permission controls, and inspect /mcp. The connection must be active before tools can be selected. Installing the package does not inject tools into an existing conversation.
Optional Codex direct MCP configuration
For Codex clients with Code Mode, add --codex-direct-mcp to the installer command to expose the DocSpeed namespace directly. This configuration was used in a recorded native MCP call with Codex CLI 0.159.2; it is not a universal requirement or a guarantee of selection. The full catalog remains available and your model, trust, and approval settings remain unchanged. Review existing custom Code Mode settings before merging the included config/codex-direct-mcp.toml snippet.
Claude Code project servers also need the client's normal MCP approval. A healthy MCP connection is separate from access to a Claude model.
Ask for the result you need
“Extract the supplier, invoice number, tax, total, and every line item from this PDF. Include evidence for each value.”
“Across these policy PDFs, which exclusions apply to flood damage? Cite the relevant pages.”
“Build a reusable invoice, purchase order, and receipt reconciliation workflow with a review screen and an API endpoint.”
The companion skill helps the agent recognize these tasks even when you do not name Docspeed. Selection still depends on the request, available tools, and permissions. Explicit provider choices and local-only requirements take precedence.
Build with Docster
Docster workflow builds are available to authenticated Docspeed accounts through hosted OAuth or a standard Docspeed API key. Normal usage charges and workflow validation apply.
Run python3 scripts/setup.py check --require-docster to require the complete build, status, revise, and invoke interface. If those tools are missing, the connected deployment cannot accept a Docster handoff.
docster_build starts with clarification, retains an attempt_id, then builds the requested workflow. Check docster_status and its validation evidence; a solution is ready only when its status is ready. Use docster_revise to update it and docster_invoke to run it on new uploaded documents.
For build and revision, supply the three uploaded validation_cases described in the public contract. MCP Docster uses only those documents and does not generate validation media.
Document tools run synchronously. Legacy agent-definition and job APIs are not exposed through this MCP catalog. Building a private workflow does not publish it or authorize sending results to other people.
Docster supplied-validation-case contract
This contract applies to docster_build with phase: "build" and to docster_revise, including title-only revisions. Start docster_build with phase: "clarify" and your workflow prompt; retain its attempt_id, answer its clarification questions, then submit the build with that ID and the cases. Optional clarification samples belong in attachments; they do not replace the required cases.
Download the complete three-case build example (JSON) and case JSON Schema. The original, deterministic test invoices are happy, unhappy and stress. They contain synthetic review data and are supplied by you after upload; Docster does not generate them. Replace each placeholder file ID with the result of uploading that PDF to your own account, and replace ATTEMPT_ID_FROM_CLARIFY with your retained attempt ID. These fixtures are an illustrative extraction contract, not a benchmark or a guarantee for your documents.
validation_cases: exactly three entries, one each withscenarioequal tohappy,unhappyandstress. Happy checks correct supported values; unhappy checks missing required evidence; stress checks dense or difficult inputs without reducing coverage.- Each case has
documents(1–12): account-ownedfile_id,filenameand a uniquerole; optionaldocument_keymaps to the workflow input ID anddocument_typenames its category. Every required workflow input role must appear in every case. scenario_contract.verdict:pass,failorreview. Itsdocumentsmust match the supplied roles exactly, withdocument_type, 1–40 positiverequired_factsactually present in that source, and optionalexcluded_topics(up to 40). An absent fact belongs in the expected missing-evidence assertion, not in positive required facts.expected_items(1–80):id,label,description,status(match,mismatch,missing_evidence,revieworunrelated),severity(info,warningorblocking),expected_values(0–20 stringname/valuepairs), and booleanevidence_required. A supported present value needs source evidence; an absent value cannot have a fabricated citation.forbidden_findingsis a required list (0–40) of disallowed findings. Unknown object fields are rejected. The downloadable schema specifies field lengths and types.
Write expected facts and values independently from the source before scoring. They are evaluator inputs only: runtime extraction and answers must come from submitted documents, never from the expected answers. The service checks document ownership, reads and audits the supplied sources, then validates the workflow against the contracts. ready requires passing validation bound to the current workflow version; an expected unhappy-case review verdict can be a passing test of correct abstention.
Example: missing required invoice number (unhappy case)
{
"scenario": "unhappy",
"documents": [
{
"file_id": "UNHAPPY_FILE_ID",
"filename": "unhappy.pdf",
"role": "invoice",
"document_type": "invoice"
}
],
"scenario_contract": {
"verdict": "review",
"documents": [
{
"role": "invoice",
"document_type": "invoice",
"required_facts": [
"Supplier: Example Review Services",
"Purchase order: PO-MCP-UNHAPPY-101",
"Currency: USD",
"Total USD 120.00",
"Calibration service: quantity 4, unit price 25.00, amount 100.00"
]
}
],
"expected_items": [
{
"id": "unhappy_missing_invoice_number",
"label": "Missing required field: invoice_number",
"status": "missing_evidence",
"severity": "blocking",
"description": "The absent required invoice number remains null without source regions.",
"expected_values": [
{
"name": "invoice_number",
"value": "absent"
}
],
"evidence_required": false
}
],
"forbidden_findings": [
"unsupported Ask primitive",
"unsupported Compare primitive",
"inferred missing value"
]
}
}
For revision, pass the same cases with the retained attempt_id to docster_revise. For a title-only change also pass revision: {"kind":"title_only","title":"New display title"}; validation is still required. Invoke a ready workflow with new account-owned documents via docster_invoke.
DOCSTER_MCP_VALIDATION_DOCUMENTS_REQUIRED means cases, roles or contracts need correction or upload. DOCSTER_MCP_DOCUMENT_GENERATION_FORBIDDEN means the requested generation is unavailable through this connector. No automatic substitute documents, omitted scenarios or weaker readiness checks are used.
Manual connection
Streamable HTTP endpoint: https://api.docspeed.ai/mcp/. Hosted Claude uses OAuth; terminal configurations below use a Docspeed API key as a bearer token. Both /mcp and /mcp/ are supported without redirects.
Codex configuration
[mcp_servers.docspeed]
url = "https://api.docspeed.ai/mcp/"
bearer_token_env_var = "DOCSPEED_API_KEY"
startup_timeout_sec = 30
tool_timeout_sec = 1200
Add this to your project .codex/config.toml or user configuration. The download also contains Claude Code configuration, portable plugin manifests, the companion skill, and a routing evaluation runner.
Inputs and evidence
Production supports PDF, PNG, JPEG/JPG, TIFF/TIF, WebP, BMP, and GIF. Multi-page TIFF is page-indexed. Native Word/Excel (DOCX/XLSX) workflows are available through separate beta APIs by contacting Docspeed.
Uploading sends the selected documents to Docspeed; use only files authorized for the workflow. Processing and builds use your normal API quota and billing. Grounded results preserve their source regions; missing values and processing failures must remain explicit.
A successful connection check proves discovery, not document accuracy or workflow completion. The included selection evaluation measures routing decisions separately from real tool execution and document quality.
Full guide included in the download · Codex MCP reference · Claude Code MCP reference