# Taggun — how to use (mcp.ai)

Connect your Taggun account and use 14 tools for document data extraction straight from your AI agent. Connect with your own API key. Taggun is an AI-powered receipt OCR API that extracts structured data from receipt and invoice images in real-time. It supports 85+ languages, fraud detection, and automated expense tracking.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_taggun?ms=1787296020000`
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. `taggun_add_merchant_name`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/taggun`
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/taggun/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/taggun/add/merchant/name` — Tool to add a merchant name keyword to your account's model for predicting merchant names. Use when you want to improve merchant name recognition by training the model with specific merchant names. Ch
  - body: { merchantName: string }
- `POST https://api.mcp.ai/api/taggun/export/known/merchants` — Export the complete list of known merchants used for merchant name normalization in Taggun. Returns CSV data with merchant details including location IDs, names, addresses, and coordinates. Use this w
- `POST https://api.mcp.ai/api/taggun/export/known/product/codes` — Export the complete list of known product codes used for product normalization and matching in Taggun. Returns CSV data with product code information. Use this when you need to retrieve the full produ
- `POST https://api.mcp.ai/api/taggun/export/product/categories` — Export a list of product categories and descriptions used for product categorization in CSV format. Returns CSV data with product category information for analysis or synchronization purposes. Use thi
- `POST https://api.mcp.ai/api/taggun/generate/merchants/csv` — Generate a CSV file with mock merchant data for testing purposes. Creates a temporary CSV file with the specified number of merchant rows, including fields like name, alias, address, coordinates, cont
  - body: { row_count: integer }
- `POST https://api.mcp.ai/api/taggun/import/known/merchants` — Import a list of merchant names and addresses to normalize and match in CSV or TSV format. Use this when you need to bulk upload merchant data for name normalization and matching. File must be less th
  - body: { file: object }
- `POST https://api.mcp.ai/api/taggun/import/known/product/codes` — Tool to import a list of product codes in CSV or TSV format for normalization and matching. Use when you need to upload product code data to Taggun for receipt/invoice processing. The file should cont
  - body: { file?: object, raw_content?: string, raw_filename?: string, raw_mimetype?: string }
- `POST https://api.mcp.ai/api/taggun/import/product/categories` — Import a list of product categories and descriptions for product categorization. Accepts CSV or TSV files (less than 20MB) with category and description columns. Use this when you need to bulk import 
  - body: { file?: object, raw_content?: string, raw_filename?: string, raw_mimetype?: string }
- `POST https://api.mcp.ai/api/taggun/transcribe/receipt/encoded/simple` — Extract structured data from a receipt or invoice using base64 encoded image data. Provide a base64 encoded image (JPEG, PNG, PDF, GIF) along with filename and content type to get back extracted field
  - body: { image: string, refresh?: boolean, filename: string, language?: string, incognito?: boolean, ipAddress?: string, containerId?: string, contentType: string, extractTime?: boolean, ignoreMerchantName?: string }
- `POST https://api.mcp.ai/api/taggun/transcribe/receipt/encoded/verbose` — Tool to transcribe a receipt using base64 encoded image in JSON payload and return detailed results. Use when you have a base64 encoded receipt image and require comprehensive output including line it
  - body: { image: string, refresh?: boolean, filename: string, incognito?: boolean, containerId?: string, contentType: string, extractTime?: boolean, extractLineItems?: boolean, ignoreMerchantName?: string }
- `POST https://api.mcp.ai/api/taggun/transcribe/receipt/file/simple` — Tool to upload a receipt or invoice image file and extract basic data including merchant name, total amount, tax amount, and date. Use when you need to digitize receipt data from a file (PDF, JPG, PNG
  - body: { file: object, near?: string, userId?: string, refresh?: boolean, language?: string, incognito?: boolean, ipAddress?: string, containerId?: string, extractTime?: boolean, referenceId?: string, subAccountId?: string, ignoreMerchantName?: string }
- `POST https://api.mcp.ai/api/taggun/url` — Extract structured data from a receipt or invoice image using OCR. Provide a public URL to a receipt/invoice image (JPEG, PNG, PDF, GIF) and get back extracted fields like total amount, date, merchant
  - body: { url: string, refresh?: boolean, filename?: string, contentType?: string }
- `POST https://api.mcp.ai/api/taggun/url/validation` — Tool to extract and validate receipt data from a URL. Processes a receipt image from a public URL and returns extracted fields with confidence levels to assess receipt authenticity. Use when you have 
  - body: { url: string, filename?: string, doNotSave?: boolean, externalId?: string }
- `POST https://api.mcp.ai/api/taggun/url/verbose` — Tool to process a receipt or invoice from a URL for detailed data extraction. Use when you have a publicly accessible receipt or invoice URL and require comprehensive output including line items, merc
  - body: { url: string, near?: string, refresh?: boolean, language?: string, incognito?: boolean, ipAddress?: string, extractTime?: boolean, referenceId?: string, subAccountId?: string, extractLineItems?: boolean, ignoreMerchantName?: string }

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

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