Printful MCP Server

Printful MCP Server

Connects Printful's print-on-demand API to AI assistants like Claude and Cursor to automate business operations. It enables users to browse catalogs, manage orders, generate mockups, and calculate shipping rates through natural language.

Category
访问服务器

README

<div align="center">

🎨 Printful MCP Server

Automate Your Print-on-Demand Business with AI

Connect Printful's powerful API to Claude, Cursor, and other AI assistants through the Model Context Protocol.

📚 Quick Start🔧 Configuration🚀 Examples📖 Documentation


Made by Purple Horizons License: MIT Python 3.10+ Printful API v2

GitHub Stars GitHub Forks


🎁 New to Printful?

<a href="https://www.printful.com/a/purplehorizons"> <img src="https://img.shields.io/badge/Sign_Up-Get_Started_Free-FA4616?style=for-the-badge&logo=printful&logoColor=white" alt="Sign up for Printful"> </a>

<sub>Start your print-on-demand business today • No upfront costs • 300+ products • Global fulfillment</sub>


</div>

✨ Features

<table> <tr> <td width="50%">

🎯 Complete API Coverage

  • ✅ Full Printful API v2 support
  • ✅ Smart v1 fallback for legacy features
  • ✅ 17 tools across all major domains
  • ✅ Real-time stock & pricing data

</td> <td width="50%">

🛡️ Production Ready

  • ✅ Type-safe Pydantic validation
  • ✅ Robust error handling
  • ✅ Rate limit management
  • ✅ Dual output formats (JSON/Markdown)

</td> </tr> <tr> <td width="50%">

🚀 Easy Integration

  • ✅ Works with Claude Desktop
  • ✅ Works with Cursor IDE
  • ✅ stdio + HTTP transports
  • ✅ No hosting required

</td> <td width="50%">

🤖 AI Skill Included

  • ✅ Cursor skill teaches AI how to use tools
  • ✅ Best practices built-in
  • ✅ Auto-applies workflows
  • ✅ Better experience out of the box

</td> </tr> </table>

🎁 Bonus: This repo includes a Cursor AI skill that automatically teaches AI assistants how to use the Printful MCP effectively. Just open the project and start asking questions!


🚀 Quick Start

<details open> <summary><b>📋 Prerequisites</b></summary>

<br>

</details>

<details> <summary><b>⚡ Installation (3 steps)</b></summary>

<br>

Step 1: Clone & Install

git clone https://github.com/Purple-Horizons/printful-ph-mcp.git
cd printful-ph-mcp
pip install -e .

Step 2: Set up API Key

cp .env.example .env
# Edit .env and add: PRINTFUL_API_KEY=your-key-here

Step 3: Configure Your AI Assistant

<details> <summary><b>For Cursor</b></summary>

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "printful": {
      "command": "python",
      "args": ["-m", "printful_mcp"],
      "cwd": "/path/to/printful-ph-mcp",
      "env": {
        "PRINTFUL_API_KEY": "your-api-key-here"
      }
    }
  }
}

</details>

<details> <summary><b>For Claude Desktop</b></summary>

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "printful": {
      "command": "python",
      "args": ["-m", "printful_mcp"],
      "cwd": "/path/to/printful-ph-mcp",
      "env": {
        "PRINTFUL_API_KEY": "your-api-key-here"
      }
    }
  }
}

</details>

That's it! Restart your AI assistant and start using Printful tools.

</details>


🔌 Transport Options

By default, the server uses stdio transport (required for Cursor/Claude Desktop). For HTTP clients or tools like mcporter, you can use HTTP transport.

<details> <summary><b>📡 Available Transports</b></summary>

<br>

Transport Use Case Command
stdio (default) Cursor, Claude Desktop python -m printful_mcp
http HTTP clients, mcporter python -m printful_mcp --transport http
sse Legacy SSE clients python -m printful_mcp --transport sse

HTTP Transport Example:

# Start server on port 8000
python -m printful_mcp --transport http --port 8000

# Or with custom host
python -m printful_mcp --transport http --host 0.0.0.0 --port 8080

Using with mcporter:

# Option 1: Use JSON args format (recommended)
mcporter call printful_mcp.printful_list_catalog_products --args '{"limit":20}'

# Option 2: Use typed values (colon for numbers)
mcporter call printful_mcp.printful_get_product product_id:71

</details>


🎨 What You Can Do

<div align="center">

🛍️ Catalog 📦 Orders 🚚 Shipping 🖼️ Mockups 📁 Files 🏪 Stores
Browse 300+ products Create & manage orders Calculate rates Generate mockups Upload designs View statistics
Check availability Confirm fulfillment List countries Check status Get file info Multi-store support
Get pricing Track orders Delivery times Custom placements - -

</div>


💡 Usage Examples

🎯 Example 1: Find the Perfect Product

# Ask your AI assistant:
"Show me all t-shirts available for DTG printing under $15"

