npm package: @pdfpipe/mcp-server
Description: MCP server for PDFPipe - let AI assistants convert any PDF URL to structured data. Handles inline PDFs, auto-download attachments, redirects, and token-gated files
Author: PDFPipe
Latest version: 0.1.6

# @pdfpipe/mcp-server

MCP (Model Context Protocol) server for [PDFPipe](https://pdfpipe.dev). Lets AI assistants like Claude convert PDF URLs to structured data.

## Setup

### 1. Get an API key

Sign up at [pdfpipe.dev/signup](https://pdfpipe.dev/signup) and create an API key in your [dashboard](https://pdfpipe.dev/dashboard/keys).

### 2. Install

#### Claude Desktop (one-click)

Download the [PDFPipe Desktop Extension](https://pdfpipe.dev/downloads/pdfpipe.mcpb) and double-click to install. You'll be prompted for your API key.

#### Claude Desktop (manual)

Add to your `claude_desktop_config.json`:

**Mac/Linux:**

```json
{
  "mcpServers": {
    "pdfpipe": {
      "command": "npx",
      "args": ["-y", "@pdfpipe/mcp-server@latest"],
      "env": {
        "PDFPIPE_API_KEY": "pk_live_..."
      }
    }
  }
}
```

**Windows:**

```json
{
  "mcpServers": {
    "pdfpipe": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@pdfpipe/mcp-server@latest"],
      "env": {
        "PDFPIPE_API_KEY": "pk_live_..."
      }
    }
  }
}
```

Config file location:
- **Mac:** `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

#### Claude Code

```bash
claude mcp add pdfpipe -e PDFPIPE_API_KEY=pk_live_... -- npx -y @pdfpipe/mcp-server@latest
```

Or add to `.mcp.json` in your project root:

```json
{
  "mcpServers": {
    "pdfpipe": {
      "command": "npx",
      "args": ["-y", "@pdfpipe/mcp-server@latest"],
      "env": {
        "PDFPIPE_API_KEY": "pk_live_..."
      }
    }
  }
}
```

#### Cursor

Add to `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "pdfpipe": {
      "command": "npx",
      "args": ["-y", "@pdfpipe/mcp-server@latest"],
      "env": {
        "PDFPIPE_API_KEY": "pk_live_..."
      }
    }
  }
}
```

## Available Tools

| Tool | Description |
|------|-------------|
| `convert_pdf` | Convert a PDF URL to JSON, text, markdown, XML, CSV, base64, binary, PNG, JPG, or WebP |
| `check_status` | Check the status of an async conversion |
| `batch_convert` | Convert multiple PDF URLs in one request |
| `get_usage` | Check your current month's API usage |

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `PDFPIPE_API_KEY` | Yes | Your PDFPipe API key |
| `PDFPIPE_BASE_URL` | No | Override the API base URL (default: `https://api.pdfpipe.dev`) |

## Examples

Once configured, you can ask your AI assistant:

- "Convert this PDF to markdown: https://example.com/report.pdf"
- "Extract the text from these 3 PDFs and summarize them"
- "How many API requests have I used this month?"

## Troubleshooting

**"command not found" on npx:** Clear the npx cache and retry:
```bash
rm -rf ~/.npm/_npx && npx -y @pdfpipe/mcp-server@latest
```

**Windows "spawn npx ENOENT":** Use the `cmd /c` wrapper shown in the Windows config above.

**Server not showing in Claude Code:** Make sure the config is in `.mcp.json` in your project root (not `~/.claude/mcp.json`). Restart Claude Code after adding.

## Requirements

- Node.js 18 or later

## License

MIT