Pirate Ship by Cotlet

dev.cotlet由 cotlet.dev 發布官方發布者v1.0.2更新於 Nov 1, 2026

Labels, rates and tracking for small shippers.

發布方自己的服務:Cotlet

已驗證Streamable HTTP可網頁執行效率與工作流資料與分析商業與電商

概覽

AI 產生的概覽

非官方的 Pirate Ship 伺服器,可在自己的帳號中查詢 USPS/UPS 運費、建立草稿託運單與批次,並讀取寄件報表。

可以做什麼
  • 查詢運費與取件:單一包裹的 USPS 與 UPS 價格、取件費用估算、包裝類型與限制
  • 建立與管理寄件:未付款的單張託運單和批次、由商店訂單建立的批次、變更寄件日期、重新命名、刪除草稿
  • 列印與單據:託運單下載連結、USPS SCAN Form、寄件與報表的 CSV 匯出
  • 追蹤與報表:寄件紀錄、追蹤狀態、交易、收據、退款、退貨託運單、貨運商調整、支出統計、帳戶餘額
  • 設定帳號:寄件地址、已儲存包裹、追蹤郵件範本與設定、託運單設定
  • 匯入商店訂單:列出已連結商店、同步訂單、列出、忽略與恢復訂單
適用情境
適合小型寄件者讓助理比較貨運商運費、依 CSV 或商店訂單準備草稿批次,並取得運費支出、追蹤與貨運商調整報表,不必在 Pirate Ship 網頁中逐項操作。
執行需求
本機執行需 Python 3.11 以上(uvx、pip 或 pipx),也可使用託管端點。需要具備寄件地址的 Pirate Ship 帳號,以及已登入的 Google Chrome 144 以上(或開啟偵錯埠的 Chrome,或透過 PIRATE_SHIP_AUTH_TOKEN 貼上工作階段 cookie)。託管版使用 cotlet.dev 的 Authorization bearer API 金鑰。
安裝前請注意
它透過你自己的 Pirate Ship 瀏覽器工作階段運作:儲存的 session.json 可讓持有者以你的身分操作,務必不要放入 git 或共用資料夾。寫入類工具會建立、修改和刪除草稿、地址、包裹、範本與設定,追蹤郵件變更會直接影響你的收件人。此自架版本不含購買託運單、退款、預約取件與爭議,涉及金錢的操作仍需在 Pirate Ship 中完成;託管版試用後需付費。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Pirate Ship by Cotlet,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/dev.cotlet%2Fpirate-ship/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "pirate-ship-by-cotlet": {
      "type": "http",
      "url": "https://cotlet.dev/mcp/v1/pirate-ship/connect"
    }
  }
}

README

Pirate Ship API and MCP server, self-hosted

A Pirate Ship API and a Pirate Ship MCP server you run on your own computer, in Python, on the session of your own Google Chrome. 51 of the 57 Pirate Ship tools we run in production at Cotlet: USPS and UPS rates, draft labels and batches, label downloads, SCAN Forms, shipments and tracking, reports, store order import, Ship From Addresses, Saved Packages, tracking emails and label settings. The six tools that spend or refund money are not in this version.

Pirate Ship has no public API and no official MCP server. This repo gives you both:

  • MCP server for Claude Code, Claude Desktop, Cursor, Codex and any MCP client, over stdio or HTTP. Setup
  • REST API on http://127.0.0.1:8787/api/v1/pirate-ship, with OpenAPI docs at /docs. Setup
  • Python: call("get_rates", to_zip="10001", weight_oz=16), plus 11 ready scripts in examples/.

It is for technical people who want to run it themselves, for noncommercial use only (license). If you want it running 24/7 on a server, kept working when Pirate Ship changes its app, for a team or a business, use the hosted version at cotlet.dev.

[Pirate Ship MCP server] [Python 3.11+] [License: PolyForm Noncommercial 1.0.0] [MCP Badge]

bash
uv tool install pirate-ship-api-mcp                  # or: pip install pirate-ship-api-mcppirate-ship-mcp connect                            # reads your Pirate Ship session from Chromepirate-ship-mcp call get_rates to_zip=10001 weight_oz=16claude mcp add pirate-ship -- uvx pirate-ship-api-mcp mcp

Contents

How it works

text
AI agent (MCP) / script (REST, Python) ──▶ pirate-ship-mcp on your computer ──your cookies──▶ ship.pirateship.com                                                     ▲                       pirate-ship-mcp connect ──────┘ reads them once from your Chrome (DevTools Protocol)
  1. You sign in to Pirate Ship in your own Chrome, the way you always do.
  2. pirate-ship-mcp connect attaches to that Chrome through the Chrome DevTools Protocol, reads the pirateship.com cookies and Chrome's time zone, and saves them to ~/.config/pirate-ship-api-mcp/session.json, readable by your user only. It never sees or stores your password.
  3. Every tool call is one of the GraphQL operations Pirate Ship's own web app sends to ship.pirateship.com/api/graphql, with those cookies, sent with curl_cffi, which copies Chrome's TLS fingerprint. No headless browser runs.

Pirate Ship's web app sends each operation as a persisted query: its name and the sha256 of the query text. The tools may send only the operations listed in operations.py, and account, password, payment method and identity operations are not on that list. When Pirate Ship changes one of the listed queries, the tool answers "Pirate Ship changed its app" until we record the new hash.

Pirate Ship's session cookie lives about a day and is renewed by use. When Pirate Ship signs you out, the server reads the cookies from Chrome again, if Chrome is open with remote debugging on. Tick "Stay signed in" when you sign in, so Chrome keeps you signed in between visits.

Requirements

  • Python 3.11 or newer.
  • Google Chrome 144 or newer, signed in to Pirate Ship. Any Chrome or Chromium works with a debugging port.
  • macOS, Linux or Windows.
  • A Pirate Ship account with a Ship From Address. Rates, drafts, reports and settings need nothing else. Buying labels needs Account Balance or a payment method, and you buy in Pirate Ship itself.