# It will use:
printful_list_catalog_products(
    types="T-SHIRT",
    techniques="dtg",
    limit=20,
    format="markdown"
)

💰 Example 2: Get Pricing

# Ask your AI assistant:
"What's the price for variant 4011 in USD?"

# It will use:
printful_get_variant_prices(
    variant_id=4011,
    currency="USD",
    format="markdown"
)

📦 Example 3: Create an Order

# Ask your AI assistant:
"Create a draft order for John Doe at 123 Main St, Los Angeles, CA 90001"

# It will use:
printful_create_order(
    recipient_name="John Doe",
    recipient_address1="123 Main St",
    recipient_city="Los Angeles",
    recipient_state_code="CA",
    recipient_country_code="US",
    recipient_zip="90001"
)

🎨 Example 4: Generate Product Mockups

# Ask your AI assistant:
"Generate a mockup for product 71 with my design"

# It will use:
printful_create_mockup_task(
    product_id=71,
    variant_ids="4011,4012",
    design_url="https://example.com/design.png",
    placement="front"
)

<div align="center">

🎬 Want to see it in action?

📺 Watch Demo Video📖 Read Full Documentation💬 Join Community

</div>


🛠️ Available Tools

<details> <summary><b>🛍️ Catalog Tools (5)</b> - Browse products & check availability</summary>

<br>

Tool Description Example Use
printful_list_catalog_products Browse 300+ products with filters "Show me all hoodies"
printful_get_product Get detailed product info "Tell me about product 71"
printful_get_product_variants Get all sizes/colors "What sizes are available?"
printful_get_variant_prices Get pricing by currency "How much in EUR?"
printful_get_product_availability Check stock status "Is this in stock?"

</details>

<details> <summary><b>📦 Order Tools (4)</b> - Create & manage orders</summary>

<br>

Tool Description Example Use
printful_create_order Create draft order "Create order for John"
printful_get_order View order details "Show me order #12345"
printful_confirm_order Start fulfillment "Confirm this order"
printful_list_orders List all orders "Show my recent orders"

</details>

<details> <summary><b>🚚 Shipping Tools (2)</b> - Calculate rates & delivery</summary>

<br>

Tool Description Example Use
printful_calculate_shipping Get shipping rates & times "How much to ship to UK?"
printful_list_countries List supported countries "What countries do you ship to?"

</details>

<details> <summary><b>🖼️ Mockup Tools (2)</b> - Generate product images</summary>

<br>

Tool Description Example Use
printful_create_mockup_task Generate mockup images "Create mockup with my design"
printful_get_mockup_task Check generation status "Is my mockup ready?"

</details>

<details> <summary><b>📁 File Tools (2)</b> - Upload & manage designs</summary>

<br>

Tool Description Example Use
printful_add_file Upload design file "Upload my logo"
printful_get_file Get file info & status "Check file #12345"

</details>

<details> <summary><b>🏪 Store Tools (2)</b> - Manage stores & stats</summary>

<br>

Tool Description Example Use
printful_list_stores List your stores "Show all my stores"
printful_get_store_stats View sales & profit "What are my sales?"

</details>

<details> <summary><b>🔄 Sync Product Tools (2)</b> - Legacy v1 features</summary>

<br>

Tool Description Example Use
printful_list_sync_products List synced products "Show my Etsy products"
printful_get_sync_product Get sync product details "Details on sync #123"

</details>


🎓 Documentation

<table> <tr> <td align="center" width="33%">

📖 Quick Start Guide

Get up and running in 5 minutes

</td> <td align="center" width="33%">

🔑 API Token Setup

Detailed token configuration guide

</td> <td align="center" width="33%">

🧪 Testing Guide

Learn how to test your integration

</td> </tr> <tr> <td align="center" width="33%">

🔐 API Scopes Reference

Required permissions explained

</td> <td align="center" width="33%">

💻 Examples

Real code examples

</td> <td align="center" width="33%">

🔧 Cursor Config

Ready-to-use config file

</td> </tr> </table>


🔄 API Version Strategy

This server uses Printful API v2 (production-ready beta) with smart v1 fallback:

<table> <tr> <td width="50%">

🎯 v2 (Primary)

  • ✅ Catalog & Products
  • ✅ Orders & Fulfillment
  • ✅ Shipping Rates
  • ✅ Mockup Generation
  • ✅ File Management
  • ✅ Store Statistics

</td> <td width="50%">

🔄 v1 (Fallback)

  • ✅ Sync Products
  • ✅ Product Templates
  • ⚠️ Auto-switches when needed
  • 🚀 Future-proof architecture

</td> </tr> </table>

Why v2? Better pagination • Real-time stock • Enhanced orders • Improved security • Standardized formats


⚙️ Rate Limiting & Performance

<table> <tr> <td>

📊 Rate Limits

  • 120 requests / 60 seconds
  • Leaky bucket algorithm
  • Auto-retry on 429 errors

