MCP server

Connect Cursor, Claude Code, or any MCP client to Doxtract. Parse PDFs and images into JSON that matches your layout (send it in the `schema` JSON field), and manage saved layouts, over remote MCP.

Endpoint

The server speaks JSON-RPC 2.0 over Streamable HTTP at POST https://doxtract.manoonlabs.com/mcp. Each response is a single JSON body. Protocol 2025-06-18, server name doxtract. It runs the same operations as the REST API.

Authentication

initialize, ping, tools/list, and notifications answer without a key, so a client can connect and see the tools first. tools/call needs an API key, sent as Authorization: Bearer <key> or x-api-key: <key>. Without a valid key it returns HTTP 401 with a JSON-RPC error that says where to get one.

Get an API key. Sign up, create a key, and copy the secret. It is shown once. Each parsed page costs 1 credit, the same as REST. See the pricing page.

Connect a client

Cursor reads .cursor/mcp.json. Claude Code registers the HTTP server from a terminal. Replace mldxt_... with your key, then call whoami to confirm the workspace.

.cursor/mcp.json
{
  "mcpServers": {
    "doxtract": {
      "url": "https://doxtract.manoonlabs.com/mcp",
      "headers": {
        "Authorization": "Bearer mldxt_..."
      }
    }
  }
}

Tools

This is the list tools/list returns. parse_document takes the file as file_base64 (base64), or plain text as text, an optional layout (the `schema` argument, same name as REST), and citations: true to get the page and box each value was read from, the same names as the REST JSON body. Every tool acts on the workspace that owns the key.

  • whoami

    Return the workspace and token for the bearer credential, and the credits left this month.

    Arguments: none

  • parse_document

    Extract structured fields from a PDF, PNG, JPEG, or text file sent as base64 in file_base64, or from plain text sent in text (10 MB and 10 pages on Free, 25 MB on paid; pages per document by plan: Starter 50, Pro 200, Business 500). 1 credit per page; an image is 1 page; text is 1 credit per 3,000 characters. Nothing is stored. Send exactly one of file_base64 or text. The result has status and values. Set citations to true to also get, for each value, the page, the printed text, and a box where it was read.

    Arguments: schema, file_base64, text, citations, strict

  • list_schemas

    List the extraction layouts saved in this workspace.

    Arguments: none

  • get_schema

    Read one saved extraction layout by slug.

    Arguments: slug (required)

  • create_schema

    Save an extraction layout in this workspace. The slug (API id) is derived from the display name. A layout is {"type":"object","properties":{...}}. Each property is {"type":T} where T is one of any, null, boolean, string, number, date, array, object. An optional description, at most 400 characters, tells the model how to read that key. An optional required array lists the keys that must be present. A date is a string yyyy-mm-dd. An array adds "items" (one node). An object adds "properties" and may add "required". At most 4 levels below the root, 100 keys, and 16384 bytes.

    Arguments: name (required), schema (required)

  • update_schema

    Update a saved layout's display name and/or definition. A layout is {"type":"object","properties":{...}}. Each property is {"type":T} where T is one of any, null, boolean, string, number, date, array, object. An optional description, at most 400 characters, tells the model how to read that key. An optional required array lists the keys that must be present. A date is a string yyyy-mm-dd. An array adds "items" (one node). An object adds "properties" and may add "required". At most 4 levels below the root, 100 keys, and 16384 bytes.

    Arguments: slug (required), name, schema

Example messages

tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "parse_document",
    "arguments": {
      "file_base64": "<base64 PDF, PNG, or JPEG>",
      "schema": "invoice"
    }
  }
}

Full request and response details are in the API docs.