# 把 PDF Craft 接入你的 AI Agent

[HTML](https://pdfcraft.ai/zh-Hant/connect/)
[Site index](https://pdfcraft.ai/llms.txt)

讓 Claude、Cursor、Claude Code、Codex 等支援 MCP 的用戶端直接呼叫掃描 PDF OCR、Markdown 與 EPUB 轉換、整書翻譯、餘額查詢和費用估算。

- Remote MCP URL: `https://api.pdfcraft.ai/v1/mcp`
- Transport: Streamable HTTP (MCP protocol `2026-07-28`)
- Auth: OAuth 2.1 (scope `pdfcraft:use`) or `Authorization: Bearer $PDFCRAFT_API_KEY`

## 選擇你的 AI 用戶端

### Claude

在 Claude 自訂連接器中一鍵預填位址，並在瀏覽器確認 pdfcraft:use 權限。

```json
{
  "mcpServers": {
    "pdfcraft": {
      "url": "https://api.pdfcraft.ai/v1/mcp"
    }
  }
}
```

### Claude Code

在終端機執行單行指令註冊遠端 Streamable HTTP 服務，再執行 /mcp 登入。

```bash
claude mcp add --transport http -s user pdfcraft https://api.pdfcraft.ai/v1/mcp
```

### Cursor

一鍵開啟 Cursor 安裝，或將遠端服務加入 Cursor 的 MCP 設定檔。

```json
{
  "mcpServers": {
    "pdfcraft": {
      "url": "https://api.pdfcraft.ai/v1/mcp"
    }
  }
}
```

### VS Code

一鍵安裝至 VS Code，或在 .vscode/mcp.json 中儲存 HTTP 服務設定。

```json
{
  "servers": {
    "pdfcraft": {
      "type": "http",
      "url": "https://api.pdfcraft.ai/v1/mcp"
    }
  }
}
```

### Codex

在 Codex CLI 中註冊遠端 MCP 位址，支援瀏覽器 OAuth 或環境變數驗證。

```bash
codex mcp add pdfcraft --url https://api.pdfcraft.ai/v1/mcp
```

### ChatGPT

在 ChatGPT 開發者模式中加入 https://api.pdfcraft.ai/v1/mcp 作為自訂 MCP 服務並完成 OAuth 登入。

```json
{
  "mcpServers": {
    "pdfcraft": {
      "url": "https://api.pdfcraft.ai/v1/mcp"
    }
  }
}
```

### Antigravity

複製一句安裝指令，或將設定寫入 ~/.gemini/config/mcp_config.json。

```json
{
  "mcpServers": {
    "pdfcraft": {
      "url": "https://api.pdfcraft.ai/v1/mcp"
    }
  }
}
```

### Windsurf

複製一句安裝指令，或將遠端服務寫入 Windsurf 的 MCP 設定檔。

```json
{
  "mcpServers": {
    "pdfcraft": {
      "url": "https://api.pdfcraft.ai/v1/mcp"
    }
  }
}
```

### Cline

複製一句安裝指令，或將遠端 HTTP 服務加入 cline_mcp_settings.json。

```json
{
  "mcpServers": {
    "pdfcraft": {
      "url": "https://api.pdfcraft.ai/v1/mcp"
    }
  }
}
```

### Zed

複製一句安裝指令，或在 Zed 設定的 context_servers 中加入 PDF Craft。

```json
{
  "context_servers": {
    "pdfcraft": {
      "url": "https://api.pdfcraft.ai/v1/mcp"
    }
  }
}
```

### Trae

複製一句安裝指令，或在 Trae 的 MCP 設定中加入遠端服務。

```json
{
  "mcpServers": {
    "pdfcraft": {
      "url": "https://api.pdfcraft.ai/v1/mcp"
    }
  }
}
```

### Cherry Studio

開啟設定中的 MCP 伺服器，點擊「從 JSON 匯入」貼上設定後啟用。

```json
{
  "mcpServers": {
    "pdfcraft": {
      "type": "streamableHttp",
      "url": "https://api.pdfcraft.ai/v1/mcp"
    }
  }
}
```

### OpenClaw

複製一句安裝指令，或在 OpenClaw 中註冊 Streamable HTTP 位址。

```json
{
  "mcp": {
    "servers": {
      "pdfcraft": {
        "url": "https://api.pdfcraft.ai/v1/mcp",
        "auth": "oauth"
      }
    }
  }
}
```

### 其他 MCP 用戶端

任何支援 Streamable HTTP 與 OAuth 2.1（或 Bearer 標頭）的用戶端皆可直連 https://api.pdfcraft.ai/v1/mcp。

```json
{
  "mcpServers": {
    "pdfcraft": {
      "url": "https://api.pdfcraft.ai/v1/mcp"
    }
  }
}
```

## Agent 如何與 PDF Craft 協作

### 一次設定，彈性選擇驗證方式

互動式用戶端使用 OAuth 2.1（支援 RFC 9728 中繼資料與動態用戶端註冊）；無瀏覽器環境或腳本則使用 API 金鑰頁面建立的 Bearer 金鑰。

### 先查餘額與估費，確認後再動手

先呼叫 get_capabilities 了解支援格式與語系，再查詢餘額並依頁數或字數估算費用。MCP 與網站工作區共用點數餘額與費率。

### 上傳檔案位元組並保留任務 UUID

遠端服務無法讀取本機路徑，Agent 需上傳實際檔案內容。保留任務 UUID 方便續查進度；若因餘額不足暫時無法下載完整版，儲值後對同一任務重新取得連結即可。
