Docsfra
API Documentation
v1

MCP Server

Docsfra ships a hosted MCP (Model Context Protocol) server, so any MCP client — Claude Code, Claude Desktop, Cursor, or your own agents — can use Docsfra directly as a tool: upload documents, search them, ask questions with page-and-box citations, and read the derived AI layers. No integration code required.

Endpoint: https://api.docsfra.com/mcp (Streamable HTTP)

Auth: your own Docsfra API key in the Authorization header — Bearer dip_live_... or Bearer dip_test_... (test keys are metered but never billed). Calls are billed at the standard artifact/query rates.

Connecting

Claude Code (CLI):

claude mcp add --transport http docsfra https://api.docsfra.com/mcp \
  --header "Authorization: Bearer dip_live_..."

Cursor / generic JSON config:

{
  "mcpServers": {
    "docsfra": {
      "url": "https://api.docsfra.com/mcp",
      "headers": { "Authorization": "Bearer dip_live_..." }
    }
  }
}

claude.ai custom connectors (OAuth)

claude.ai's web connectors don't use API-key headers — they use OAuth, and Docsfra supports the full flow (dynamic client registration + PKCE):

  1. In claude.ai: Settings → Connectors → Add custom connector
  2. Paste https://api.docsfra.com/mcp — no key needed
  3. Your browser opens the Docsfra Console: sign in (if needed) and approve

On approval a dedicated API key (named MCP: <client>) is created for your selected tenant and handed to claude.ai as its access token. Revoking access is simply deleting that key in Console → API Keys.

No header support?

Some MCP clients can't set custom headers. Append your key to the URL instead — no other configuration needed:

https://api.docsfra.com/mcp?key=dip_live_...

The key value is masked in our access logs. The Authorization header remains the preferred method. Tip: the Console shows one-click copyable, key-embedded setup snippets right when you create an API key.

Tools

ToolWhat it does
upload_documentUpload a small file (base64, ~200 KB'a kadar pratik — kısa PDF/.eml). Returns the job id. Anything larger: upload via Console or POST /v1/documents, then search/ask here.
get_jobPoll a job: status, ai_status, page count, cost, fresh result URLs.
search_documentsHybrid (vector + full-text + rerank) search across your documents; optional single-document scope.
askRAG question answering grounded only in your documents; every answer carries citations (document, page, and bounding box where layout permits).
cross_checkCompare two or more processed documents' verified reasoning claims (no upper limit); returns cross-document contradiction/support findings, both sides cited with page and exact quote.
get_document_memoryIdentity card, summary, timeline and the segment map (merged scans auto-split into sub-documents with page ranges).
get_document_entitiesTyped entity graph with OCR reconciliation: canonical values, competing OCR variants, confidence and needs_review flags.
get_document_reasoningVerified reasoning claims (obligation / condition / deadline / prohibition / …), each anchored to a verbatim quote found in the document — hallucination-shielded.

A typical agent flow

  1. upload_document → job id
  2. get_job until status=completed and ai_status=ready
  3. get_document_memory → understand what the file contains (segments)
  4. ask scoped to the document → cited answers; get_document_reasoning / get_document_entities for structured cross-checks

All authorization, tenant isolation and billing are enforced by the same /v1 API contract documented in the rest of these pages — the MCP server is a thin, stateless surface over it and never stores your key.