# Packrift MCP

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/Packrift/packrift-mcp  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/packrift-mcp

## Description
Exact-spec Packrift packaging search with live price, stock, shipping, cart handoff, and no-match.

## Claude Desktop Quick Installation
Heuristic fallback — verify the package name and runner against the repository README before running it. Uses `npx` (confidence: low):

```json
"mcpServers": {
  "packrift-mcp": {
    "command": "npx",
    "args": ["-y","packrift-mcp"]
  }
}
```

## Documentation & README

# Packrift MCP Server

Production MCP (Model Context Protocol) server for Packrift exact-spec packaging procurement. Hero use case: find the right packaging supply for a given item, SKU, or reorder need, then confirm live price, inventory, shipping, and cart handoff.

- **Stack**: Cloudflare Workers, TypeScript (strict), Hono, Zod, Streamable HTTP transport
- **Backing**: Shopify Admin GraphQL API (`2025-04`), store `packrift.myshopify.com`
- **Endpoint**: `POST /mcp`, `GET /mcp` (SSE), `GET /` and `GET /start` (MCP start page), `GET /.well-known/mcp/server-card.json`
- **Install guide**: see [`llms-install.md`](llms-install.md) for remote MCP client configuration.
- **Discovery gate**: product lookup, reorder, quote, and cart handoff flows are constrained to AI-approved Packrift catalog records where SKU selection is involved.

## Remote MCP client setup

The public Packrift endpoint is hosted at:

```text
https://mcp.packrift.com/mcp
```

Fast start page for developers, agents, and directory reviewers:

```text
https://mcp.packrift.com/start
```

Directory and partner handoffs can use tracked start links without changing the MCP endpoint. Use a lowercase source slug with letters, numbers, and underscores:

```text
https://mcp.packrift.com/r/start/{source}
```

The start page also renders source-specific copy controls when it receives a source:

```text
https://mcp.packrift.com/start?utm_source={source}
```

Those handoffs record aggregate install-intent telemetry: `/r/config/{source}` fetches show up as `mcp_tracked_config_fetches`, `/r/install/{source}/{target}` opens show up as `mcp_install_intent`, and copy controls record `mcp_install_copy` by source and target so partner and directory handoffs can be evaluated before downstream cart events appear.

Custom partner, campaign, directory, and agent-workflow slugs are allowed without code changes as long as they match `^[a-z0-9_]{2,64}$`. Examples: `mcpservers_org`, `agency_partner`, `browser_agent_demo`, `newsletter_mcp`.

When a directory or agent host wants a source-attributed config file instead of an HTML start page, use:

```text
https://mcp.packrift.com/r/config/{source}
```

Tracked config fetches are exposed by source in `https://mcp.packrift.com/ai/mcp-usage-snapshot.json`.

For a target-specific tracked install action, use:

```text
https://mcp.packrift.com/r/install/{source}/{target}
```

Common targets include `generic_streamable_http`, `stdio_mcp_remote`, `claude_code`, `codex`, `claude_desktop`, `cursor_windsurf_vscode`, and `cline`.

MCP clients that support remote HTTP or Streamable HTTP servers can add Packrift with:

```json
{
  "mcpServers": {
    "packrift": {
      "type": "http",
      "url": "https://mcp.packrift.com/mcp"
    }
  }
}
```

Cline users should use the tracked Cline target, which returns Cline-native `streamableHttp` config:

```text
https://mcp.packrift.com/r/install/cline_mcp_marketplace/cline?format=json
```

Hosts that only accept local stdio MCP commands can use the tracked `stdio_mcp_remote` target. It runs `npx mcp-remote` as a thin bridge and still forwards every call to the hosted Packrift endpoint:

```text
https://mcp.packrift.com/r/install/{source}/stdio_mcp_remote?format=json
```

## Hosted connector and directory listings

Use the hosted endpoint above when possible. It requires no buyer-side API key and exposes the current 15-tool Packrift exact-spec commerce surface.

- Glama hosted connector: https://glama.ai/mcp/connectors/io.github.Packrift/packrift-mcp
- MCP Marketplace listing: https://mcp-marketplace.io/server/io-github-packrift-packrift-mcp
- Official MCP Registry search: https://registry.modelcontextprotocol.io/v0/servers?search=Packrift
- Claude connector submission packet: https://mcp.packrift.com/ai/claude-connector-submission.json
- Agent capture outreach packet: https://mcp.packrift.com/ai/agent-capture-outreach.json
- Source repository: https://github.com/Packrift/packrift-mcp
- Direct Streamable HTTP endpoint: https://mcp.packrift.com/mcp

### Glama source listing release notes

