
# Using LDX hub with AI Assistants (MCP)

LDX hub supports the [Model Context Protocol (MCP)](https://modelcontextprotocol.io), which allows you to use all of LDX hub's document-processing services directly from AI assistants like Claude Desktop — without writing any code.

Once connected, you can ask your AI assistant to run any LDX hub job — from structured data extraction to document conversion — on your behalf.

---

## Prerequisites

- An LDX hub API key (available after subscribing via this Developer Portal)
- [Claude Desktop](https://claude.ai/download) installed on your machine
- [Node.js](https://nodejs.org) (v18 or later) installed on your machine

---

## Setup Instructions

### Mac

1. Open Terminal and navigate to the Claude configuration directory:

```bash
open ~/Library/Application\ Support/Claude/
```

2. Open or create `claude_desktop_config.json` and add the following:

:::tip
Your MCP server URL is your API base URL with `/mcp` appended.
You can find your API base URL in the [API Reference](/api) page under **SERVERS** (top right).
:::

```json
{
  "mcpServers": {
    "LDX hub": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "<Your API base URL>/mcp",
        "--header",
        "Authorization: Bearer <Your API key obtained from the Developer Portal>"
      ]
    }
  }
}
```

3. Save the file and restart Claude Desktop.

---

### Windows

1. Open Claude Desktop and go to **Settings → Developer**.
2. Click **Edit Config** to open the configuration file directly.
3. Add the following to the file:

:::tip
Your MCP server URL is your API base URL with `/mcp` appended.
You can find your API base URL in the [API Reference](/api) page under **SERVERS** (top right).
:::

```json
{
  "mcpServers": {
    "LDX hub": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "<Your API base URL>/mcp",
        "--header",
        "Authorization: Bearer <Your API key obtained from the Developer Portal>"
      ]
    }
  }
}
```

4. Save the file and restart Claude Desktop.

---

## Verification

After restarting Claude Desktop, you should see an MCP icon in the chat interface. You can verify the connection by asking Claude:

> "List the available StructFlow models."

If the connection is working, Claude will return the current list of available AI models.

---

## What You Can Do

Once connected, you can ask your AI assistant to:

- List the available models or engines for any service
- **StructFlow** — extract structured JSON from unstructured text
- **AnalyzeDoc** — read PDFs and images with vision AI and return structured JSON
- **RefineLoop** — refine XLIFF translation quality
- **RenderOCR** — convert PDFs and images to editable Office files (with OCR)
- **CastDoc** — convert text-based PDFs to editable Office files (no OCR)
- **ExtractDoc** — extract plain text from documents for downstream pipelines
- Check the status of a running job
- Download completed results

If you have any issues, [contact us](https://ldxlab.io/contact).