Install

From PyPI:

bash
uv tool install pirate-ship-api-mcp       # or: pipx install pirate-ship-api-mcp, or: pip install pirate-ship-api-mcppirate-ship-mcp --version

MCP clients can also run it with no install: uvx pirate-ship-api-mcp mcp.

From source:

bash
git clone https://github.com/cotletdev/pirate-ship-api-mcp-server.gitcd pirate-ship-api-mcp-serverpython3 -m venv .venv. .venv/bin/activate              # Windows: .venv\Scripts\activatepip install -e .pirate-ship-mcp --version

With uv: uv venv && uv pip install -e ., then uv run pirate-ship-mcp ....

Setting it up with an AI agent (Claude Code, Codex, Cursor)? Open it in this folder and ask it to set up the repo: AGENTS.md tells it every step, and it asks you only for the steps in Chrome.

To update: uv tool upgrade pirate-ship-api-mcp (or pip install -U pirate-ship-api-mcp), from source git pull && pip install -e .. We copy every change of the hosted Pirate Ship tools into this repo.

Connect your Chrome

Option A: your everyday Chrome (recommended)

  1. Open chrome://inspect/#remote-debugging in Chrome and switch remote debugging on. Chrome then accepts DevTools connections from programs on this computer, and asks you before each one.

  2. Make sure you are signed in at ship.pirateship.com.

  3. Run:

    bash
    pirate-ship-mcp connect
  4. Chrome asks whether to allow the connection. Click Allow.

text
Saved 32 Pirate Ship cookies to /Users/you/.config/pirate-ship-api-mcp/session.jsonSigned in to Pirate Ship as Linda Morales ([email protected])

Leave remote debugging on if you want the server to pick up a new session by itself after Pirate Ship signs you out. With a one-day cookie, that happens more often than with most apps.

connect looks for Chrome's DevToolsActivePort file in the default profile folder. For Chrome Beta, Canary or a custom profile folder, pass --profile-dir "<folder>".

Option B: a Chrome with a debugging port

Chrome does not open a debugging port on your default profile, so start a separate one, sign in to Pirate Ship there once, and connect to it:

bash
# macOS"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --remote-debugging-port=9222 --user-data-dir="$HOME/.chrome-pirate-ship"# Linuxgoogle-chrome --remote-debugging-port=9222 --user-data-dir="$HOME/.chrome-pirate-ship"# Windows"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="%USERPROFILE%\.chrome-pirate-ship"
pirate-ship-mcp connect --cdp http://127.0.0.1:9222

--cdp also takes a ws:// DevTools URL, for example of a Chrome on another machine reached over an SSH tunnel.

Option C: paste the cookie by hand

For a server with no Chrome: in Chrome open DevTools on ship.pirateship.com, Application > Cookies > https://ship.pirateship.com, copy the value of pirate_id_f0fecf84, then:

bash
pirate-ship-mcp connect --token          # paste it, input is hidden# or, without a session file:export PIRATE_SHIP_AUTH_TOKEN=...

A pasted cookie is not refreshed on its own, and this one lasts about a day without use. Paste a new one when Pirate Ship signs you out.

Check the session at any time:

bash
pirate-ship-mcp status

MCP server

The MCP server lists every tool with its input schema, a description written for agents, and hints: read tools are marked read-only, and tools that delete something or change what your recipients get are marked so your client asks before running them.

Claude Code

bash
claude mcp add pirate-ship -- uvx pirate-ship-api-mcp mcp# read only:claude mcp add pirate-ship -- uvx pirate-ship-api-mcp mcp --read-only

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{  "mcpServers": {    "pirate-ship": {      "command": "uvx",      "args": ["pirate-ship-api-mcp", "mcp"]    }  }}

Cursor

~/.cursor/mcp.json, the same block as Claude Desktop. A ready copy is in mcp.json.

Codex

~/.codex/config.toml:

toml
[mcp_servers.pirate-ship]command = "uvx"args = ["pirate-ship-api-mcp", "mcp"]

Over HTTP

pirate-ship-mcp serve also serves MCP over streamable HTTP at http://127.0.0.1:8787/mcp, for clients that take a URL:

bash
pirate-ship-mcp serveclaude mcp add --transport http pirate-ship http://127.0.0.1:8787/mcp

Then ask your agent things like:

What does a 2 lb box, 12x10x6, cost to ZIP 94103 with USPS and UPS? Cheapest first.

Make a draft batch from orders.csv with my "Small box" Saved Package and show me the rates per group.

Which labels from the last 10 days still have no carrier scan?

How much did I spend on labels in October, and what were the carrier adjustments?

REST API

bash
pirate-ship-mcp serve              # http://127.0.0.1:8787, MCP at /mcp, docs at /docs

Each tool has its own route under /api/v1/pirate-ship, the same paths as the hosted API at cotlet.dev, so code written against one works with the other. Path parts and the query string are arguments, and a JSON body adds the rest.

bash
curl 'http://127.0.0.1:8787/api/v1/pirate-ship/balance'curl 'http://127.0.0.1:8787/api/v1/pirate-ship/rates?to_zip=10001&weight_oz=16&length_in=10&width_in=8&height_in=4'curl 'http://127.0.0.1:8787/api/v1/pirate-ship/shipments?from_date=2026-10-01&limit=50'curl -X POST http://127.0.0.1:8787/api/v1/pirate-ship/shipments \  -H 'Content-Type: application/json' \  -d '{"full_name": "Linda Morales", "address1": "350 5th Ave", "city": "New York", "state": "NY", "zip": "10118", "weight_oz": 20}'

Any tool by name, body as its arguments:

