The Printify MCP Server integrates AI assistants with Printify's print-on-demand platform, offering comprehensive product management and image generation capabilities:
Shop Management: List shops, switch between them, and check Printify connection status
Product Management: Create, update, delete, publish, list, and retrieve product details
Catalog Tools: Browse blueprints, print providers, and variants for product creation
Image Management: Upload images from URLs, local files, or base64 data
AI Image Generation: Create designs using Replicate's Flux models with customizable parameters (aspect ratio, resolution, format)
Streamlined Workflows: Generate images and upload directly to Printify in a single process
Content Generation: Create product descriptions using built-in prompt tools
Documentation Access: Step-by-step guides for product creation and management
Settings Management: Set and retrieve default values for frequently used options
Enables browsing and selection of product blueprints from the Printify catalog for creating print-on-demand items.
Provides containerized deployment options with pre-built Docker images that can be pulled from Docker Hub, along with Docker Compose configurations for easier setup.
Supports configuration through .env files to manage API keys and settings for Printify, Replicate, and other services.
Built on Node.js and can be installed and run as a Node.js package globally or via npx.
Integrates with Replicate's API to generate images using the Flux 1.1 Pro and Ultra models for product designs that can be directly uploaded to Printify.
Uses Sharp for image processing to ensure compatibility with Printify's requirements before uploading.
Printify MCP Server
A Model Context Protocol (MCP) server for integrating AI assistants with Printify's print-on-demand platform.
Table of Contents
Overview
The Printify MCP Server is a bridge between AI assistants (like Claude) and Printify's print-on-demand platform. It allows AI assistants to create and manage print-on-demand products, generate designs using AI, and handle all aspects of product management through the Model Context Protocol (MCP).
MCP is an open standard developed by Anthropic that standardizes how applications provide context to Large Language Models (LLMs). This server implements the MCP specification to expose Printify's functionality to AI assistants in a structured way.
Features
This MCP server provides the following capabilities:
Printify API Integration
Authentication: Initialize the Printify API client with your API key
Shops: List and manage Printify shops
Products: Create, read, update, delete, and publish products
Catalog: Browse blueprints, print providers, and variants
Images: Upload images to use in product designs
AI Image Generation
Replicate Integration: Generate images using Replicate's Flux 1.1 Pro model
Combined Workflow: Generate images with AI and upload them directly to Printify in one step
Documentation
In-Tool Documentation: Comprehensive documentation for all aspects of product creation
Workflow Guidance: Step-by-step guides for creating products
Prompts
Generate Product Description: Generate compelling product descriptions based on product details
Prerequisites
Node.js (v18 or higher)
npm (v7 or higher)
Printify API key
Replicate API token (for AI image generation)
ImgBB API key (required if using the Flux 1.1 Pro Ultra model)
Installation
Configuration
You have two options for configuring the environment variables needed by the server:
Option 1: Using a .env File (Recommended)
Create a
.env
file in the root directory of the project with the following variables:
You can use the .env.example
file as a template by copying it:
Option 2: Using System Environment Variables
Alternatively, you can set these variables directly in your system environment:
Windows (Command Prompt):
Windows (PowerShell):
macOS/Linux:
The server will check for these environment variables at startup, regardless of whether they're set in a .env
file or in the system environment.
Getting a Printify API Key
Log in to your Printify account
Go to Settings > API
Click "Create New API Key"
Copy the API key and add it to your
.env
file
Getting a Replicate API Token
Create an account on Replicate
Go to your account settings
Generate an API token
Copy the token and add it to your
.env
file
Usage
Starting the Server
This will start the MCP server using the stdio transport, which allows it to communicate with MCP clients like Claude Desktop. The server will automatically initialize the Printify API client using the API key from the environment variable.
Development Mode
This will start the server in development mode with automatic reloading when files change.
Using with Claude Desktop
There are three ways to use this MCP server with Claude Desktop:
Option 1: Install from npm (Recommended)
Install the package globally:
npm install -g @tsavo/printify-mcpConfigure your environment variables using either a
.env
file in your current directory or system environment variables as described in the Configuration section.Configure Claude Desktop:
Open Claude Desktop
Go to Settings > MCP Servers
Click "Add Server"
Enter a name for the server (e.g., "Printify MCP")
Select "Command" as the transport type
Enter
printify-mcp
as the commandNo arguments are needed
Click "Add Server"
Test the connection by asking Claude to check the Printify status:
Can you check the status of my Printify connection?The
printify-mcp
command runs the same code as the original index.ts file, but packaged as an executable that can be run directly from the command line.
Option 2: Use with npx
If you don't want to install the package globally, you can use npx:
Configure your environment variables as described in the Configuration section.
Configure Claude Desktop:
Open Claude Desktop
Go to Settings > MCP Servers
Click "Add Server"
Enter a name for the server (e.g., "Printify MCP")
Select "Command" as the transport type
Enter
npx
as the commandEnter
@tsavo/printify-mcp
as the argumentsClick "Add Server"
Option 3: Use Docker (Recommended for Isolation)
If you prefer to run the server in a Docker container, you have two options:
Option 3A: Use the Docker Image Directly from Docker Hub
Make sure you have Docker installed on your system
Create a directory for your Printify MCP files:
mkdir printify-mcp cd printify-mcpCreate a
.env
file with your API keys:PRINTIFY_API_KEY=your_printify_api_key PRINTIFY_SHOP_ID=your_shop_id (optional) REPLICATE_API_TOKEN=your_replicate_api_token IMGBB_API_KEY=your_imgbb_api_key (required for Flux 1.1 Pro Ultra model)Create a temp directory for temporary files:
mkdir tempRun the Docker container (two options):
Option A: Using environment variables directly (Recommended)
# For Linux/macOS/Windows PowerShell: docker run -it --name printify-mcp \ -e PRINTIFY_API_KEY=your_printify_api_key \ -e PRINTIFY_SHOP_ID=your_shop_id_optional \ -v $(pwd)/temp:/app/temp \ tsavo/printify-mcp:latest # For Windows Command Prompt: docker run -it --name printify-mcp ^ -e PRINTIFY_API_KEY=your_printify_api_key ^ -e PRINTIFY_SHOP_ID=your_shop_id_optional ^ -v %cd%/temp:/app/temp ^ tsavo/printify-mcp:latestNote: If you want to use the image generation features (generate-and-upload-image tool), add the Replicate API token:
-e REPLICATE_API_TOKEN=your_replicate_api_token \Important: If you want to use the Flux 1.1 Pro Ultra model for image generation, you MUST also add the ImgBB API key:
-e IMGBB_API_KEY=your_imgbb_api_key \Option B: Using a .env file
# For Linux/macOS: docker run -it --name printify-mcp \ -v $(pwd)/.env:/app/.env:ro \ -v $(pwd)/temp:/app/temp \ tsavo/printify-mcp:latest # For Windows PowerShell: docker run -it --name printify-mcp -v ${PWD}/.env:/app/.env:ro -v ${PWD}/temp:/app/temp tsavo/printify-mcp:latest # For Windows Command Prompt: docker run -it --name printify-mcp -v %cd%/.env:/app/.env:ro -v %cd%/temp:/app/temp tsavo/printify-mcp:latestConfigure Claude Desktop:
Open Claude Desktop
Go to Settings > MCP Servers
Click "Add Server"
Enter a name for the server (e.g., "Printify MCP Docker")
Select "Command" as the transport type
Enter
docker
as the commandEnter
exec -i printify-mcp node dist/index.js
as the argumentsClick "Add Server"
Option 3B: Build and Run with Docker Compose
Make sure you have Docker and Docker Compose installed on your system
Clone this repository to your local machine:
git clone https://github.com/tsavo/printify-mcp.git cd printify-mcpConfigure environment variables (two options):
Option A: Edit docker-compose.yml directly (Recommended) Open docker-compose.yml and uncomment/edit the environment variables:
environment: - NODE_ENV=production # Option 1: Set environment variables directly (recommended) - PRINTIFY_API_KEY=your_printify_api_key - PRINTIFY_SHOP_ID=your_shop_id_optional # Optional: Only needed if you want to use image generation features - REPLICATE_API_TOKEN=your_replicate_api_token # Required if using the Flux 1.1 Pro Ultra model for image generation - IMGBB_API_KEY=your_imgbb_api_keyOption B: Create a
PRINTIFY_API_KEY=your_printify_api_key PRINTIFY_SHOP_ID=your_shop_id (optional) # Optional: Only needed if you want to use image generation features REPLICATE_API_TOKEN=your_replicate_api_token # Required if using the Flux 1.1 Pro Ultra model for image generation IMGBB_API_KEY=your_imgbb_api_keyThen uncomment the .env volume mount in docker-compose.yml:
volumes: # Option 2: Mount a .env file for environment variables - ./.env:/app/.env:roBuild and start the Docker container:
docker-compose up -dConfigure Claude Desktop:
Open Claude Desktop
Go to Settings > MCP Servers
Click "Add Server"
Enter a name for the server (e.g., "Printify MCP Docker")
Select "Command" as the transport type
Enter
docker
as the commandEnter
exec -i printify-mcp node dist/index.js
as the argumentsClick "Add Server"
Test the connection by asking Claude to check the Printify status:
Can you check the status of my Printify connection?
Option 4: Clone and Set Up the Repository
If you prefer to work with the source code directly without Docker:
Clone this repository to your local machine:
git clone https://github.com/tsavo/printify-mcp.git cd printify-mcpInstall dependencies and build the project:
npm install npm run buildConfigure your environment variables using either a
.env
file or system environment variables as described in the Configuration section.Get the full absolute path to the compiled JavaScript file:
Windows:
cd dist echo %CD%\index.jsmacOS/Linux:
realpath dist/index.jsConfigure Claude Desktop:
Open Claude Desktop
Go to Settings > MCP Servers
Click "Add Server"
Enter a name for the server (e.g., "Printify MCP")
Select "Command" as the transport type
Enter the path to Node.js as the command (e.g.,
node
)Enter the full absolute path to the built server as the arguments
Click "Add Server"
Start the server:
npm startKeep this terminal window open while you're using Claude Desktop.
Testing the Connection
In a conversation with Claude, you can test if the server is working by asking Claude to check the Printify status:
Claude should use the get-printify-status
tool to check the connection status. You can also ask Claude to list your Printify shops using the list-shops
tool.
If you encounter any issues:
Check the console output where you started the server for error messages
Verify that your environment variables are set correctly
Make sure the server is still running
Confirm that the path to the server in Claude Desktop is correct
Available Tools
Shop Management
get-printify-status
Get the current status of the Printify API client, including connection status and current shop.
list-shops
List all available shops in your Printify account. The currently selected shop is marked with an arrow (→).
switch-shop
Switch to a different shop for subsequent API calls.
Parameters:
shopId
(string): The ID of the shop to switch to
Product Tools
list-products
List products in your Printify shop.
Parameters:
page
(number, optional): Page number (default: 1)limit
(number, optional): Number of products per page (default: 10)
get-product
Get details of a specific product.
Parameters:
productId
(string): Product ID
create-product
Create a new product in your Printify shop.
Parameters:
title
(string): Product titledescription
(string): Product descriptionblueprintId
(number): Blueprint IDprintProviderId
(number): Print provider IDvariants
(array): Product variantsprintAreas
(object, optional): Print areas for the product
update-product
Update an existing product in your Printify shop.
Parameters:
productId
(string): Product IDtitle
(string, optional): Product titledescription
(string, optional): Product descriptionvariants
(array, optional): Product variantsprintAreas
(object, optional): Print areas for the product
delete-product
Delete a product from your Printify shop.
Parameters:
productId
(string): Product ID
publish-product
Publish a product to your connected sales channel.
Parameters:
productId
(string): Product IDpublishDetails
(object, optional): Publish details
Catalog Tools
get-blueprints
Get a list of available blueprints from the Printify catalog.
Parameters:
page
(number, optional): Page number (default: 1)limit
(number, optional): Number of blueprints per page (default: 10)
get-blueprint
Get details of a specific blueprint.
Parameters:
blueprintId
(string): Blueprint ID
get-print-providers
Get a list of print providers for a specific blueprint.
Parameters:
blueprintId
(string): Blueprint ID
get-variants
Get a list of variants for a specific blueprint and print provider.
Parameters:
blueprintId
(string): Blueprint IDprintProviderId
(string): Print provider ID
Image Tools
generate-and-upload-image
Generate an image using Replicate's Flux models, process it with Sharp, and upload it to Printify in one operation. This tool combines AI image generation with Printify integration for a seamless workflow.
The tool performs four steps:
Generates an image using Replicate's Flux models based on your text prompt
Processes the image with Sharp to ensure it's a valid image with the correct format for Printify
Uploads the processed image to your Printify account
Cleans up temporary files to avoid disk space issues
Parameters:
prompt
(string): Text prompt for image generationfileName
(string): File name for the uploaded imagemodel
(string, optional): Override the default model (e.g., "black-forest-labs/flux-1.1-pro-ultra")width
(number, optional): Image width in pixels (default: 1024)height
(number, optional): Image height in pixels (default: 1024)aspectRatio
(string, optional): Aspect ratio (e.g., '16:9', '4:3', '1:1'). If provided, overrides width and heightoutputFormat
(string, optional): Output format ("jpeg", "png", "webp") (default: "png")numInferenceSteps
(number, optional): Number of inference steps (default: 25)guidanceScale
(number, optional): Guidance scale (default: 7.5)negativePrompt
(string, optional): Negative prompt (default: "low quality, bad quality, sketches")seed
(number, optional): Random seed for reproducible generationraw
(boolean, optional): Generate less processed, more natural-looking images (default: true for Flux 1.1 Pro Ultra)
Note: This tool requires the REPLICATE_API_TOKEN
environment variable to be set with a valid Replicate API token. You can get a token from replicate.com.
Important: If you want to use the Flux 1.1 Pro Ultra model, you MUST also set the IMGBB_API_KEY
environment variable. The Ultra model generates high-resolution images that are too large for direct base64 upload to Printify. You can get a free API key from api.imgbb.com.
generate-image
Generate an image using Replicate's Flux models and save it to a local file without uploading to Printify. This tool is useful when you want to generate images for other purposes or when you want to review and potentially edit images before uploading them to Printify.
Parameters:
prompt
(string): Text prompt for image generationoutputPath
(string): Full path where the generated image should be savedmodel
(string, optional): Override the default model (e.g., "black-forest-labs/flux-1.1-pro-ultra")width
(number, optional): Image width in pixels (default: 1024)height
(number, optional): Image height in pixels (default: 1024)aspectRatio
(string, optional): Aspect ratio (e.g., '16:9', '4:3', '1:1'). If provided, overrides width and heightoutputFormat
(string, optional): Output format ("jpeg", "png", "webp") (default: "png")numInferenceSteps
(number, optional): Number of inference steps (default: 25)guidanceScale
(number, optional): Guidance scale (default: 7.5)negativePrompt
(string, optional): Negative prompt (default: "low quality, bad quality, sketches")seed
(number, optional): Random seed for reproducible generationraw
(boolean, optional): Generate less processed, more natural-looking images (Flux 1.1 Pro Ultra only)
Note: This tool requires the REPLICATE_API_TOKEN
environment variable to be set with a valid Replicate API token. You can get a token from replicate.com.
Unlike the generate-and-upload-image
tool, this tool doesn't require the ImgBB API key since it saves directly to a local file.
upload-image
Upload an image to your Printify account. Supports three types of inputs:
URLs (http:// or https://) - Direct upload to Printify
Local file paths (e.g., c:\path\to\image.png) - Automatically converted using Sharp to ensure compatibility, then uploaded to Printify
Base64 encoded image strings - Direct upload to Printify
Note on file formats:
Supported formats: PNG, JPEG, and SVG
Recommended resolution for JPEG/PNG files is 300 DPI
For larger products (leggings, blankets, tapestries), 120-150 DPI is acceptable
Some image files may not be compatible with Printify's API if they exceed size limits
For files larger than 5MB, URL upload is recommended over base64 encoding
Parameters:
fileName
(string): File nameurl
(string): URL of the image to upload, path to local file, or base64 encoded image data
Prompts
generate-product-description
Generate a compelling product description.
Parameters:
productName
(string): Name of the productcategory
(string): Product categorytargetAudience
(string, optional): Target audience for the productkeyFeatures
(string, optional): Comma-separated list of key product features
Setting Up API Keys
Printify API Key
To use the Printify features of this MCP server, you'll need a Printify API key. Here's how to get one and set it up:
Log in to your Printify account at printify.com
Go to My Profile > Connections
In the Connections section, you can generate your Personal Access Tokens
Store your API key securely, as it will only be visible immediately after generation
Create a
.env
file in the project root with the following content:PRINTIFY_API_KEY=your_api_key_here # Optional: Set a default shop ID # PRINTIFY_SHOP_ID=your_shop_id_here # For image generation with Replicate REPLICATE_API_TOKEN=your_replicate_token_here # Required if using the Flux 1.1 Pro Ultra model for image generation IMGBB_API_KEY=your_imgbb_api_key_hereThe server will automatically initialize the Printify API client using the API key from the environment variable. If you don't specify a shop ID, the server will use the first shop in your account as the default.
You can also set the environment variables directly:
# On Windows set PRINTIFY_API_KEY=your_api_key_here set REPLICATE_API_TOKEN=your_replicate_token_here set IMGBB_API_KEY=your_imgbb_api_key_here npm start # On macOS/Linux export PRINTIFY_API_KEY=your_api_key_here export REPLICATE_API_TOKEN=your_replicate_token_here export IMGBB_API_KEY=your_imgbb_api_key_here npm start
Replicate API Token
To use the image generation features of this MCP server, you'll need a Replicate API token. Here's how to get one:
Create an account or log in at replicate.com
Go to your account settings
Generate an API token
Add the token to your
.env
file as shown above
ImgBB API Key
If you want to use the Flux 1.1 Pro Ultra model for image generation, you MUST have an ImgBB API key. The Ultra model generates high-resolution images that are too large for direct base64 upload to Printify, so we use ImgBB as an intermediary. Here's how to get an API key:
Create an account or log in at imgbb.com
Go to api.imgbb.com to get your API key
Add the key to your
.env
file as shown above
Workflow Examples
Creating a T-Shirt with AI-Generated Design
Here's a complete example of creating a t-shirt with front and back designs:
Managing Existing Products
Architecture
Main Components
The Printify MCP server consists of three main components:
MCP Server (: Sets up the MCP server with various tools for interacting with Printify's API.
Printify API Client (: Handles communication with Printify's API using the official SDK.
Replicate Client (: Integrates with Replicate's API to generate images for product designs.
Docker Architecture
The Docker setup consists of the following components:
Dockerfile: Defines how to build the Docker image
Uses Node.js 22 Alpine as the base image for a small footprint
Installs dependencies and builds the TypeScript code
Sets up the environment and runs the server
docker-compose.yml: Defines the service configuration
Sets up environment variables
Mounts volumes for .env file and temp directory
Configures stdin and tty for stdio transport
Sets restart policy
Volumes:
.env
: Mounted as a read-only volume for environment variablestemp
: Mounted as a volume for temporary files (like generated images)
Publishing the Docker Image
You can publish the Docker image to Docker Hub or any other container registry to make it available to others without requiring them to install Node.js or clone the repository.
Build the Docker image:
docker build -t tsavo/printify-mcp:latest .Log in to Docker Hub:
docker loginPush the image to Docker Hub:
docker push tsavo/printify-mcp:latest
Using the Docker Image Without Node.js
Users can run the Printify MCP server without installing Node.js by using the Docker image directly:
Install Docker: Users need to have Docker installed on their system
Create a temp directory for temporary files:
mkdir -p tempRun the Docker container (two options):
Option A: Using environment variables directly (Recommended)
docker run -it --name printify-mcp \ -e PRINTIFY_API_KEY=their_printify_api_key \ -e PRINTIFY_SHOP_ID=their_shop_id_optional \ -v $(pwd)/temp:/app/temp \ tsavo/printify-mcp:latestNote: If they want to use the image generation features (generate-and-upload-image tool), add the Replicate API token:
-e REPLICATE_API_TOKEN=their_replicate_api_token \Important: If they want to use the Flux 1.1 Pro Ultra model for image generation, they MUST also add the ImgBB API key:
-e IMGBB_API_KEY=their_imgbb_api_key \Option B: Using a .env file First, create a .env file with their API keys:
PRINTIFY_API_KEY=their_printify_api_key PRINTIFY_SHOP_ID=their_shop_id (optional) # Optional: Only needed if they want to use image generation features REPLICATE_API_TOKEN=their_replicate_api_token # Required if using the Flux 1.1 Pro Ultra model for image generation IMGBB_API_KEY=their_imgbb_api_keyThen run the container:
docker run -it --name printify-mcp \ -v $(pwd)/.env:/app/.env:ro \ -v $(pwd)/temp:/app/temp \ tsavo/printify-mcp:latestConfigure Claude Desktop:
Open Claude Desktop
Go to Settings > MCP Servers
Click "Add Server"
Enter a name for the server (e.g., "Printify MCP Docker")
Select "Command" as the transport type
Enter
docker
as the commandEnter
exec -i printify-mcp node dist/index.js
as the argumentsClick "Add Server"
This approach allows users to run the Printify MCP server without installing Node.js or any other dependencies - they only need Docker.
File Structure
API Documentation
For detailed documentation of the codebase, see the following files:
Troubleshooting
Common Issues
Printify API Client Not Initialized
If you see the error "Printify API client is not initialized", check that:
The
PRINTIFY_API_KEY
environment variable is set correctly in your.env
fileThe API key is valid and has the correct permissions
Replicate API Client Not Initialized
If you see the error "Replicate API client is not initialized", check that:
The
REPLICATE_API_TOKEN
environment variable is set correctly in your.env
fileThe API token is valid and has the correct permissions
Error Creating Product
If you encounter errors when creating a product, check that:
The blueprint ID and print provider ID are valid
The variant IDs are valid for the selected blueprint and print provider
The image IDs in print areas are valid and accessible
All required fields are included in the request
Error Uploading Image
If you encounter errors when uploading an image, check that:
The image is a valid format (PNG, JPEG, etc.)
The image is not too large (maximum size is 10MB)
If using a URL, it is publicly accessible
If using a local file, it exists and is readable
Docker-Specific Issues
If you're using the Docker setup and encounter issues:
Container not starting: Check Docker logs with
docker logs printify-mcp
Environment variables not working: If using a .env file, make sure it's in the same directory as your docker-compose.yml file or the directory where you run the
docker run
command. If setting environment variables directly with-e
, check for typos in variable namesPermission issues with temp directory: The temp directory is mounted as a volume, ensure it has the correct permissions
Connection issues from Claude: Make sure the Docker container is running with
docker ps
and that you've configured Claude Desktop correctlyImage not found: If using the Docker Hub image directly, make sure you've pulled it with
docker pull tsavo/printify-mcp:latest
To restart the Docker container when using docker-compose:
To restart the Docker container when using docker run:
For Windows users using PowerShell with the Docker image directly:
For Windows users using Command Prompt with the Docker image directly:
Debugging
The server includes detailed logging to help troubleshoot issues. Check the console output for error messages and debugging information.
For Docker deployments, you can view logs with:
To follow the logs in real-time:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
ISC
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
A Model Context Protocol server that allows AI assistants like Claude to integrate with Printify's print-on-demand platform, enabling product creation, management, and AI-generated design uploads through natural language commands.
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.Last updated -5
- -securityAlicense-qualityA Model Context Protocol server that connects Claude and other MCP clients to Aider, enabling AI assistants to efficiently edit files, create new files, and interact with git repositories through natural language.Last updated -34The Unlicense
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants like Claude to interact directly with Home Assistant, allowing them to query device states, control smart home entities, and perform automation tasks.Last updated -12191MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants like Claude to interact with Outline document services, supporting document searching, reading, creation, editing, and comment management.Last updated -2538MIT License