The hosted Glama connector should remain the primary Glama traffic target. The
separate Glama source server listing can use this repository for release and
quality checks, but it should still point users at the hosted no-auth MCP
endpoint above.

- `Dockerfile` starts the Packrift MCP server on `PORT=8787`.
- `glama.json` is the source-listing maintainer claim file.
- `smithery.yaml` gives Glama/Smithery-compatible container metadata with an
  empty config schema, so source-listing release checks do not infer a required
  buyer token.
- Running the container without `SHOPIFY_PACKRIFT_TOKEN` still exposes MCP
  discovery: `tools/list` returns the current 15-tool surface and
  `resources/list` returns the public AI/MCP resources.
- `SHOPIFY_PACKRIFT_TOKEN` is not required for MCP discovery, directory
  scanning, or hosted connector use. It is required only for self-hosted live
  Shopify-backed catalog, pricing, inventory, shipping, and cart tool calls.
- The source listing should not create a separate Packrift CLI or buyer
  surface; it should release/sync the existing repository and keep the canonical
  runtime at `https://mcp.packrift.com/mcp`.

## Container Image

The public hosted endpoint above is the primary integration path and the
canonical `server.json` manifest is remote-only. A container image is still
published for local development and environments that explicitly require a
self-hosted package-style install surface:

```sh
docker pull ghcr.io/packrift/packrift-mcp:latest
docker run --rm -p 8787:8787 \
  -e SHOPIFY_PACKRIFT_TOKEN=<shopify_admin_api_token> \
  ghcr.io/packrift/packrift-mcp:latest
```

You can also build the image from this repository:

```sh
docker build -t packrift-mcp .
docker run --rm -p 8787:8787 \
  -e SHOPIFY_PACKRIFT_TOKEN=<shopify_admin_api_token> \
  packrift-mcp
```

Optional environment variables:

- `PORT` defaults to `8787`
- `SHOPIFY_STORE_DOMAIN` defaults to `packrift.myshopify.com`
- `SHOPIFY_API_VERSION` defaults to `2025-04`
- `STOREFRONT_DOMAIN` defaults to `packrift.com`
- `SHOPIFY_PACKRIFT_TOKEN` is optional for MCP introspection and directory scanning, but required when self-hosting live Shopify-backed catalog, pricing, inventory, shipping, and cart tools

The container uses an in-memory cache instead of Cloudflare KV. It is intended
for discovery and client testing; the production server remains the Cloudflare
Workers endpoint at `https://mcp.packrift.com/mcp`.

## AI Discovery Surfaces