</td> <td>

🚀 Performance

  • Response times: 100-500ms
  • Concurrent requests: Supported
  • Timeout handling: Built-in

</td> </tr> </table>


🐛 Troubleshooting

<details> <summary><b>❌ "PRINTFUL_API_KEY environment variable is required"</b></summary>

<br>

Solution: Make sure your API key is set in .env or passed via environment variables in the MCP config.

# Check your .env file
cat .env

# Should contain:
PRINTFUL_API_KEY=your-actual-key-here

</details>

<details> <summary><b>⏱️ "Rate limit exceeded"</b></summary>

<br>

Solution: Wait for the time specified in the error message (usually 60 seconds).

  • Default limit: 120 requests/minute
  • Consider implementing request batching
  • Check X-Ratelimit-Reset header for exact reset time

</details>

<details> <summary><b>🔍 "Resource not found"</b></summary>

<br>

Solution: Double-check the ID you're using.

  • For orders: You can use external IDs by prefixing with @ (e.g., @my-order-123)
  • For products: Verify the product/variant ID exists in the catalog
  • Check if the resource belongs to your store

</details>

<details> <summary><b>🎨 Mockup generation stuck on "pending"</b></summary>

<br>

Solution: Mockup generation typically takes 10-30 seconds.

  • Wait at least 30 seconds before checking status
  • If stuck longer than 2 minutes, check task status - it may have failed
  • Verify your design URL is publicly accessible

</details>


🧪 Testing

<div align="center">

Choose Your Testing Method

</div>

<table> <tr> <td align="center" width="33%">

Quick Test

Automated test suite

export PRINTFUL_API_KEY=your-key
python test_server.py

✅ Tests 6 core features ⏱️ Takes 30 seconds

</td> <td align="center" width="33%">

🌐 Interactive Test

Web-based MCP Inspector

export PRINTFUL_API_KEY=your-key
./test-with-inspector.sh

🎯 Test any tool visually 🌍 Opens at localhost:5173

</td> <td align="center" width="33%">

🤖 Live Test

In Claude/Cursor

Just ask:

"List Printful countries"

💬 Natural language ✨ Real integration test

</td> </tr> </table>

📖 Full testing guide: See TESTING.md for comprehensive testing instructions.


🏗️ Project Structure

printful-ph-mcp/
├── 📁 src/
│   └── 📁 printful_mcp/
│       ├── 🐍 server.py          # FastMCP server + tool registrations
│       ├── 🔌 client.py          # API client with auth/error handling
│       ├── 📁 tools/             # Tool implementations by domain
│       │   ├── 🛍️ catalog.py    # Product browsing (5 tools)
│       │   ├── 📦 orders.py     # Order management (4 tools)
│       │   ├── 🚚 shipping.py   # Shipping rates (2 tools)
│       │   ├── 🖼️ mockups.py    # Mockup generation (2 tools)
│       │   ├── 📁 files.py      # File management (2 tools)
│       │   ├── 🏪 stores.py     # Store statistics (2 tools)
│       │   └── 🔄 sync.py       # v1 fallback (2 tools)
│       └── 📁 models/
│           └── 📋 inputs.py      # Pydantic input models
├── 📄 pyproject.toml
├── 🔐 .env.example
└── 📖 README.md

🤝 Contributing

We welcome contributions! Here's how you can help:

<table> <tr> <td width="50%">

🐛 Report Bugs

Found an issue? Open a bug report

Request Features

Have an idea? Suggest a feature

</td> <td width="50%">

🔧 Submit PRs

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push and open a Pull Request

</td> </tr> </table>


📚 Resources & Links

<div align="center">

Resource Link
📘 Printful API v2 Docs developers.printful.com/docs/v2-beta
📗 Printful API v1 Docs developers.printful.com/docs
🔌 MCP Protocol Spec modelcontextprotocol.io
🐍 FastMCP Framework github.com/modelcontextprotocol/python-sdk
🎨 Purple Horizons purplehorizons.io
👨‍💻 Made by Gianni giannidalerta.com

</div>


📄 License

<div align="center">

MIT License - Free to use, modify, and distribute

View LicensePurple Horizons LLC • 2026

</div>


💝 Support This Project

<div align="center">

If this project helped you, consider:

Star this repo on GitHub

🐦 Share it on social media

🤝 Contribute to the codebase

🎨 Sign up for Printful using our affiliate link

<br>

<a href="https://www.printful.com/a/purplehorizons"> <img src="https://img.shields.io/badge/Try_Printful-Start_Free-FA4616?style=for-the-badge&logo=printful&logoColor=white" alt="Try Printful"> </a>

<br><br>

Made with ❤️ by Purple Horizons

Empowering businesses through AI automation

</div>


<div align="center">

🚀 Ready to automate your print-on-demand business?

Get Started NowView ExamplesRead Docs

<sub>Questions? Issues? Open an issue or contact us</sub>

</div>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选