bash
curl -X POST http://127.0.0.1:8787/api/v1/pirate-ship/tools/list_shipments -d '{"carrier": ["UPS"]}'
  • GET /api/v1/pirate-ship/tools: every tool with its route, input schema and an example answer.
  • GET /docs: interactive OpenAPI docs, GET /openapi.json the schema, for n8n, Postman or a generated client.
  • Answers are JSON. Report lists take limit and offset and answer with total.

The server listens on 127.0.0.1 only. To reach it from another device of yours, set a token, and every request then needs Authorization: Bearer <token>:

bash
PIRATE_SHIP_MCP_TOKEN=$(openssl rand -hex 24) pirate-ship-mcp serve --host 0.0.0.0

Python and the example scripts

Straight from Python, no server needed:

python
from pirate_ship_api_mcp import callfrom pirate_ship_api_mcp.scripting import paginate_offset, write_rows
rates = call("get_rates", to_zip="10001", weight_oz=16, length_in=10, width_in=8, height_in=4)["rates"]shipments = list(paginate_offset("list_shipments", {"from_date": "2026-10-01"}, "shipments"))write_rows(shipments, "october.csv")call("create_shipment", full_name="Linda Morales", address1="350 5th Ave", city="New York", zip="10118", weight_oz=20)

Or one tool from the shell: pirate-ship-mcp call list_shipments limit=10, or with a JSON object.

Ready scripts in examples/. Each prints JSON or a short report, takes --out file.csv or --out file.json where it makes sense, and --help:

ScriptWhat it does
compare_rates.pyUSPS and UPS rates for one package, cheapest first. --size 10x8x4, --country.
draft_batch_from_csv.pyA CSV of recipients becomes one unpaid draft batch with a Saved Package; prints the rate of each group. Rows without an address are listed, not guessed.
store_orders.pyRefreshes your connected stores and lists the orders waiting to ship.
export_shipments.pyBought labels to CSV or JSON: recipient, tracking number, service, cost, status. --since, --carrier.
tracking_report.pyLabels of the last N days that are not delivered, with the last event and a stuck flag.
refund_candidates.pyDuplicate labels and labels with no carrier scan in the 28-day refund window. Lists them; you refund in Pirate Ship.
scan_form.pyThe USPS SCAN Form for today's labels, as a PDF link.
pickup_quote.pyToday's packages and weight per carrier, with the pickup price. Books nothing.
carrier_adjustments.pyCarrier adjustments with the weight and size you entered next to what the carrier measured.
spend_report.pyLabels, spend, savings, carrier split, top states and balance for a date range. --transactions saves every charge.
ship_from_addresses.pyYour Ship From Addresses and Saved Packages with the ids other tools take.
bash
python examples/compare_rates.py --to-zip 94103 --weight-oz 32 --size 12x10x6python examples/draft_batch_from_csv.py orders.csv --title "Wholesale 19 Oct" --package "Small box"

On a schedule, cron on your own computer works while it is on: 0 18 * * 1-5 cd ~/pirate-ship-api-mcp-server && .venv/bin/python examples/tracking_report.py --days 10 --out late.csv.

All 51 tools

Money is in US dollars, weights in ounces, sizes in inches, dates in Chrome's time zone. pirate-ship-mcp tools prints this list, pirate-ship-mcp tools --json adds the input schemas.

Rates and addresses

ToolAccessREST routeWhat it does
get_ratesreadGET /ratesUSPS and UPS services with price for one package, cheapest first.
parse_addressreadGET /addresses/parseSplits a pasted address into name, street, city, state, ZIP and country.
search_recipientsreadGET /recipients/searchPast recipients' addresses matching a name, email or phone.
list_package_typesreadGET /package-typesPackaging types per carrier (box, envelope, flat rate) and the size and weight limits.

Draft labels and batches

ToolAccessREST routeWhat it does
create_shipmentwritePOST /shipmentsUnpaid draft label for one package with every rate; buy it in Pirate Ship.
create_batchwritePOST /batchesUnpaid draft batch for many packages with the rates of each rate group; buy it in Pirate Ship.
create_batch_from_orderswritePOST /batches/from-ordersTurns store orders into a batch of shipments with one saved package; nothing is bought.
get_batchreadGET /batches/{batch_id}A draft or bought batch: shipments, tracking, rates to buy, what can be refunded.
list_batchesreadGET /batchesLatest batches and single labels, newest first, with status and tracking counts.
change_ship_datewritePUT /batches/{batch_id}/ship-dateMoves a draft batch to another ship date and returns its new rates.
rename_batchwritePATCH /batches/{batch_id}Change the title of a batch or single label.
delete_batchwriteDELETE /batches/{batch_id}Deletes an unpaid draft batch or single shipment.

Printing and SCAN Forms

ToolAccessREST routeWhat it does
download_labelsreadGET /labelsA download link for the printable labels of a batch or of chosen shipments.
create_scan_formwritePOST /scan-formsUSPS End of Day SCAN Form for the labels of one Ship Date, as a PDF link.
list_scan_formsreadGET /scan-formsUSPS SCAN Forms per Ship From Address, with their PDF links and labels still without one.

Shipments and tracking

ToolAccessREST routeWhat it does
list_shipmentsreadGET /shipmentsLabels bought in Pirate Ship with recipient, tracking, cost and status, newest first.
get_shipmentreadGET /shipments/{shipment_id}One shipment with tracking, service, cost, recipient and carrier adjustments.
export_shipmentsreadGET /shipments/exportA CSV of the shipments report with every column, as a download link.

Reports, balance and refunds