- `llms.txt`: https://mcp.packrift.com/llms.txt
- `llms-full.txt`: https://mcp.packrift.com/llms-full.txt
- Agent Web Protocol manifest: https://mcp.packrift.com/.well-known/agent.json
- Agent Web Protocol brand-domain alias: https://packrift.com/agent.json
- CapIndex capability card: https://mcp.packrift.com/.well-known/capability-card.json
- MCP server card: https://mcp.packrift.com/.well-known/mcp/server-card.json
- MCP client config: https://mcp.packrift.com/ai/mcp-client-config.json
- Root MCP JSON config: https://mcp.packrift.com/mcp.json
- Well-known MCP JSON config: https://mcp.packrift.com/.well-known/mcp.json
- OpenAPI discovery adapter: https://mcp.packrift.com/openapi.json
- Well-known OpenAPI discovery adapter: https://mcp.packrift.com/.well-known/openapi.json
- AI plugin-style discovery manifest: https://mcp.packrift.com/ai-plugin.json
- AI plugin-style discovery manifest: https://mcp.packrift.com/.well-known/ai-plugin.json
- Glama connector claim: https://mcp.packrift.com/.well-known/glama.json
- MCP Marketplace manifest: https://mcp.packrift.com/.well-known/mcp-marketplace.json
- AI corpus sitemap: https://mcp.packrift.com/ai/sitemap.xml
- All-agent capture matrix: https://mcp.packrift.com/ai/all-agent-capture.json
- All-agent capture matrix Markdown: https://mcp.packrift.com/ai/all-agent-capture.md
- Agent capture outreach packet: https://mcp.packrift.com/ai/agent-capture-outreach.json
- Agent capture outreach packet Markdown: https://mcp.packrift.com/ai/agent-capture-outreach.md
- MCP tracked start template: https://mcp.packrift.com/r/start/{source}
- MCP tracked config template: https://mcp.packrift.com/r/config/{source}
- MCP tracked start source format: `^[a-z0-9_]{2,64}$`; partner-specific slugs are allowed without pre-registration
- MCP start pack: https://mcp.packrift.com/ai/mcp-start.json
- MCP start pack Markdown: https://mcp.packrift.com/ai/mcp-start.md
- MCP adoption kit: https://mcp.packrift.com/ai/mcp-adoption-kit.json
- MCP adoption kit Markdown: https://mcp.packrift.com/ai/mcp-adoption-kit.md
- MCP install matrix: https://mcp.packrift.com/ai/mcp-install-matrix.json
- MCP install matrix Markdown: https://mcp.packrift.com/ai/mcp-install-matrix.md
- MCP client config Markdown: https://mcp.packrift.com/ai/mcp-client-config.md
- MCP usage snapshot: https://mcp.packrift.com/ai/mcp-usage-snapshot.json
- MCP usage snapshot Markdown: https://mcp.packrift.com/ai/mcp-usage-snapshot.md
- MCP agent adoption progress: https://mcp.packrift.com/ai/mcp-agent-adoption-progress.json
- MCP agent adoption progress Markdown: https://mcp.packrift.com/ai/mcp-agent-adoption-progress.md
- MCP agent adoption progress HTML: https://mcp.packrift.com/ai/mcp-agent-adoption-progress.html
- MCP buyer use cases: https://mcp.packrift.com/ai/mcp-buyer-use-cases.json
- MCP buyer use cases Markdown: https://mcp.packrift.com/ai/mcp-buyer-use-cases.md
- MCP buyer use cases HTML: https://mcp.packrift.com/ai/mcp-buyer-use-cases.html
- MCP cart activation: https://mcp.packrift.com/ai/mcp-cart-activation.json
- MCP cart activation Markdown: https://mcp.packrift.com/ai/mcp-cart-activation.md
- MCP cart activation HTML: https://mcp.packrift.com/ai/mcp-cart-activation.html
- MCP first-run proof: https://mcp.packrift.com/ai/mcp-first-run-proof.json
- MCP first-run proof Markdown: https://mcp.packrift.com/ai/mcp-first-run-proof.md
- MCP workflow gallery: https://mcp.packrift.com/ai/mcp-workflow-gallery.json
- MCP workflow gallery Markdown: https://mcp.packrift.com/ai/mcp-workflow-gallery.md
- MCP workflow gallery HTML: https://mcp.packrift.com/ai/mcp-workflow-gallery.html
- MCP eval pack: https://mcp.packrift.com/ai/mcp-eval-pack.json
- MCP eval pack Markdown: https://mcp.packrift.com/ai/mcp-eval-pack.md
- MCP source-listing readiness: https://mcp.packrift.com/ai/mcp-source-listing-readiness.json
- MCP source-listing readiness Markdown: https://mcp.packrift.com/ai/mcp-source-listing-readiness.md
- Browser-agent bridge: https://mcp.packrift.com/ai/browser-agent-bridge.json
- Browser-agent bridge Markdown: https://mcp.packrift.com/ai/browser-agent-bridge.md
- Root Browserbase/Browse SKILL.md: https://mcp.packrift.com/SKILL.md
- Browserbase Browse skill pack: https://mcp.packrift.com/ai/browserbase-browse-skill-pack.json
- Browserbase Browse skill pack Markdown: https://mcp.packrift.com/ai/browserbase-browse-skill-pack.md
- Canonical Browserbase/Browse SKILL.md: https://mcp.packrift.com/ai/browserbase-browse/SKILL.md
- MCP directory refresh pack: https://mcp.packrift.com/ai/mcp-directory-refresh.json
- MCP directory refresh pack Markdown: https://mcp.packrift.com/ai/mcp-directory-refresh.md
- MCP directory submit actions: https://mcp.packrift.com/ai/mcp-directory-submit-actions.json
- MCP directory submit actions Markdown: https://mcp.packrift.com/ai/mcp-directory-submit-actions.md
- MCP directory update card template: https://mcp.packrift.com/ai/mcp-directory-update/{source}.json
- MCP directory update card Markdown template: https://mcp.packrift.com/ai/mcp-directory-update/{source}.md
- MCP reviewer activation: https://mcp.packrift.com/ai/mcp-reviewer-activation.json
- MCP reviewer activation Markdown: https://mcp.packrift.com/ai/mcp-reviewer-activation.md
- MCP activation command center: https://mcp.packrift.com/r/activate
- Live MCP tool discovery JSON: https://mcp.packrift.com/ai/mcp-tools.json
- Live MCP tool discovery Markdown: https://mcp.packrift.com/ai/spec-finder-tools.md
- MCP source activation queue HTML: https://mcp.packrift.com/ai/mcp-source-activation-queue.html
- MCP source activation sitemap: https://mcp.packrift.com/ai/mcp-source-activation-sitemap.xml
- MCP source activation packet template: https://mcp.packrift.com/ai/mcp-source-activation/{source}.json
- Cline source activation packet: https://mcp.packrift.com/ai/mcp-source-activation/cline_mcp_marketplace.json
- MCP activation wave: https://mcp.packrift.com/ai/mcp-activation-wave.json
- MCP activation wave HTML: https://mcp.packrift.com/ai/mcp-activation-wave.html
- MCP external activation brief: https://mcp.packrift.com/ai/mcp-external-activation-brief.json
- MCP external activation brief HTML: https://mcp.packrift.com/ai/mcp-external-activation-brief.html
- MCP external activation selected-task JSONL: https://mcp.packrift.com/ai/mcp-external-activation-brief-tasks.jsonl
- MCP external activation selected-task CSV: https://mcp.packrift.com/ai/mcp-external-activation-brief-tasks.csv
- MCP external activation compact selected-task JSONL: https://mcp.packrift.com/ai/mcp-external-activation-brief-tasks.jsonl?compact=1
- MCP external activation compact selected-task CSV: https://mcp.packrift.com/ai/mcp-external-activation-brief-tasks.csv?compact=1
- MCP activation wave runner: `PACKRIFT_EXTERNAL_ACTIVATION=1 curl -sS 'https://mcp.packrift.com/ai/mcp-activation-wave-runner.sh' | bash`
- MCP full-source capture runner: `PACKRIFT_EXTERNAL_ACTIVATION=1 PACKRIFT_ACTIVATION_WAVE_SCOPE=full curl -sS 'https://mcp.packrift.com/ai/mcp-activation-wave-runner.sh' | bash`
- MCP reviewer activation runner: https://mcp.packrift.com/r/activate/generic?format=html
- MCP reviewer activation shell script: https://mcp.packrift.com/r/activate/generic?format=sh
- MCP buyer/reviewer order handoff template: https://mcp.packrift.com/r/order/{source}?format=html
- MCP buyer/reviewer handoff hub: https://mcp.packrift.com/ai/mcp-buyer-order-handoffs.html
- MCP.so buyer/reviewer order handoff: https://mcp.packrift.com/r/order/mcp_so?format=html
- Cline buyer/reviewer order handoff: https://mcp.packrift.com/r/order/cline_mcp_marketplace?format=html
- Order handoff pages include an inline source-aware MCP confirmation runner. The runner calls the hosted endpoint, requires `create_cart_url`, replaces the cart button with the fresh measured `/r/cart/1066` URL, and still does not place an order.
- Agent capture outreach packet: https://mcp.packrift.com/ai/agent-capture-outreach.json
- Agent capture outreach packet Markdown: https://mcp.packrift.com/ai/agent-capture-outreach.md
- AI-approved product JSONL: https://mcp.packrift.com/ai/packrift-ai-approved-products.jsonl
- AI purchase paths JSONL: https://mcp.packrift.com/ai/purchase-paths.jsonl
- MCP cart handoff candidates: https://mcp.packrift.com/ai/mcp-cart-handoff-candidates.json
- Measured handoff directory: https://mcp.packrift.com/ai/measured-handoffs.json
- Measured cart landing example: https://mcp.packrift.com/r/cart/1066
- Reorder by SKU corpus: https://mcp.packrift.com/ai/reorder-by-sku.md
- Top 1,000 AI-sales SKU sitemap: https://mcp.packrift.com/ai/top-1000-ai-sales-sitemap.xml
- All AI-approved SKU sitemap: https://mcp.packrift.com/ai/all-ai-approved-sku-sitemap.xml
- OpenAI-shaped strict product TSV: https://mcp.packrift.com/ai/packrift-openai-products-strict-stable-current.tsv
- Shopify native UCP guide: https://mcp.packrift.com/ai/shopify-native-ucp-commerce-surface.md
- UCP starter catalog for curated storefront builders: https://mcp.packrift.com/ai/mcp-ucp-starter-catalog.json
- UCP starter catalog Markdown: https://mcp.packrift.com/ai/mcp-ucp-starter-catalog.md
- UCP storefront builder kit: https://mcp.packrift.com/ai/mcp-ucp-builder-kit.json
- UCP storefront builder kit Markdown: https://mcp.packrift.com/ai/mcp-ucp-builder-kit.md
- UCP storefront import feed JSON: https://mcp.packrift.com/ai/mcp-ucp-storefront-import.json
- UCP storefront import feed JSONL: https://mcp.packrift.com/ai/mcp-ucp-storefront-import.jsonl
- UCP storefront import feed CSV: https://mcp.packrift.com/ai/mcp-ucp-storefront-import.csv
- UCP storefront import feed HTML: https://mcp.packrift.com/ai/mcp-ucp-storefront-import.html
- UCP storefront shelf JSON: https://mcp.packrift.com/ai/mcp-ucp-storefront-shelf.json
- UCP storefront shelf HTML: https://mcp.packrift.com/ai/mcp-ucp-storefront-shelf.html
- UCP storefront shelf embed JS: https://mcp.packrift.com/ai/packrift-ucp-shelf.js
- UCP storefront adoption kit JSON: https://mcp.packrift.com/ai/mcp-ucp-storefront-adoption.json
- UCP storefront adoption kit HTML: https://mcp.packrift.com/ai/mcp-ucp-storefront-adoption.html
- UCP builder activation handoff JSON: https://mcp.packrift.com/ai/mcp-ucp-builder-activation-handoff.json
- UCP builder activation handoff HTML: https://mcp.packrift.com/ai/mcp-ucp-builder-activation-handoff.html
- UCP builder integration pack JSON: https://mcp.packrift.com/ai/packrift-ucp-builder-integration-pack.json
- UCP builder integration pack HTML: https://mcp.packrift.com/ai/packrift-ucp-builder-integration-pack.html
- Stack412-style UCP shelf demo: https://mcp.packrift.com/ai/mcp-ucp-storefront-shelf-demo/stack412_style_storefront.html
- Open Scout-style shopping-agent shelf demo: https://mcp.packrift.com/ai/mcp-ucp-storefront-shelf-demo/open_scout_shopping_agent.html
- Upsonic-style UCP agent framework shelf demo: https://mcp.packrift.com/ai/mcp-ucp-storefront-shelf-demo/upsonic_ucp_agent_framework.html
- Agorio-style shopping-agent SDK shelf demo: https://mcp.packrift.com/ai/mcp-ucp-storefront-shelf-demo/agorio_shopping_agent_sdk.html
- Example SKU markdown page: https://mcp.packrift.com/ai/sku/1066.md
- Example SKU JSON record: https://mcp.packrift.com/ai/sku/1066.json

