loading…
Search for a command to run...
loading…
Enables comprehensive management of Tiendanube and Nuvemshop stores, supporting operations for products, orders, customers, and categories. It provides flexible
Enables comprehensive management of Tiendanube and Nuvemshop stores, supporting operations for products, orders, customers, and categories. It provides flexible integration through SSE, HTTP, and STDIO transport modes with full Docker support.
A complete Model Context Protocol (MCP) server for Tiendanube/Nuvemshop API with Docker support and SSE transport.
mkdir tiendanube-mcp
cd tiendanube-mcp
Create the following files:
tiendanube_server.py (main server code)Dockerfiledocker-compose.ymlrequirements.txt.env (from .env.example)Create .env file:
TIENDANUBE_ACCESS_TOKEN=your_access_token_here
TIENDANUBE_STORE_ID=your_store_id_here
TIENDANUBE_BASE_URL=https://api.tiendanube.com/v1
# Server Configuration
MCP_TRANSPORT=sse
MCP_HOST=0.0.0.0
MCP_PORT=8080
LOG_LEVEL=INFO
# Build the Docker image
docker-compose build
# Start the server
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the server
docker-compose down
URL: http://localhost:8080/sse
Change .env:
MCP_TRANSPORT=streamable-http
URL: http://localhost:8080/mcp
curl http://localhost:8080/health
list_products - List/search products with filtersget_product - Get product by IDget_product_by_sku - Get product by SKUcreate_product - Create new product with variantsupdate_product - Update product informationdelete_product - Delete productupdate_product_stock_price - Bulk update stock/priceslist_orders - List orders with filtersget_order - Get order detailsget_order_history_values - Get value change historyget_order_history_editions - Get edition changelogcreate_order - Create new orderupdate_order - Update orderclose_order - Close orderopen_order - Reopen ordercancel_order - Cancel orderlist_customers - List/search customersget_customer - Get customer detailscreate_customer - Create new customerupdate_customer - Update customerdelete_customer - Delete customerlist_categories - List all categoriesget_category - Get category detailscreate_category - Create categoryupdate_category - Update categorydelete_category - Delete categorylist_coupons - List all couponsget_coupon - Get coupon detailscreate_coupon - Create discount couponget_store - Get store informationimport requests
import json
# SSE endpoint
url = "http://localhost:8080/sse"
# List products
payload = {
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "list_products",
"arguments": {
"query": "shirt",
"per_page": 10
}
},
"id": 1
}
response = requests.post(url, json=payload)
print(response.json())
# List products
curl -X POST http://localhost:8080/sse \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "list_products",
"arguments": {
"published": true,
"per_page": 20
}
},
"id": 1
}'
# Get low stock products
curl -X POST http://localhost:8080/sse \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "list_products",
"arguments": {
"max_stock": 10,
"published": true
}
},
"id": 1
}'
# Create order
curl -X POST http://localhost:8080/sse \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "create_order",
"arguments": {
"products": [{"variant_id": 123456, "quantity": 2}],
"customer": {
"name": "John Doe",
"email": "[email protected]"
},
"payment_status": "paid"
}
},
"id": 1
}'
# Build
docker-compose build
# Start
docker-compose up -d
# Logs
docker-compose logs -f tiendanube-mcp
# Restart
docker-compose restart
# Stop
docker-compose down
# Remove everything
docker-compose down -v --rmi all
# Shell access
docker exec -it tiendanube-mcp-server bash
.env file - Add to .gitignore# Pull latest changes
git pull
# Rebuild
docker-compose down
docker-compose build --no-cache
docker-compose up -d
Logs are configured with rotation:
docker-compose logs)View logs:
# All logs
docker-compose logs -f
# Last 100 lines
docker-compose logs --tail=100
# Specific service
docker-compose logs -f tiendanube-mcp
# Check logs
docker-compose logs tiendanube-mcp
# Verify environment variables
docker-compose config
# Test API credentials
curl -H "Authentication: bearer YOUR_TOKEN" \
https://api.tiendanube.com/v1/YOUR_STORE_ID/store
netstat -tuln | grep 8080docker ps# Fix permissions
chmod +x start.sh
server {
listen 443 ssl http2;
server_name mcp.yourdomain.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location /sse {
proxy_pass http://localhost:8080/sse;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
# SSE specific
proxy_buffering off;
proxy_read_timeout 86400;
}
}
docker stack deploy -c docker-compose.yml tiendanube
TIENDANUBE_ACCESS_TOKEN=prod_token
TIENDANUBE_STORE_ID=prod_store_id
MCP_TRANSPORT=sse
MCP_HOST=0.0.0.0
MCP_PORT=8080
LOG_LEVEL=WARNING
MIT License - See LICENSE file for details
Contributions are welcome! Please open an issue or submit a pull request.
For issues related to:
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"tiendanube-mcp-server": {
"command": "npx",
"args": []
}
}
}