ToolAccessREST routeWhat it does
get_account_balancereadGET /balanceAccount Balance, Pending Refunds and Pending Returns from the Reports page.
get_shipping_statsreadGET /statsLabels, spend, savings, tracking and where packages went for a date range, as on Reports.
list_transactionsreadGET /transactionsEvery charge, payment and refund on the Pirate Ship balance, newest first.
list_receiptsreadGET /receiptsPayments made to Pirate Ship, newest first; get_receipt shows one.
get_receiptreadGET /receipts/{receipt_id}One payment to Pirate Ship with its billing address and the labels it paid for.
list_refundsreadGET /refundsLabel refunds with their status and amount, newest request first.
list_return_labelsreadGET /return-labelsList the account's pay-on-use return labels and whether each was used.
list_carrier_adjustmentsreadGET /carrier-adjustmentsExtra charges or credits the carrier made after a label was used, with old and actual package.
export_reportreadGET /reports/{report}/exportA CSV of the transactions, refunds, receipts, return labels or carrier adjustments report.

Pickups

ToolAccessREST routeWhat it does
get_pickup_quotereadGET /pickups/quoteWhat a USPS or UPS pickup would cost; USPS pickups are free. Nothing is booked.
list_pickupsreadGET /pickupsYour scheduled and past USPS and UPS pickups with confirmation numbers.

Store orders

ToolAccessREST routeWhat it does
list_store_connectionsreadGET /store-connectionsStores and marketplaces connected to Pirate Ship for order import, with their status.
sync_store_orderswritePOST /import-orders/syncPulls new orders from every connected store into Pirate Ship's Import list.
list_import_ordersreadGET /import-ordersUnshipped orders from your connected store integrations, as in the Import grid.
ignore_orderswritePOST /import-orders/ignoreHides store orders from the Import list without shipping them.
unignore_orderswriteDELETE /import-orders/ignorePut ignored store orders back on the Import list.

Ship From Addresses

ToolAccessREST routeWhat it does
list_ship_from_addressesreadGET /ship-from-addressesYour Ship From Addresses with their return addresses; one is the default.
create_ship_from_addresswritePOST /ship-from-addressesAdds a US Ship From Address, optionally with a separate return address.
update_ship_from_addresswritePATCH /ship-from-addresses/{address_id}Changes a Ship From Address: its name, origin or return address.
set_default_ship_from_addresswritePUT /ship-from-addresses/{address_id}/defaultMakes one Ship From Address the default for new shipments and rate quotes.
delete_ship_from_addresswriteDELETE /ship-from-addresses/{address_id}Removes a saved Ship From Address. The default address cannot be removed.

Saved Packages

ToolAccessREST routeWhat it does
list_saved_packagesreadGET /saved-packagesYour Saved Packages from Settings: size, weight and the extra services stored with each.
create_saved_packagewritePOST /saved-packagesSaves a package (type, size, weight, extra services) for reuse on labels.
update_saved_packagewritePATCH /saved-packages/{package_id}Changes a Saved Package; fields you leave out keep their values.
delete_saved_packagewriteDELETE /saved-packages/{package_id}Delete a Saved Package (box size and weight preset) from the account.

Tracking emails

ToolAccessREST routeWhat it does
get_tracking_email_settingsreadGET /tracking-email-settingsRead whether label recipients get a tracking email, when, and with which template.
update_tracking_email_settingswritePATCH /tracking-email-settingsTurns default tracking emails on or off and sets their delay after purchase.
list_email_templatesreadGET /email-templatesList the templates of the tracking emails sent to label recipients.
create_email_templatewritePOST /email-templatesAdds a tracking email template for the emails recipients get with their tracking link.
update_email_templatewritePATCH /email-templates/{template_id}Changes a tracking email template; fields you leave out keep their values.
delete_email_templatewriteDELETE /email-templates/{template_id}Delete one tracking email template from the account.

Label settings

ToolAccessREST routeWhat it does
get_label_settingsreadGET /label-settingsRead the account's label settings from Settings, General.
update_label_settingswritePATCH /label-settingsChanges label size, file format, packing list, logo, QR codes, address correction or export format.

Not in this version

ToolWhy
buy_labelSpends your Account Balance or charges your card. Buy in Pirate Ship.
refund_label, refund_batchRefund requests are final and move money. Request them in Pirate Ship.
schedule_pickup, cancel_pickupA UPS pickup is charged and its cancellation refunded. get_pickup_quote and list_pickups are here.
dispute_adjustmentA dispute is about a charge on your balance. list_carrier_adjustments is here.

In tool descriptions "buy it with buy_label" means: buy the draft in Pirate Ship's web app. Never built, on purpose: your Pirate Ship sign-in, email, password, security settings, payment methods, billing and identity checks.

Configuration

VariableDefaultWhat it does
PIRATE_SHIP_MCP_HOME~/.config/pirate-ship-api-mcpFolder of session.json.
PIRATE_SHIP_AUTH_TOKENThe pirate_id_f0fecf84 cookie, instead of pirate-ship-mcp connect.
PIRATE_SHIP_PROXYProxy for every request to Pirate Ship, e.g. http://user:pass@host:port.
PIRATE_SHIP_MCP_READ_ONLY1 hides and refuses every tool that changes Pirate Ship (same as --read-only).
PIRATE_SHIP_MCP_TOKENBearer token required by serve; needed to listen beyond 127.0.0.1.
PIRATE_SHIP_MCP_HOST, PIRATE_SHIP_MCP_PORT127.0.0.1, 8787Address of serve.
TZChrome's zoneTime zone for "today" and date ranges when connect could not read Chrome's.

Security and your Pirate Ship account

  • Your password never reaches this code. Only cookies are read, and only those of pirateship.com.
  • The session file is yours. session.json is created with mode 0600. Anyone who has it can act as you on Pirate Ship, so keep it out of git and shared folders.
  • Local by default. serve binds to 127.0.0.1 and refuses another address without PIRATE_SHIP_MCP_TOKEN.
  • pirateship.com only. Requests and redirects outside pirateship.com are refused.
  • No tool moves money. None buys a label, requests a refund, books a paid pickup or touches your payment methods.
  • Read-only mode. --read-only or PIRATE_SHIP_MCP_READ_ONLY=1 exposes the 29 read tools only.
  • Some changes reach your recipients. Tracking email settings and templates change the emails your customers get. MCP clients ask before those tools run; a script does not.