## Source Activation IndexNow

Notify IndexNow about the existing source-specific MCP eval-pack, start, install, first-run, and activation URLs:

```bash
npm run submit:source-activation-indexnow
```

The script preflights `https://mcp.packrift.com/ai/mcp-source-activation-sitemap.xml`, writes artifacts under `outputs/source-activation-indexnow/`, and submits only existing hosted MCP URLs. It does not create a new CLI, buyer surface, checkout path, or directory submission.

## Tools

Tools are framed around exact-spec procurement, not generic browsing. Use `find_packaging_for_item` when the buyer has item dimensions or a fit question; use SKU and exact-spec tools when the buyer is replenishing a known product.

| Tool | Purpose |
|---|---|
| `find_packaging_for_item(item_length_in, item_width_in, item_depth_in, item_weight_lb, use_case)` | Hero. Item L/W/D + weight + use case -> ranked packaging SKUs that fit. Use for smallest-fit, box-vs-mailer, and Uline-by-size style questions. |
| `search_products(query, limit?)` | Keyword fallback when dimensions are unknown, such as kraft tape, bubble mailer, starter kit, or weather-resistant labels. Cached 5 min in KV. |
| `get_product(handle)` | Full product detail including variants, dimensions/metafields, weight, stock, and product URL. |
| `get_pricing(variant_ids[], quantity?)` | Live unit price and line total before purchase handoff. `variant_ids` must be numeric Shopify variant IDs encoded as strings. Never cached. |
| `check_inventory(variant_ids[])` | Live inventory check before recommending or building a cart. `variant_ids` must be numeric Shopify variant IDs encoded as strings. Never cached. |
| `get_shipping_estimate(zip, country, items[])` | Carrier rates for a chosen cart via Shopify `draftOrderCalculate`. |
| `get_cart_handoff_candidates(limit?, family?, sku?)` | Priority curated SKUs with ready `create_cart_url` arguments, SKU/product/reorder/quote/cart links, and required live-confirmation sequence. |
| `create_cart_url(items[], discount_code?, ref?)` | Final cart handoff. Builds a GA4-visible Packrift cart landing URL plus the final `packrift.com/cart/...` permalink with `ref=mcp` and AI-commerce attribution fields. |
| `prepare_purchase_handoff(sku, quantity?, buyer_confirmed?)` | Fast exact-SKU path. Confirms the product, live price, and inventory, then returns a tracked cart URL only when `buyer_confirmed=true`. |
| `compare_alternatives(requested_spec, family?, competitor_reference?, limit?)` | Ranks curated Packrift alternatives for open-ended buyer requests, including competitor-style packaging specs. |
| `pack_calculator(item, padding?, use_case?, limit?)` | Calculates protected inside dimensions and returns fitted box or mailer candidates with void-fill guidance. |
| `inventory_status(variant_ids?, sku?, handle?, quantity?)` | Live total and location-level Shopify inventory status for exact SKUs, handles, or variant IDs. |
| `get_reorder_link(sku, handle?)` | Reorder URL, product URL, and copy-procurement-spec text for a catalog SKU or handle. |
| `get_bulk_quote_link(requested_spec, family?, sku?, quantity?)` | Tracked bulk quote URL for no-exact-match, large-volume, or procurement-review workflows. |
| `explain_no_exact_match(requested_spec, missing_or_mismatched_fields?)` | Explains why a nearby product should not be presented as exact, then routes to safe next actions and quote recovery. |

