Printful MCP Server
<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**](#installation) โข [**๐ง Configuration**](#configuration) โข [**๐ Examples**](#usage-examples) โข [**๐ Documentation**](QUICKSTART.md)
---
[](https://purplehorizons.io)
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/downloads/)
[](https://developers.printful.com/docs/v2-beta/)
[](https://github.com/Purple-Horizons/printful-ph-mcp)
[](https://github.com/Purple-Horizons/printful-ph-mcp/fork)
---
### ๐ **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](.cursor/skills/) 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>
- **Python 3.10+** ([Download](https://www.python.org/downloads/))
- **Printful API Key** ([Get one free](https://www.printful.com/dashboard/api))
</details>
<details>
<summary><b>โก Installation (3 steps)</b></summary>
<br>
**Step 1: Clone & Install**
```bash
git clone https://github.com/Purple-Horizons/printful-ph-mcp.git
cd printful-ph-mcp
pip install -e .
```
**Step 2: Set up API Key**
```bash
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`:
```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`:
```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:**
```bash
# 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:**
```bash
# 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
```python
# 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
```python
# 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
```python
# 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
```python
# 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](QUICKSTART.md) โข [๐ฌ 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](QUICKSTART.md)
Get up and running in 5 minutes
</td>
<td align="center" width="33%">
### ๐ [API Token Setup](API_TOKEN_SETUP.md)
Detailed token configuration guide
</td>
<td align="center" width="33%">
### ๐งช [Testing Guide](TESTING.md)
Learn how to test your integration
</td>
</tr>
<tr>
<td align="center" width="33%">
### ๐ [API Scopes Reference](API_SCOPES_REFERENCE.md)
Required permissions explained
</td>
<td align="center" width="33%">
### ๐ป [Examples](examples.py)
Real code examples
</td>
<td align="center" width="33%">
### ๐ง [Cursor Config](cursor-mcp-config.json)
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.
```bash
# 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
```bash
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
```bash
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](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](https://github.com/Purple-Horizons/printful-ph-mcp/issues/new?labels=bug)
### โจ **Request Features**
Have an idea? [Suggest a feature](https://github.com/Purple-Horizons/printful-ph-mcp/issues/new?labels=enhancement)
</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](https://developers.printful.com/docs/v2-beta/) |
| ๐ **Printful API v1 Docs** | [developers.printful.com/docs](https://developers.printful.com/docs/) |
| ๐ **MCP Protocol Spec** | [modelcontextprotocol.io](https://modelcontextprotocol.io/) |
| ๐ **FastMCP Framework** | [github.com/modelcontextprotocol/python-sdk](https://github.com/modelcontextprotocol/python-sdk) |
| ๐จ **Purple Horizons** | [purplehorizons.io](https://purplehorizons.io) |
| ๐จโ๐ป **Made by Gianni** | [giannidalerta.com](https://giannidalerta.com) |
</div>
---
## ๐ License
<div align="center">
**MIT License** - Free to use, modify, and distribute
[View License](LICENSE) โข [Purple Horizons LLC](https://purplehorizons.io) โข 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](https://purplehorizons.io)**
*Empowering businesses through AI automation*
</div>
---
<div align="center">
### ๐ Ready to automate your print-on-demand business?
[**Get Started Now**](#installation) โข [**View Examples**](#usage-examples) โข [**Read Docs**](QUICKSTART.md)
<sub>Questions? Issues? [Open an issue](https://github.com/Purple-Horizons/printful-ph-mcp/issues) or [contact us](https://purplehorizons.io)</sub>
</div>
TDQS
Scored across 19 tools
Every tool has a clearly distinct purpose targeting specific resources and actions in the Printful ecosystem. Tools like printful_get_product, printful_get_product_variants, and printful_get_product_availability all serve different but complementary purposes without overlap. The descriptions clearly differentiate between file management, order processing, product catalog operations, and administrative functions.
All tools follow a perfect verb_noun pattern with the 'printful_' prefix, using consistent snake_case throughout. The naming convention is highly predictable: action verbs (add, calculate, confirm, create, get, list) followed by specific nouns (file, shipping, order, mockup_task, etc.). This makes it easy for agents to understand what each tool does from its name alone.
With 19 tools, the server provides comprehensive coverage of the Printful API surface. While slightly on the higher side, each tool serves a distinct purpose in the e-commerce/print-on-demand domain. The count is reasonable given the complexity of managing products, orders, files, and mockups in a fulfillment platform. A few tools could potentially be consolidated, but overall the scope is appropriate.
The tool set provides excellent coverage of the Printful domain with clear CRUD operations for orders, files, and products. There's comprehensive support for the order lifecycle (create, confirm, get, list), product catalog exploration, and administrative functions. Minor gaps include the lack of order update/cancellation tools and limited sync product support (noted as v1-only), but agents can accomplish most workflows with the available tools.