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 → More Options → 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:
| Category | Tools |
|---|---|
| Search | search_documents, get_document_text, get_document_metadata, export_documents |
| Folders | list_folders, list_folder_contents, get_processing_status |
| UI Control | ui_navigate, ui_select_document, ui_search, get_ui_state, get_search_state, ui_screenshot |
| Files | open_in_finder, open_document_external, get_document_thumbnail |
| Processing | reprocess_document, rescan_folder |
| Config | get_app_status, get_settings |
| License | get_license_status, refresh_license |
MCP uses the same Bearer token authentication as the REST API.
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).
- In PDF Content Search: Settings → More Options → section “MCP”
- Click “Set up Claude Desktop”
- Confirm the explanation dialog with “Continue” (macOS asks for one-time permission to write Claude's configuration file)
- 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