## MCP Prompts And Resources

The server advertises prompts and resources in addition to tools.

Prompts:

- `find_exact_packaging_spec`
- `fit_item_then_prepare_cart`
- `review_cart_handoff_candidates`
- `reorder_packrift_sku`
- `prepare_cart_handoff`
- `request_bulk_quote_for_no_match`
- `copy_procurement_spec`
- `find_box_by_lwh`
- `find_label_by_size_material_printer`

Resources include the AI-approved product corpus, per-SKU markdown/JSON records, purchase-path JSONL, MCP cart handoff candidates, MCP cart activation playbook, measured handoff directories with cart routes, exact-spec family files, no-exact-match policy, crawler-safe purchase paths, Shopify-native UCP commerce surface, UCP starter catalog, storefront builder kit, and flat storefront import feed for curated packaging/shipping-supplies shelves.

## Exact-spec AI-commerce examples

Packrift is optimized for exact-spec packaging procurement: agents should not treat nearby sizes, materials, colors, adhesives, strength ratings, or case counts as exact substitutes. If there is no exact AI-approved match, route the buyer to reorder, no-match explanation, or bulk quote recovery instead of forcing a substitute.

Current paid ChatGPT / product-card order families that are represented in the public corpus:

- SKU `1066`: 10 x 6 x 6 ECT-32 kraft corrugated boxes, 25/bundle
- SKU `MFL1295`: 12 1/8 x 9 1/4 x 5 white self-seal literature mailers, 50/pack
- SKU `LL251WR`: 2 5/8 x 1 weather-resistant polyester laser labels, 3000/case

