# FetchPan MCP server: let your AI assistant download from cloud drives and file hosts

> FetchPan's MCP server lets an AI assistant check links, open cloud-drive shares and get direct download links. How to add it is below, and you can try a call right here.

- Server address: https://fetchpan.com/mcp
- Transport: Streamable HTTP (stateless, plain JSON answers)
- Auth: Optional: Authorization: Bearer fp_… (create the token on the developers page)
- Without a token: Connect, list the tools, check links and download the first free files
- Web page: https://fetchpan.com/mcp-server
- JSON service description: https://fetchpan.com/mcp-server.json

## What it does

MCP (Model Context Protocol) is the common way AI assistants use outside tools. With FetchPan added, you can just tell your AI: "download this Baidu link for me".

The AI checks that we support the site, lists the files when a share has folders so you can pick, then has our server get the file ready and gives you a direct download link.

No token needed to start: the first files from a network are free. Sign in and create a token for more free files a day and fast downloads with traffic.

## Add it to your AI client

No token needed to try: add the server with just its URL (Claude Code: claude mcp add --transport http fetchpan https://fetchpan.com/mcp). For 3 free files a day, create a token (step 1) and put it in place of YOUR_TOKEN. Each guide takes about two minutes.

### Codex (OpenAI Codex CLI, IDE extension and app)

1. Create a token above and copy it.
2. Add the token to your shell profile (~/.zshrc or ~/.bashrc) as the variable FETCHPAN_TOKEN, then restart the terminal.
3. Open ~/.codex/config.toml (create it if it does not exist) and add the [mcp_servers.fetchpan] block below. To use it in one project only, put the block in .codex/config.toml inside a trusted project.
4. Start Codex and type /mcp. fetchpan should be listed. In a plain terminal, codex mcp list shows it too.
5. Ask: “Use FetchPan to check this link: …”.

Add this to `~/.codex/config.toml`

```toml
# 1) in ~/.zshrc or ~/.bashrc, then restart the terminal:
export FETCHPAN_TOKEN="YOUR_TOKEN"

# 2) in ~/.codex/config.toml:
[mcp_servers.fetchpan]
url = "https://fetchpan.com/mcp"
bearer_token_env_var = "FETCHPAN_TOKEN"
```

If you open Codex from an app icon instead of a terminal, it may not see your shell variables. Then replace the bearer_token_env_var line with: http_headers = { Authorization = "Bearer YOUR_TOKEN" } (the token is then stored in the file, so keep the file private).

### WorkBuddy

1. Create a token above and copy it.
2. In WorkBuddy open Connectors, then Custom connector, then click Configure MCP (top right). This opens the file ~/.workbuddy/mcp.json. Menu names can differ a little between versions.
3. Add the fetchpan entry below inside mcpServers. Keep any entries that are already there. Click Save.
4. Open My MCP and switch fetchpan on. If WorkBuddy asks you to trust the server, confirm.
5. Start a task and ask: “List the FetchPan tools.” You should see download, check_link and get_account.

Add this to `~/.workbuddy/mcp.json`

```json
{
  "mcpServers": {
    "fetchpan": {
      "type": "http",
      "url": "https://fetchpan.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}
```

### Claude Code

1. Create a token above and copy it.
2. Run the command below in your terminal.
3. Run claude mcp list, or type /mcp inside Claude Code. fetchpan should show as connected.
4. Ask: “Use FetchPan to download this link: …”.

```bash
claude mcp add --transport http fetchpan https://fetchpan.com/mcp \
  --header "Authorization: Bearer YOUR_TOKEN"
```

## Tools

Ten tools. Your agent normally needs only download. No token is needed to connect, look around, or download the first free files (1 a day, 5 in all per network). Fast downloads, the account and payment links need one.

| Tool | What it does | Uses | Token |
| --- | --- | --- | --- |
| `download` | Give it a link; it waits for the file and returns a download URL. If the file is not ready in time, it returns a job id to continue with. A share with several files returns its list to pick one from. | 1 free file, or traffic (fast) | first files free |
| `check_link` | Is this site supported and working right now? | nothing | not needed |
| `list_supported_sites` | All supported sites with live status. | nothing | not needed |
| `list_files` | Open a folder of a Quark or PikPak share to find the file you want (then download it with share_id and file_id). | nothing | not needed |
| `start_download` | Start a job without waiting. Returns a job id. | nothing | first files free |
| `get_job` | Job status, and what a free or fast download would cost. | nothing | first files free |
| `get_download_link` | The URL for a finished job (free or fast). | 1 free file, or traffic (fast) | first files free |
| `get_account` | Your email, traffic balance, free files per day and recent downloads. | nothing | needed |
| `list_packages` | Traffic packs you can buy. | nothing | not needed |
| `create_payment_link` | A payment page for a pack, to give to you. Only a person can pay it. | nothing | needed |

## Try a call

The server is stateless: no initialize step, one POST is one call. These two calls need no token and start no download.

### Check a link · check_link

```bash
curl -X POST https://fetchpan.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"check_link","arguments":{"url":"https://pan.baidu.com/s/1AbCdEfGh"}}}'
```

### All tools · tools/list

```bash
curl -X POST https://fetchpan.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

## Want more free files? Create a token

Sign in, create an API token on the developers page and add it to your MCP config: more free files a day, and fast downloads with traffic. https://fetchpan.com/developers
