# OCR.space — how to use (mcp.ai)

Connect your OCR.space account and use 3 tools for document data extraction straight from your AI agent. Connect with your own API key. OCR.space provides a free and paid OCR API for extracting text from images and PDFs, returning results in JSON format.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_ocrspace?ms=1787291460000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `ocrspace_get_conversions`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/ocrspace`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/ocrspace/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/ocrspace/get/conversions` — Retrieve OCR API conversion statistics and usage data (PRO accounts only). Returns the number of conversions for Engine1, Engine2, and total conversions. Data is updated once daily and shows conversio
  - body: { startDate?: string }
- `POST https://api.mcp.ai/api/ocrspace/ocr/parse/image/post` — Extract text from images and PDF documents using OCR (Optical Character Recognition). Supports 27 languages, table recognition, orientation detection, and word-level coordinate extraction. Provide exa
  - body: { url?: string, file?: string, scale?: boolean, isTable?: boolean, filetype?: string, language?: string, OCREngine?: integer, base64Image?: string, detectOrientation?: boolean, isOverlayRequired?: boolean, isCreateSearchablePdf?: boolean, isSearchablePdfHideTextLayer?: boolean }
- `POST https://api.mcp.ai/api/ocrspace/parse/image/url` — Extract text from images via URL using simplified GET endpoint. Only supports URL-based submissions - no file uploads or base64 encoding. Faster and simpler than POST endpoint for basic use cases.
  - body: { url: string, language?: string, isOverlayRequired?: boolean }

## Example prompts
- "What can I do in OCR.space?"
- "Show me a summary of my OCR.space account"

## More
- Page: https://mcp.ai/ocrspace
- Agent spec (llms.txt): https://mcp.ai/ocrspace/llms.txt
- Postman collection: https://mcp.ai/ocrspace/postman.json