## Local development

Install Node 24+ and the deps:

```sh
cd ~/Downloads/packrift-mcp
npm install
```

Use `/Users/farhan/Downloads/packrift-mcp` as the canonical production worktree. The older
`/Users/farhan/Downloads/packrift-mcp-server` checkout is a legacy duplicate and must not be
used for Worker deploys because it can overwrite `mcp.packrift.com` with stale routes/tools.

Local secrets belong in `.dev.vars` (gitignored). Do not paste real tokens into
this README, issues, directory submissions, screenshots, or third-party support
threads.

```
SHOPIFY_PACKRIFT_TOKEN=<shopify_admin_api_token>
```

Run the server:

```sh
npx wrangler dev --port 8787 --local
```

Smoke-test the MCP endpoint with curl:

```sh
# initialize
curl -s -X POST http://127.0.0.1:8787/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'

# list tools
curl -s -X POST http://127.0.0.1:8787/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

# search
curl -s -X POST http://127.0.0.1:8787/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_products","arguments":{"query":"poly mailer","limit":3}}}'
```

Type-check:

```sh
npx tsc --noEmit
```

Smoke-test the hosted cart handoff path without creating an order or collecting
payment:

```sh
npm run smoke:cart-handoff
```

This synthetic check calls the current hosted MCP endpoint, verifies
`get_cart_handoff_candidates -> get_product -> get_pricing -> check_inventory ->
create_cart_url`, and checks the MCP cart landing route. It writes JSON and
Markdown evidence under `outputs/mcp-cart-handoff-smoke/`. Add
`-- --sku LL251WR --qty 1` to test another AI-approved SKU. Use
`-- --verify-final-cart` only when intentionally checking Shopify's final cart
redirect.

GitHub Actions also runs the hosted smoke checks every six hours and on manual
dispatch through `.github/workflows/mcp-live-smoke.yml`. The scheduled job
checks both `1066` and `LL251WR`, then uploads smoke and capture evidence
artifacts. Run `npm run check:distribution` for the broader directory and
registry monitor; it exits nonzero only when a tracked surface has a true
`fail` status.

Refresh the `llms-full.txt` priority SKU block from recent GA4 item activity joined to the AI-approved catalog and live Shopify inventory:

```sh
npm run build:llms-full -- \
  --ga4-items /path/to/packrift-ga4-items.csv \
  --approved-jsonl /path/to/packrift-ai-approved-products.jsonl \
  --limit 20
```

