UnoPim MCP Server
Enables Claude to manage the UnoPim Product Information Management system through natural language, supporting product creation, attribute management, and media uploads. It features full API integration, including support for configurable products and automatic OAuth2 token management.
README
UnoPim MCP Server 🚀
A powerful Model Context Protocol (MCP) server that enables Claude Desktop to manage your UnoPim Product Information Management system. Create products, manage attributes, upload media, and handle complex configurable products - all through natural language conversations with Claude.
✨ Features
- 🔌 Full UnoPim API Integration - Create and manage attributes, families, categories, and products
- 👕 Configurable Products - Full support for products with variants (e.g., T-shirts with color/size options)
- 📸 Media Upload - Upload product images and category media via URL or base64
- 🧠 Smart Product Creation - Automatically validates against family schema before creating
- 🌐 HTTP/SSE Transport - Expose via ngrok for Claude Desktop remote access
- 🔄 Automatic Token Refresh - OAuth2 with automatic token management
🚀 Quick Start
1. Install dependencies
npm install
npm run build
2. Configure environment
export UNOPIM_BASE_URL="http://your-unopim:8000"
export UNOPIM_CLIENT_ID="your_client_id"
export UNOPIM_CLIENT_SECRET="your_client_secret"
export UNOPIM_USERNAME="api-user@email.com"
export UNOPIM_PASSWORD="password"
3. Start the server
# HTTP mode (recommended for Claude Desktop)
node dist/index-http.js
4. Expose via ngrok (for remote access)
ngrok http 3000
📋 Claude Desktop Configuration
Remote (HTTP/SSE) mode via ngrok ⭐ Recommended
{
"mcpServers": {
"unopim": {
"url": "https://your-ngrok-url.ngrok-free.app/sse"
}
}
}
Local (stdio) mode
{
"mcpServers": {
"unopim": {
"command": "node",
"args": ["/path/to/unopim-mcp/dist/index.js"],
"env": {
"UNOPIM_BASE_URL": "https://your-unopim.com",
"UNOPIM_CLIENT_ID": "your_client_id",
"UNOPIM_CLIENT_SECRET": "your_client_secret",
"UNOPIM_USERNAME": "api-user",
"UNOPIM_PASSWORD": "password"
}
}
}
}
🛠️ Available Tools (24 tools)
Schema & Discovery
| Tool | Description |
|---|---|
unopim_get_schema |
Fetch complete data model |
unopim_get_attributes |
List all attributes with types |
unopim_get_families |
List all product families |
unopim_get_family_schema |
Get detailed schema for a specific family |
Attribute Management
| Tool | Description |
|---|---|
unopim_create_attribute |
Create attribute (text, select, boolean, price, etc.) |
unopim_create_attribute_options |
Create options for select attributes |
unopim_get_attribute_options |
Get options for a select attribute |
unopim_get_attribute_groups |
List attribute groups |
unopim_create_attribute_group |
Create attribute group |
Family Management
| Tool | Description |
|---|---|
unopim_create_family |
Create product family |
unopim_update_family |
Update family |
Category Management
| Tool | Description |
|---|---|
unopim_get_categories |
Fetch category tree |
unopim_create_category |
Create category |
Product Management
| Tool | Description |
|---|---|
unopim_get_products |
List products with filtering |
unopim_get_product |
Get single product by SKU |
unopim_create_product |
Create simple product |
unopim_update_product |
Update product |
unopim_upsert_product |
Create or update product |
unopim_smart_create_product |
⭐ Auto-validates against family schema |
unopim_bulk_create_products |
Batch create products |
Configurable Products
| Tool | Description |
|---|---|
unopim_create_configurable_product |
Create parent product with variants |
unopim_add_variant |
Add variant to configurable product |
unopim_update_configurable_product |
Update configurable product |
Media Upload ⭐ Automatic Linking
| Tool | Description |
|---|---|
unopim_upload_product_media |
⭐ Upload image and auto-link to product |
unopim_upload_category_media |
Upload image and auto-link to category |
Note: Media upload tools now automatically update the product/category with the uploaded file path. Images are immediately visible in UnoPim UI after upload!
👕 Configurable Products Workflow
Creating a configurable product (e.g., T-shirt with color variants):
Step 1: Create the configurable product (parent)
{
"sku": "tshirt-config-001",
"family": "default",
"super_attributes": ["color"],
"values": {
"common": { "sku": "tshirt-config-001" },
"channel_locale_specific": {
"default": {
"en_US": { "name": "T-Shirt Configurable" }
}
},
"categories": [],
"associations": { "up_sells": [], "cross_sells": [], "related_products": [] }
}
}
Step 2: Add variants (one at a time)
{
"parent": "tshirt-config-001",
"family": "default",
"sku": "tshirt-red-001",
"values": {
"common": { "sku": "tshirt-red-001", "color": "Red" },
"channel_locale_specific": {
"default": {
"en_US": { "name": "T-Shirt Red" }
}
},
"categories": []
},
"variant_attributes": { "color": "Red" }
}
Step 3: Add product image
{
"sku": "tshirt-red-001",
"attribute": "image",
"file_url": "https://example.com/tshirt-red.jpg"
}
📸 Media Upload
Upload product images via URL or base64 - images are automatically linked to the product:
// Via URL
{
"sku": "PROD001",
"attribute": "image",
"file_url": "https://example.com/product.jpg"
}
// Via Base64
{
"sku": "PROD001",
"attribute": "image",
"file_base64": "iVBORw0KGgo...",
"filename": "product-image.jpg"
}
What happens automatically:
- ✅ File uploads to UnoPim storage
- ✅ Attribute metadata fetched to determine scope (common/locale_specific/channel_specific/channel_locale_specific)
- ✅ Product updated with file path in correct value structure
- ✅ Image immediately visible in UnoPim UI
No manual product update needed - the tool handles everything!
⚠️ Important API Notes
Attribute Value Structure
UnoPim attributes have different scoping based on value_per_locale and value_per_channel:
| Scope | When | Structure |
|---|---|---|
common |
Both = 0 | values.common.attr |
locale_specific |
locale=1, channel=0 | values.locale_specific.en_US.attr |
channel_specific |
locale=0, channel=1 | values.channel_specific.default.attr |
channel_locale_specific |
Both = 1 | values.channel_locale_specific.default.en_US.attr |
Example: The name attribute typically requires channel_locale_specific:
{
"values": {
"common": { "sku": "PROD001" },
"channel_locale_specific": {
"default": {
"en_US": { "name": "Product Name" }
}
}
}
}
🐛 Known API Quirks
| Issue | Workaround |
|---|---|
| Configurable endpoint typo | API uses /configrable-products (missing 'u') - MCP server handles this |
| Attribute options array | Returns flat array [...] not { data: [...] } |
| Variants not auto-created | Must add variants separately with unopim_add_variant |
| Case-sensitive options | Option codes like "Red" must match exactly |
🔧 Development
# Build
npm run build
# Watch mode
npm run watch
# Type check
npm run typecheck
# Test with MCP Inspector
npx @modelcontextprotocol/inspector dist/index.js
📊 Environment Variables
Required
| Variable | Description |
|---|---|
UNOPIM_BASE_URL |
UnoPim API URL (e.g., http://localhost:8000) |
UNOPIM_CLIENT_ID |
OAuth2 Client ID |
UNOPIM_CLIENT_SECRET |
OAuth2 Client Secret |
UNOPIM_USERNAME |
API username |
UNOPIM_PASSWORD |
API password |
Optional
| Variable | Default | Description |
|---|---|---|
UNOPIM_DEFAULT_LOCALE |
en_US |
Default locale |
UNOPIM_DEFAULT_CHANNEL |
default |
Default channel |
UNOPIM_DEFAULT_CURRENCY |
USD |
Default currency |
PORT |
3000 |
HTTP server port |
🏗️ Architecture
┌─────────────────┐ ┌──────────────┐ ┌─────────────┐
│ Claude Desktop │────▶│ ngrok │────▶│ MCP Server │
│ │ SSE │ │ │ (Node.js) │
└─────────────────┘ └──────────────┘ └──────┬──────┘
│
│ OAuth2
│ REST API
▼
┌─────────────┐
│ UnoPim │
│ PIM │
└─────────────┘
📁 Project Structure
src/
├── index-http.ts # HTTP server with SSE (for ngrok)
├── index.ts # stdio server (for local)
├── config.ts # Configuration loader
├── auth/
│ └── oauth.ts # OAuth2 token management
├── client/
│ └── unopim-client.ts # HTTP client with retry logic
├── tools/
│ ├── attributes.ts # Attribute CRUD
│ ├── categories.ts # Category management
│ ├── families.ts # Family management
│ ├── groups.ts # Attribute groups
│ ├── products.ts # Product CRUD + media upload
│ └── schema.ts # Schema discovery
└── types/
├── errors.ts # Error handling
├── oauth.ts # OAuth types
└── unopim.ts # API types
🎉 Example Conversation with Claude
You: Create a T-shirt product family with name, description, price and color attributes
Claude: I'll create the family with those attributes... (Uses
unopim_create_family,unopim_create_attribute, etc.)
You: Now create a configurable T-shirt with red, blue and green variants at $29.99
Claude: I'll create the configurable product and add the color variants... (Uses
unopim_create_configurable_product,unopim_add_variant)
You: Upload this image for the red variant: https://example.com/red-shirt.jpg
Claude: Uploading the image to the red variant... (Uses
unopim_upload_product_media)
📄 License
ISC
🙏 Credits
Built with:
Made with ❤️ for seamless PIM management through AI
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。