Errors

The REST API answers {"error": "<code>", "message": "..."}. The MCP server returns the same code and message as a tool error.

StatusCodeWhat to do
401auth_required, auth_expiredNo session, or Pirate Ship signed you out. Sign in to Pirate Ship in Chrome and run pirate-ship-mcp connect.
403scope_deniedThe server runs read-only.
403target_blockedPirate Ship refused the request or showed a bot check. Open ship.pirateship.com in Chrome once, then retry.
409captcha_requiredPirate Ship asks for a CAPTCHA. Solve it in Chrome.
422invalid_inputAn argument is missing or wrong; the message names it.
429rate_limitedPirate Ship is limiting the account. Wait a few minutes.
502target_errorPirate Ship answered with an error (an unknown id, an address it cannot rate), or changed its app. git pull for the latest tools, or open an issue.

Self-hosted or hosted

This repoCotlet, hosted
Tools51all 57, with buying, refunds, pickups and disputes
Runson your computer, while it is onin the cloud, 24/7
Pirate Ship sessionyour Chrome, cookies in a local fileyour own Cloud Browser in the EU, profile encrypted with AES-256-GCM, kept signed in
When Pirate Ship changes its appgit pull once we have fixed itfixed for you, every tool tested daily
Approvalsyour MCP client asks per callpurchases and refunds wait for your OK, switchable per tool
Works withMCP clients on your machine, local scriptsClaude.ai and ChatGPT connectors, n8n, Make, Zapier, any HTTP client
Who may use ityou, for noncommercial useteams, businesses, agencies
Pricefreefree 7-day trial with 2,000 credits, no card; then one-time packs from $29 for 5,000 credits

On the hosted version a successful call uses 10 credits, failed calls are free, and the Cloud Browser uses 50 credits a day while it has an app enabled for agents. Full pricing.

FAQ

Does Pirate Ship have an official API? No. Pirate Ship has no API, no webhooks and no official MCP server (checked 11 Oct 2026). Its help center says so and points to the built-in store integrations and spreadsheet uploads instead. Details: cotlet.dev/integrations/pirate-ship-api-mcp-server.

Is there a Pirate Ship MCP server for Claude, ChatGPT or Cursor? Yes, this one runs on your machine: pirate-ship-mcp mcp for Claude Code, Claude Desktop, Cursor and Codex. ChatGPT and Claude.ai connectors need a public HTTPS URL, which the hosted Pirate Ship MCP server gives you.

Can I get USPS and UPS rates from a script? Yes. get_rates returns every service with Pirate Ship's price, the retail price, zone and delivery estimate, cheapest first, and saves nothing: python examples/compare_rates.py --to-zip 10001 --weight-oz 16 --size 10x8x4.

Can it buy labels? Not this repo. It builds the draft (create_shipment, create_batch, create_batch_from_orders) with the rates of each group, and you click Buy in Pirate Ship. The hosted version has buy_label with a price cap per purchase.

Can I create a batch from a spreadsheet or from my store orders? Yes. create_batch takes up to 500 recipients per call, create_batch_from_orders takes orders from your connected stores. examples/draft_batch_from_csv.py reads a CSV.

Can I export shipments and tracking to CSV? Yes: python examples/export_shipments.py --since 2026-10-01 --out october.csv, or export_shipments for Pirate Ship's own spreadsheet with every column.

Why does it need my Chrome? To read your Pirate Ship session without your password. Pirate Ship's sign-in sits behind a Cloudflare check, so you sign in in the browser and plain requests do the rest. Chrome is used once per sign-in, not for each call.

What happens when Pirate Ship signs me out? Calls fail with auth_expired. With Chrome remote debugging on, the server reads the new cookies on the next call (click Allow when Chrome asks); otherwise run pirate-ship-mcp connect again.

Can it run on a VPS or in Docker? Technically yes, with PIRATE_SHIP_AUTH_TOKEN. The cookie lasts about a day without use, Pirate Ship then sees your session from a datacenter IP. For an always-on setup the hosted version keeps your session in your own Cloud Browser.

Will my Pirate Ship account get blocked? Requests carry Chrome's fingerprint and go out one at a time, as you would click. Nobody can promise a platform never acts. Keep to your normal use.

Can I use it at work or for my clients? No, the license allows noncommercial use only. For a team, a company or client work, use Cotlet or write to [email protected].

Is it open source? The source is public, the license is not an open source license: noncommercial use only, no business use.

A tool broke or I need another one. Open an issue with the tool name and the error message.

License

PolyForm Noncommercial License 1.0.0. In short:

  • Allowed: noncommercial use: you, for your own personal purposes with your own Pirate Ship account, or a charity, school, public research or government body. Changing the code, and sharing it under the same license.
  • Not allowed: any commercial use, your own business included; client work; selling or offering it, or a service built on it.

[Cotlet]

Maintained by Cotlet (@cotletdev). Pirate Ship is a trademark of its owner. This project is unofficial and not affiliated with, endorsed or sponsored by Pirate Ship.

來源:README.md,提交 09ed8ec

工具

51

change_ship_date

Change ship date

Moves a draft batch to another ship date and returns its new rates. The ship date on Pirate Ship's buy page: rates are fetched again for that day, so prices and estimated delivery can change. Pick a date from a rate's ship_dates. Works on drafts only.

輸入參數batch_id必填ship_date必填

create_batch

Create batch

Unpaid draft batch for many packages with the rates of each rate group; buy it with buy_label. Pirate Ship's spreadsheet upload: one batch for up to 500 recipients from your ship-from address, rated by Pirate Ship. The package (packaging, weight_oz and size, or package_preset_id) applies to every shipment; a recipient's own weight_oz or size overrides it. Pirate Ship splits the batch into rate groups (domestic small, big or heavy, international): buy_label needs one rate_id per group. errors counts rows Pirate Ship could not rate (an address it cannot find); get_batch shows them. Nothing is charged; delete_batch drops the draft.