The generated public block must not include local paths, internal notes, or non-public campaign details. A private JSON report is written under `outputs/llms-full-priority-skus/`.

To run the whole refresh path, pull fresh GA4 reports, publish the public `llms-full.txt` override into Workers KV, purge the public agent URLs, and verify the live surfaces:

```sh
npm run refresh:llms-full -- --publish-kv
```

This updates the `static-override:llms-full.txt` KV key. The Worker serves that override after the current deploy, so future priority-SKU refreshes do not require deploying unrelated Worker source changes.

Check crawler-facing `llms-full.txt` availability across six AI user agents:

```sh
npm run check:static-availability -- --samples-per-ua 200 --concurrency 30
```

This writes JSON and Markdown evidence under `outputs/static-availability/`. The funnel snapshot also runs this check and reports failure rate, 5xx rate, content validation, and p95 latency.

Refresh the full MCP funnel proof, including first-party Shopify order stitching
for MCP cart attributes:

```sh
npm run snapshot:funnel
```

The snapshot reads the token-protected `https://mcp.packrift.com/admin/mcp-orders`
endpoint, scans recent Shopify orders for MCP cart attributes such as
`packrift_mcp_key`, `packrift_ai_id`, and `utm_source=chatgpt-mcp`, and reports
attributed order count and revenue beside GA4 cart-landing evidence. The admin
endpoint requires `MCP_STATS_TOKEN` and does not expose customer PII.

Publish the sanitized GA4 visitor proof from that local snapshot to the public
Worker surface:

```sh
npm run publish:ga4-funnel-proof -- --publish-kv
```

This updates `https://mcp.packrift.com/ai/mcp-ga4-funnel-proof.json` and `.md`
without exposing local paths, raw CSV rows, order rows, or credentials. The
public funnel snapshot also reads this proof for the thousands-of-qualified-
visitors gate when it is available.

Refresh MCP directory evidence:

```sh
npm run check:distribution
npm run build:directory-submission-pack
```

The distribution check reports which public MCP directories are current, stale, blocked, or failing. The submission pack turns stale rows into copy-ready listing fields, live proof URLs, and the next refresh action for each directory.

Check the all-agent capture hub:

```sh
npm run check:agent-capture
npm run build:agent-capture-outreach
```

This verifies that `https://mcp.packrift.com/ai/all-agent-capture.json` and
`.md`, `https://mcp.packrift.com/ai/mcp-adoption-kit.json` and `.md`,
`https://mcp.packrift.com/ai/mcp-install-matrix.json` and `.md`,
`https://mcp.packrift.com/ai/mcp-usage-snapshot.json` and `.md`, and
`https://mcp.packrift.com/ai/mcp-agent-adoption-progress.json`, `.md`, and `.html`, and
`https://mcp.packrift.com/ai/mcp-buyer-use-cases.json`, `.md`, and `.html`, and
`https://mcp.packrift.com/ai/mcp-cart-activation.json`, `.md`, and `.html`, and
`https://mcp.packrift.com/ai/mcp-workflow-gallery.json`, `.md`, and `.html`, and
`https://mcp.packrift.com/ai/browser-agent-bridge.json` and `.md`, and
`https://mcp.packrift.com/SKILL.md`, and
`https://mcp.packrift.com/ai/mcp-directory-refresh.json` and `.md`, and
`https://mcp.packrift.com/ai/mcp-directory-submit-actions.json` and `.md`, and
`https://mcp.packrift.com/ai/mcp-reviewer-activation.json` and `.md`, and
the activation command center at `https://mcp.packrift.com/r/activate`,
the source activation queue HTML at `https://mcp.packrift.com/ai/mcp-source-activation-queue.html`,
the activation wave and guarded full-source capture runner at `https://mcp.packrift.com/ai/mcp-activation-wave.json`,
the selected external activation task queue at `https://mcp.packrift.com/ai/mcp-external-activation-brief-tasks.jsonl`,
the compact selected-task exports at `https://mcp.packrift.com/ai/mcp-external-activation-brief-tasks.jsonl?compact=1`
and `https://mcp.packrift.com/ai/mcp-external-activation-brief-tasks.csv?compact=1`,
the browser runner at `https://mcp.packrift.com/r/activate/generic?format=html`, and
the shell activation script at `https://mcp.packrift.com/r/activate/generic?format=sh`, and
`https://mcp.packrift.com/ai/mcp-eval-pack.json` and `.md`, and
`https://mcp.packrift.com/ai/agent-capture-outreach.json` and `.md` are live,
advertised in `resources/list`, include the core agent surfaces,
first-five-minute install/test path, copy-paste developer examples, copy-ready install matrix, public usage snapshot,
agent adoption progress board, buyer workflow map, cart activation playbook, workflow gallery, eval pack, browser-agent bridge, directory refresh pack, directory submit-action queue,
source activation command center, reviewer activation handoff, agent capture outreach packet, Browserbase Browse candidate lane, and root SKILL.md, and preserve the
rule that Packrift uses the hosted MCP endpoint instead of a duplicate CLI surface. The outreach build writes
copy-ready stale-directory refresh messages, Browserbase Browse candidate
briefs, proof links, and MCP install snippets under
`outputs/agent-capture-outreach/`.

