Packrift MCP Server
OfficialMCP-сервер Packrift
Промышленный MCP-сервер (Model Context Protocol) для Packrift, магазина упаковочных материалов на Shopify. Позволяет ИИ-агентам искать товары в каталоге, получать актуальные цены и данные об остатках, рекомендовать коробки для товаров, рассчитывать стоимость доставки и создавать ссылки на оформление заказа.
Стек: Cloudflare Workers, TypeScript (строгий режим), Hono, Zod, Streamable HTTP transport
Бэкенд: Shopify Admin GraphQL API (
2025-04), магазинpackrift.myshopify.comЭндпоинты:
POST /mcp,GET /mcp(SSE),GET /(проверка работоспособности),GET /.well-known/mcp/server-card.json
Инструменты
Инструмент | Назначение |
| Поиск по ключевым словам в каталоге. Кэшируется на 5 минут в KV. |
| Полная информация о товаре, включая варианты, метаполя с размерами и вес. |
| Актуальная цена за единицу + общая стоимость позиции. Никогда не кэшируется. |
| Актуальное количество на складе. Никогда не кэшируется. |
| До 5 ранжированных вариантов упаковки с учетом отступов 0.5–2 дюйма. |
| Тарифы перевозчиков через |
| Создает ссылку |
Related MCP server: UPS MCP Server
Локальная разработка
Установите Node 24+ и зависимости:
cd ~/Downloads/packrift-mcp-server
npm installЛокальные секреты — уже созданы в .dev.vars (игнорируются git):
SHOPIFY_PACKRIFT_TOKEN=shpat_...Запустите сервер:
npx wrangler dev --port 8787 --localПротестируйте эндпоинт MCP с помощью curl:
# 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}}}'Проверка типов:
npx tsc --noEmitРазвертывание
Учетная запись Cloudflare создается в отдельном процессе. Как только она будет готова и выполнен вход в wrangler (wrangler login), выполните по порядку:
cd ~/Downloads/packrift-mcp-server
# 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 (paste shpat_... when prompted).
npx wrangler secret put SHOPIFY_PACKRIFT_TOKEN
# 3. Deploy. Initial deploy puts the worker on
# https://packrift-mcp.<account>.workers.dev
npx wrangler deploy
# 4. (Once mcp.packrift.com is CNAME'd to the worker) uncomment the [[routes]]
# block in wrangler.toml and redeploy.
npx wrangler deployПосле развертывания эндпоинт MCP будет доступен по адресу https://packrift-mcp.<account>.workers.dev/mcp (а позже https://mcp.packrift.com/mcp). Серверная карта находится по адресу /.well-known/mcp/server-card.json.
Заметки по проектированию / предостережения
cartCreate— это мутация Storefront API, а не Admin. В задаче требовалось использоватьcartCreate+cartBuyerIdentityUpdateдля расчета стоимости доставки, но их нет в Admin GraphQL API, который использует этот сервер. Поддерживаемый путь в Admin —draftOrderCalculate, который и используетget_shipping_estimate. Он возвращает те же данные о тарифах перевозчиков, не создавая реальный заказ.Парсинг размеров. Размеры товаров Packrift хранятся в метаполях
custom.specN_value, где соответствующее полеcustom.specN_nameсодержит значение "Dimensions" или "Size". Формат удобен для чтения (12 1/8" L x 11 5/8" W x 2 5/8" H).src/dimensions.tsобрабатывает смешанные дроби и при необходимости сканирует название товара.Коллекции для рекомендаций. В задаче упоминалась коллекция
mailer-boxes— такого идентификатора (handle) в реальном магазине нет. Мы используемmailers-envelopes,boxes-mailers,corrugated-boxes,bubble-wrap-foam,cushioningиecommerce-fulfillment(проверено через запросcollectionsот 2026-04-29).Сопоставление вариантов использования (use case) находится в
src/tools/recommend_packaging.ts(COLLECTIONS_BY_USE_CASE).handleтарифа доставки в ответе представляет собой длинную непрозрачную строку в стиле JWT — именно так Shopify возвращает идентификаторы тарифов; при необходимости передавайте их в последующие вызовы.Ошибки: исключения инструментов возвращаются как
{ content: [...], isError: true }согласно спецификации MCP, а не как ошибки JSON-RPC-3260x. Ошибки на уровне протокола (неизвестный инструмент, неверный JSON) возвращают ошибки JSON-RPC.
Карта файлов
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
wrangler.toml Worker config (KV binding, vars, route)
package.json
tsconfig.json
.dev.vars Local-only secrets (gitignored)This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-quality-maintenanceA Shopify-focused MCP server that enables AI agents to manage store operations like order tracking, product discovery, and checkout link generation. It facilitates customer-facing interactions including shipping estimates and real-time inventory searches.
- AlicenseAqualityDmaintenanceEnables AI agents to create shipments, track packages, get rates, validate addresses, schedule pickups, and find UPS locations via the UPS API.9102MIT
- AlicenseBqualityDmaintenanceEnables AI agents and automation tools to interact with the Gobox e-commerce platform, providing tools for orders, products, inventory, warehouses, reports, shipments, and webhooks.59MIT
- Flicense-qualityFmaintenanceEnables AI assistants to query and interact with Shopify store data via the Storefront API, including products, collections, carts, and customer information.9
Related MCP Connectors
Multi-carrier shipping for AI agents: compare rates, buy labels, track packages, validate addresses
Shopify MCP Pack — wraps the Shopify Admin REST API (2024-01)
India shipping for AI agents: Shiprocket courier serviceability, create orders, track AWB.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Packrift/packrift-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server