輸入參數title必填width_inheight_inlength_inpackagingshipments必填signatureweight_ozship_from_idinsured_value_usdpackage_preset_id

create_batch_from_orders

Create batch from orders

Turns store orders into a batch of shipments with one saved package; nothing is bought. Creates a Pirate Ship batch from imported orders: recipients come from the orders, size and weight from the saved package. The batch is rated, not paid: no label is bought. Large batches are built in the background (progress in the answer).

輸入參數titleorder_ids必填package_id必填ship_from_idoverride_multiple

create_email_template

Create email template

Adds a tracking email template for the emails recipients get with their tracking link. Saves a new tracking email template. Nothing is sent now: Pirate Ship uses the template when a label is bought with tracking emails on. html takes the placeholders [Recipient First Name], [Ship Date], [Shipping Service], [Recipient Address] and [Tracking #].

輸入參數html必填name必填defaultsubject必填bcc_emailsender_name必填sender_email必填

create_saved_package

Create saved package

Saves a package (type, size, weight, extra services) for reuse on labels. Adds a Saved Package in Settings. Parcel, SoftEnvelope and Irregular need length_in and width_in, a box also height_in; flat rate packaging needs none. weight_oz 0 leaves the weight to each label. default true preselects it on new shipments.

輸入參數title必填defaultwidth_inheight_inirregularlength_inpackaging必填signatureweight_ozmedia_mailreturn_labelinsured_value_usd另有 1 個

create_scan_form

Create SCAN Form

USPS End of Day SCAN Form for the labels of one Ship Date, as a PDF link. Puts the USPS labels of one Ship Date and Ship From Address (or of one batch) that have no SCAN Form yet on a new SCAN Form and returns its PDF link. The carrier scans that one sheet instead of every package. No labels without a form: Pirate Ship answers with an error.

輸入參數batch_idship_datefrom_address_id

create_ship_from_address

Create ship-from address

Adds a US Ship From Address, optionally with a separate return address. Saves a new Ship From Address in Pirate Ship. Without return_address, returns go to the origin. Pirate Ship completes the ZIP+4. It does not become the default: call set_default_ship_from_address for that.

輸入參數title必填origin必填return_address

create_shipment

Create shipment

Unpaid draft label for one package with every rate; buy it with buy_label. Pirate Ship's Single Shipment form up to Get Rates: makes a draft batch for one package from your ship-from address to the recipient and returns its rates (USPS and UPS services with your price, retail price, estimated delivery, possible ship dates). Nothing is charged; buy_label buys one of the rates, delete_batch drops the draft. Give the package as packaging, weight_oz and size, or package_preset_id of a saved package. When Pirate Ship suggests a corrected address and address_correction is ask, the answer is status address_correction with the suggestion and no draft: call again with accept or skip.

輸入參數to必填width_inheight_inlength_inpackagingsignatureweight_ozship_from_idrubber_stamp_1rubber_stamp_2insured_value_usdpackage_preset_id另有 1 個

delete_batch

Delete batch

Deletes an unpaid draft batch or single shipment. Removes a draft from create_shipment (or any batch not yet bought) from Pirate Ship. Bought labels cannot be deleted: refund_label or refund_batch returns their cost.

輸入參數batch_id必填

delete_email_template

Delete email template

Removes a tracking email template.

輸入參數template_id必填

delete_saved_package

Delete saved package

Removes a Saved Package. Labels made with it are not affected.

輸入參數package_id必填

delete_ship_from_address

Delete ship-from address

Removes a saved Ship From Address. The default address cannot be removed. Deletes one Ship From Address from Settings. Labels already bought are not affected. Pirate Ship keeps at least one address and never deletes the default: make another one the default first.

輸入參數address_id必填

download_labels

Download labels

A download link for the printable labels of a batch or of chosen shipments. Pirate Ship's Print Labels: builds one file with the bought, printable labels of batch_id or of shipment_ids, in the account's label size and format (Settings, Label Settings), and returns its link. Building takes a few seconds. Refunded labels and return labels that print later are left out.

輸入參數batch_idshipment_ids

export_report

Export report

A CSV of the transactions, refunds, receipts, return labels or carrier adjustments report. Builds the same spreadsheet as the Export button of the chosen Reports table, with every column of the matching list_ tool, for an optional date range and search. Returns a link to the CSV; no matching rows return empty true and no link. Shipments have their own tool, export_shipments.

輸入參數sortreport必填searchto_datefrom_date

export_shipments

Export shipments

A CSV of the shipments report with every column, as a download link. Builds the same spreadsheet as the Export button of Reports, Shipments: one row per label with every column (recipient and address, tracking, carrier and service, cost, package, batch, ship-from, order id, rubber stamps). Takes the filters of list_shipments. Returns a link to the CSV; a filter with no matching labels returns empty true and no link. Large exports can take up to a minute.

輸入參數sortbatchsearchstatuscarrierto_datefrom_datetracking_status

get_account_balance

Get account balance

Account Balance, Pending Refunds and Pending Returns from the Reports page. The Pirate Ship account balance in US dollars (balance_settled_usd leaves out payments still settling), how many payment methods are saved, refunds and return labels still pending, and the last 30 days of labels as the Reports page shows them: label count, total, average and payments.

無需輸入參數。

get_batch

Get batch

A draft or bought batch: shipments, tracking, rates to buy, what can be refunded. One Pirate Ship batch: a single label from create_shipment is a batch of one. A draft (step Rated) lists every rate the packages qualify for, with rate_id for buy_label. A bought batch (Billed) shows each shipment's status, tracking number and link, whether its label can be printed or refunded, and what was paid per service.

輸入參數batch_id必填

get_label_settings

Get label settings

Label size and file format, packing list, logo, QR codes, address correction, export format. The account's Settings, General: the size and file format new labels are made in, whether a packing list prints with them, the logo on the label, USPS label-free QR codes, what happens when Pirate Ship finds a better address, and the spreadsheet format of report exports.

無需輸入參數。

get_pickup_quote

Get pickup quote

What a USPS or UPS pickup would cost; USPS pickups are free. Nothing is booked. Prices one pickup without booking it. USPS collects for free on the next delivery day. UPS charges per pickup and needs a date and a ready and close time; surcharges are listed apart.

輸入參數datecarrier必填locationclose_timeoverweightready_timeinstructionsship_from_idpackage_count必填total_weight_oz必填

get_rates

Get rates

USPS and UPS services with price for one package, cheapest first. Pirate Ship's Quick Rate Quote: every USPS and UPS service that can carry one package from your default ship-from address to to_zip, with your price and the retail price, the zone and the estimated delivery. Weight in ounces (2 lb = 32). Parcel, SoftEnvelope and Irregular need length_in and width_in, a box also height_in: size changes the price (cubic and dimensional pricing). Flat rate envelopes and boxes need only the weight. Services that cannot carry the package are left out. Nothing is bought.

輸入參數to_zip必填width_inheight_inlength_inpackagingweight_oz必填to_countryresidential

get_receipt

Get receipt

One payment to Pirate Ship with its billing address and the labels it paid for. The receipt page of one payment from list_receipts: title, status, total and refunded amount in US dollars, the billing address, the balance before and after, every transaction it covered (labels, refunds, adjustments, with batch_id and shipment_id) and reversals such as chargebacks.

輸入參數receipt_id必填

get_shipment

Get shipment

One shipment with tracking, service, cost, recipient and carrier adjustments. The shipment page of a Pirate Ship label: status, carrier and service, zone, tracking number and link, recipient, package, base and total cost with surcharges and insurance in US dollars, estimated delivery, the store order it came from, whether it can be printed or refunded, and carrier adjustments (weight or size the carrier corrected, with the price change and dispute state).

輸入參數batch_idshipment_id必填

get_shipping_stats

Get shipping stats

Labels, spend, savings, tracking and where packages went for a date range, as on Reports. Everything the Reports page charts for a date range (default the last 30 days, at most a year): label count, total and average cost (domestic and international), payments, carrier adjustments, savings against retail, pending refunds and returns, tracking states, labels and average cost per day, the carrier split, labels per zone and per US state and country. Money is in US dollars.

輸入參數to_datefrom_date

get_tracking_email_settings

Get tracking email settings

Whether recipients get tracking emails by default, how long after purchase, and the template. enabled: new labels send a tracking email to the recipient by default. delay: when it goes out after the label is bought (delay_label as Pirate Ship shows it). branding: Pirate Ship's branding in the email. default_template_id: the template from list_email_templates used.

無需輸入參數。

ignore_orders

Ignore orders

Hides store orders from the Import list without shipping them. They move to the ignored list (list_import_orders with ignored true); unignore_orders brings them back.

輸入參數order_ids必填

list_batches

List batches

Latest batches and single labels, newest first, with status and tracking counts. The batches on Pirate Ship's Ship page, newest first: drafts (RATED), bought (BILLED) and refunded, each with its shipment count, status text, the first shipment's tracking number and how many shipments are delivered, in transit, ready to print, refunded or failed. page 0 is the newest; an empty list means no more pages. get_batch gives one in full.

輸入參數page

list_carrier_adjustments

List carrier adjustments

Extra charges or credits the carrier made after a label was used, with old and actual package. The Reports, Carrier Adjustments table: when USPS or UPS measured a package differently from the label (weight, size, package type, zone, ZIP), the old and actual values, the old and new cost and the adjustment in US dollars, and whether it was disputed. dispute_adjustment disputes one by shipment_id.

輸入參數sortlimitoffsetsearchstatuscarrierto_datefrom_date

list_email_templates

List email templates

Tracking email templates: subject, sender, HTML body; one is the default. The templates Pirate Ship uses for the tracking emails it sends to recipients of your labels: name, subject, sender name and reply-to email, BCC address and the HTML body with placeholders such as [Tracking #]. default marks the one used for new labels.

無需輸入參數。

list_import_orders

List import orders

Unshipped orders from your connected store integrations, as in the Import grid. Orders imported from connected stores that still need a label: one row per order with the grid's columns (order number, recipient, items, store). ignored true lists the orders you hid with ignore_orders. Run sync_store_orders first for the newest. Use order ids in create_batch_from_orders.

輸入參數limitoffsetsearchignored

list_package_types

List package types

Packaging types per carrier (box, envelope, flat rate) and the size and weight limits. The packaging keys get_rates and saved packages take, per carrier, with which measurements each needs, plus Pirate Ship's limits: maximum weight in ounces and side lengths in inches.

無需輸入參數。

list_pickups

List pickups

Your scheduled and past USPS and UPS pickups with confirmation numbers. Every carrier pickup on the account: carrier, day and time window, status, confirmation number, package count and weight in ounces, where the driver finds them, the price (USPS is free) and whether it can still be cancelled with cancel_pickup.

無需輸入參數。

list_receipts

List receipts

Payments made to Pirate Ship, newest first; get_receipt shows one. The Reports, Receipts table: each payment the account made (card, PayPal, bank) with its status, description and total in US dollars. Pass receipt_id to get_receipt for the labels it paid for.

輸入參數sortlimitoffsetsearchstatusto_datefrom_date

list_refunds

List refunds

Label refunds with their status and amount, newest request first. The Reports, Refunds table: every label refund the account asked for (or Pirate Ship made automatically for an unused label), when it was requested, approved, declined or reversed, the tracking number, recipient and amount in US dollars. from_date and to_date narrow by the request day.

輸入參數sortlimitoffsetsearchstatusto_datefrom_date

list_return_labels

List return labels

Pay-on-use return labels and whether a customer used them. The Reports, Return Labels table: every return label made with a shipment, its status (unused labels cost nothing), the address it goes back to and what was charged in US dollars when it was used.

輸入參數sortlimitoffsetsearchstatusto_datefrom_date

list_saved_packages

List saved packages

Your Saved Packages from Settings: size, weight and the extra services stored with each. Every Saved Package: packaging type, size in inches, weight in ounces (0 when each label sets its own), signature, insured value, return label setting and flags. default marks the one preselected on new shipments. Use an id in update_saved_package or delete_saved_package.

無需輸入參數。

list_scan_forms

List SCAN forms

USPS SCAN Forms per Ship From Address, with their PDF links and labels still without one. For every Ship From Address with USPS labels: how many labels can still go on a SCAN Form (labels_available) and the SCAN Forms already made, each with ship date, label count and PDF link. A SCAN Form lets the carrier scan all packages at once. Make one with create_scan_form.

無需輸入參數。

list_ship_from_addresses

List ship-from addresses

Your Ship From Addresses with their return addresses; one is the default. Every saved Ship From Address in Pirate Ship: where labels ship from and the return address printed on them (origin_is_return when they are the same). default marks the one new shipments and rate quotes start from. Use an id in update_ship_from_address, delete_ship_from_address or set_default_ship_from_address.

無需輸入參數。

list_shipments

List shipments

Labels bought in Pirate Ship with recipient, tracking, cost and status, newest first. The Reports, Shipments table: every label the account bought, with the recipient's address, carrier and service, tracking number and status, cost in US dollars, package size and weight, batch and ship-from address. search works like the table's search box (name, email, tracking number, order id). from_date and to_date narrow by the day the label was created; status, tracking_status, carrier and batch take the values the table shows. total counts every match, limit and offset page through them.

輸入參數sortbatchlimitoffsetsearchstatuscarrierto_datefrom_datetracking_status

list_store_connections

List store connections

Stores and marketplaces connected to Pirate Ship for order import, with their status. Every connected store (Shopify, Etsy, eBay, WooCommerce, Squarespace and others): its name, platform, whether it is active and still authorised (valid false means reconnect it in Pirate Ship) and whether orders sync on their own. Connecting a store happens in Pirate Ship, not here.

無需輸入參數。

list_transactions

List transactions

Every charge, payment and refund on the Pirate Ship balance, newest first. The Reports, Transaction History table: each label purchase, payment, refund and carrier adjustment with its amount in US dollars (negative takes from the balance) and the balance after it. from_date and to_date narrow by day, type by the table's transaction types, search works like its search box.

輸入參數sorttypelimitoffsetsearchto_datefrom_date

parse_address

Parse address

Splits a pasted address into name, street, city, state, ZIP and country. Pirate Ship's Paste Address: free text such as a line copied from an email or an order becomes the fields create_shipment takes. It only parses; the address is checked when the shipment is created.

輸入參數text必填

rename_batch

Rename batch

Changes a batch's title. Sets the title Pirate Ship shows for a batch or single label on the Ship page and in reports.

輸入參數title必填batch_id必填

search_recipients

Search recipients

Past recipients' addresses matching a name, email or phone. The suggestions Pirate Ship's Ship To form shows while typing: addresses of people this account shipped to before, matched by the start of their name (or email or phone). Use one as create_shipment's to.

輸入參數fieldquery必填

set_default_ship_from_address

Set default ship-from address

Makes one Ship From Address the default for new shipments and rate quotes. New shipments, get_rates and pickups start from the default Ship From Address.

輸入參數address_id必填

sync_store_orders

Sync store orders

Pulls new orders from every connected store into Pirate Ship's Import list. Starts Refresh Data for all connected stores and waits up to wait_seconds for it to finish; running true means it continues in the background. Then list_import_orders shows the orders. With no store connected nothing is imported.

輸入參數wait_seconds

unignore_orders

Unignore orders

Puts ignored store orders back on the Import list.

輸入參數order_ids必填

update_email_template

Update email template

Changes a tracking email template; fields you leave out keep their values. Edits the name, subject, sender, BCC address, HTML body or default flag of one template.

輸入參數htmlnamedefaultsubjectbcc_emailsender_nametemplate_id必填sender_email

update_label_settings

Update label settings

Changes label size, file format, packing list, logo, QR codes, address correction or export format. Saves Settings, General for the whole account. Fields you leave out keep their values. Applies to labels made from now on; get_label_settings shows the current values.

輸入參數label_sizelabel_formatmobile_codespacking_listlogo_on_labelreport_formataddress_correction

update_saved_package

Update saved package

Changes a Saved Package; fields you leave out keep their values. Edits one Saved Package: name, packaging, size, weight, signature, insurance, return label and flags. Pirate Ship saves an edit as a new version: the answer carries the new id, use it from then on. default true makes it the preselected package.

輸入參數titledefaultwidth_inheight_inirregularlength_inpackagingsignatureweight_ozmedia_mailpackage_id必填return_label另有 2 個

update_ship_from_address

Update ship-from address

Changes a Ship From Address: its name, origin or return address. Edits one saved Ship From Address; fields you leave out keep their values. origin_is_return true sends returns to the origin, return_address sets a separate one. Pirate Ship saves an edit as a new version: the answer carries the new id, use it from then on. Labels already bought keep their address.

輸入參數titleoriginaddress_id必填return_addressorigin_is_return

update_tracking_email_settings

Update tracking email settings

Turns default tracking emails on or off and sets their delay after purchase. Changes only what you pass and returns the settings as get_tracking_email_settings does.

輸入參數delayenabled

版本歷史

3
  1. v1.0.2最新Oct 25, 2026
  2. v1.0.1Oct 24, 2026
  3. v1.0.0Oct 23, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Cotlet 整合