Zum Hauptinhalt springen

API & Automation

PDF Content Search provides a comprehensive programming interface for integration with automation scripts, AI assistants and custom applications.

REST API

The built-in HTTP server provides over 70 endpoints at http://127.0.0.1:44477/api/v1/. The API covers the following areas:

  • Search: Full-text search, document text, metadata, batch export
  • Folders: List folders, view contents, processing status
  • Documents: Metadata, thumbnails, OCR bounding boxes, reprocessing
  • Settings: Read and modify app settings
  • UI Control: Navigation, zoom, page switching, filters, sorting, screenshot
  • Mobile Sync: Connected device status, trigger synchronization
  • Cloud: Cloud processing status and control

The full API documentation is available interactively at http://127.0.0.1:44477/api/v1/docs. The OpenAPI specification can be retrieved at http://127.0.0.1:44477/api/v1/openapi.yaml.

Authentication

In release builds, a Bearer token is required. Configure it under Settings → Integrations → API Server. The /health and /docs endpoints are accessible without authentication.

curl -H "Authorization: Bearer YOUR_TOKEN" \
     http://127.0.0.1:44477/api/v1/search \
     -d '{"query": "invoice 2024"}'

MCP (Model Context Protocol)

For integration with AI assistants like Claude, the app supports the Model Context Protocol (MCP) via JSON-RPC 2.0 at the /mcp endpoint. 22 tools are available:

CategoryTools
Searchsearch_documents, get_document_text, get_document_metadata, export_documents
Folderslist_folders, list_folder_contents, get_processing_status
UI Controlui_navigate, ui_select_document, ui_search, get_ui_state, get_search_state, ui_screenshot
Filesopen_in_finder, open_document_external, get_document_thumbnail
Processingreprocess_document, rescan_folder
Configget_app_status, get_settings
Licenseget_license_status, refresh_license

MCP uses the same Bearer token authentication as the REST API.

MCP Tools (Overview)

The overview below lists every MCP tool of the app, grouped by area. Tools marked “(requires confirmation)” change data irreversibly or touch license/pairing state and require confirm: true.

Search & Documents

ToolFunction
search_documentsFull-text search across all indexed documents
get_document_textGet a document's full OCR text, by page
get_document_metadataDocument metadata (name, path, pages, state)
get_document_thumbnailPNG thumbnail of a document page (base64)
get_document_ocr_rectsOCR bounding boxes of a document
export_documentsExport OCR text and metadata for multiple documents
reprocess_documentRe-queue a document for OCR
delete_documentDelete a single document from the index (requires confirmation)
bulk_delete_documentsDelete multiple documents at once (requires confirmation)

Folders & Processing

ToolFunction
list_foldersList all indexed folders
list_folder_contentsList documents in a folder (paginated)
get_folder_statsAggregate stats for a folder
get_folder_processing_statusOCR processing status of a folder
add_folderAdd a folder to the index by absolute path
delete_folderRemove a folder from the index (requires confirmation)
rescan_folderRescan a folder for new or changed files
get_processing_statusOCR statistics across all documents and folders
get_processing_progressLive OCR processing progress

Scans

ToolFunction
list_recent_scansList recently scanned items
get_unread_scan_countCount of unread recent scans
mark_scan_as_readMark a recent scan as read

Mail & Attachments

ToolFunction
get_mail_message_metadataHeader/mailbox metadata of a mail (message-id)
open_in_apple_mailOpen a mail in Apple Mail (same Mac only)
get_mail_index_statusApple Mail indexer status
get_mail_recentList most recently indexed mails
get_mail_mailboxesList mailboxes from the Apple Mail index
setup_apple_mailConfigure and enable Apple Mail indexing
disable_apple_mailDisable Apple Mail indexing
clear_mail_indexClear the mail index and reset the cursor
reindex_apple_mailTrigger an indexer run
get_mail_full_index_statusCounters across all mail records (completeness)
list_incomplete_mailsList mails not successfully indexed
retry_incomplete_mailsRetry indexing of incomplete mails
cleanup_stale_mail_metaGarbage-collect stale mail records
list_mail_cloud_jobsList Office-attachment cloud jobs
retry_failed_mail_cloud_jobsRetry failed cloud jobs
cancel_pending_mail_cloud_jobsCancel pending cloud jobs
tick_mail_cloud_workerTrigger an immediate cloud-worker tick
get_mail_detailFull detail of an indexed mail
get_mail_by_rowidGet an indexed mail by rowid
reveal_mail_in_finderReveal the .emlx file in Finder (same Mac only)
list_mail_attachmentsList attachments of an indexed mail
get_mail_attachmentFetch a single attachment of a mail