## Deployment

The production endpoint is `https://mcp.packrift.com/mcp`. Use the hosted
endpoint for buyers, directory reviewers, and agent integrations. Only deploy a
self-hosted worker when you are updating the production service or testing a
controlled fork.

When deploying with an authorized Cloudflare session, run:

```sh
cd ~/Downloads/packrift-mcp

# 1. Create the KV namespace and copy the printed id into wrangler.toml
#    (replace both `id` and `preview_id` with the same value).
npx wrangler kv namespace create CATALOG_CACHE

# 2. Set the Shopify Admin token as a secret when prompted.
#    Never write the token into this repository or public documentation.
npx wrangler secret put SHOPIFY_PACKRIFT_TOKEN

# 3. Deploy.
npx wrangler deploy

# 4. Verify the public hosted endpoint after deploy.
curl -sS https://mcp.packrift.com/start >/dev/null
```

The server card lives at `https://mcp.packrift.com/.well-known/mcp/server-card.json`.

## Design notes / caveats

- **`cartCreate` is a Storefront API mutation, not Admin.** The brief asked for `cartCreate` + `cartBuyerIdentityUpdate` for shipping rates, but those don't exist on the Admin GraphQL API this server uses. The supported Admin path is `draftOrderCalculate`, which is what `get_shipping_estimate` uses. It returns the same carrier-rate data without creating a real order.
- **Dimensions parsing.** Packrift product dimensions live in `custom.specN_value` metafields where the matching `custom.specN_name` says "Dimensions" or "Size". Format is human-readable (`12 1/8" L x 11 5/8" W x 2 5/8" H`). `src/dimensions.ts` parses mixed fractions and falls back to scanning the title.
- **Recommend collections.** The brief mentioned `mailer-boxes` collection — that handle does not exist on the live store. We use `mailers-envelopes`, `boxes-mailers`, `corrugated-boxes`, `bubble-wrap-foam`, `cushioning`, and `ecommerce-fulfillment` (verified via `collections` query 2026-04-29).
- **Use case mapping** is in `src/tools/recommend_packaging.ts` (`COLLECTIONS_BY_USE_CASE`).
- **Shipping rate `handle`** in the response is a long opaque JWT-style string — that's how Shopify returns rate handles; pass it through to subsequent calls if needed.
- **Errors**: tool exceptions are returned as `{ content: [...], isError: true }` per the MCP spec, not as JSON-RPC `-3260x` errors. Protocol-level errors (unknown tool, bad JSON) do return JSON-RPC errors.

## File map

```
src/
  index.ts                       Hono app + MCP JSON-RPC dispatcher
  shopify.ts                     Admin GraphQL client + id helpers
  dimensions.ts                  Spec-string -> structured dimensions
  server-card.ts                 /.well-known card
  tools/
    search_products.ts
    get_product.ts
    get_pricing.ts
    check_inventory.ts
    recommend_packaging.ts
    get_shipping_estimate.ts
    create_cart_url.ts
    exploration_tools.ts
    procurement_links.ts
wrangler.toml                    Worker config (KV binding, vars, route)
package.json
tsconfig.json
.dev.vars                        Local-only secrets (gitignored)
```

## AI Sales SKU Discovery Pages

Packrift publishes AI-commerce SKU pages for exact-spec procurement agents.

- Top 1,000 AI SKU sitemap: https://mcp.packrift.com/ai/top-1000-ai-sales-sitemap.xml
- SKU markdown template: https://mcp.packrift.com/ai/sku/1066.md
- SKU JSON template: https://mcp.packrift.com/ai/sku/1066.json
- Reorder corpus: https://mcp.packrift.com/ai/reorder-by-sku.md
- AI-approved product JSONL: https://mcp.packrift.com/ai/packrift-ai-approved-products.jsonl

Each SKU page links to the canonical Packrift product page, reorder path, bulk quote path, MCP endpoint, and no-exact-match policy. Use these pages only for AI-approved products and confirm live price and inventory through the MCP tools before checkout handoff.