Settings

ToolFunction
get_settingsGet current app settings
patch_settings_searchUpdate search settings
patch_settings_processingUpdate OCR/processing settings
patch_settings_appearanceUpdate appearance settings
patch_settings_sharingUpdate mobile-sharing settings

UI Control

ToolFunction
get_ui_stateGet current UI state
get_search_stateGet animated OCR hits in the preview
ui_searchTrigger a search in the app UI
ui_navigateNavigate within the document list
ui_select_documentSelect a document in the list
ui_screenshotScreenshot of the main window
open_in_finderReveal a document in Finder (same Mac only)
open_document_externalOpen a document externally (same Mac only)
ui_list_itemsList items currently shown in the list
ui_get_zoomGet the preview zoom state
ui_set_zoomSet the preview zoom
ui_get_pageGet the current preview page
ui_set_pageNavigate the preview page
ui_get_transcriptGet the transcript panel state
ui_set_transcriptShow/hide the transcript panel
ui_get_sortGet the current sort order
ui_set_sortSet the list sort order
ui_get_filtersGet active list filters
ui_set_filtersSet list filters
ui_get_popupsList open popups/sheets
ui_dismiss_popupDismiss a popup/sheet
ui_list_alertsList open alerts
ui_dismiss_alertDismiss alerts

License

ToolFunction
get_license_statusGet current license status
refresh_licenseRe-sync license status with the server
activate_licenseActivate a license by key (requires confirmation)
deactivate_licenseDeactivate the current license (requires confirmation)
request_trialStart a trial period (requires confirmation)

Cloud

ToolFunction
get_cloud_statusGet cloud-service status
list_cloud_itemsList cloud-service items
cloud_syncControl the cloud service (toggle, cleanup)

Mobile

ToolFunction
get_mobile_sync_statusMobile-sync status
list_mobile_devicesList folders shared with mobile devices
mobile_syncTrigger a mobile sync
confirm_mobile_pairingConfirm device pairing with a 9-digit code (requires confirmation)

App Status

ToolFunction
get_app_statusApp status, version, uptime and port

Set up Claude Desktop (one click)

PDF Content Search ships with a one-click installer for Claude Desktop. It takes care of the entire configuration — no need to edit JSON files by hand.

Prerequisite: Claude Desktop is installed (claude.ai/download).

  1. In PDF Content Search: Settings → Integrations → section “MCP”
  2. Click “Set up Claude Desktop”
  3. Confirm the explanation dialog with “Continue” (macOS asks for one-time permission to write Claude's configuration file)
  4. Restart Claude Desktop

Behind the scenes, the app automatically enables the API server, generates a secure access token, adds the server entry to ~/Library/Application Support/Claude/claude_desktop_config.json, and installs a small helper binary (pdf-content-search-mcp) inside the app bundle that bridges Claude Desktop's stdio transport with the app's HTTP MCP endpoint.

Existing entries under mcpServers or other top-level keys are preserved — the installer performs a clean JSON merge. A “Remove from Claude Desktop” button in the same section removes the entry.

Other MCP clients (e.g. Claude Code or custom integrations that support HTTP/SSE transport) can still talk to the server directly over HTTP. The app provides both configuration snippets (HTTP and stdio) via the “Configuration snippet for other MCP clients…” button.

Use Cases

  • Automation scripts: Search documents via REST API and process results further
  • AI assistants: Claude or other LLMs can access your documents directly via MCP
  • Custom integrations: Client libraries can be generated from the OpenAPI specification