Deployment Guide
MCP Server supports two deployment modes: Hosted HTTP mode and Local stdio mode.
Architecture Overview
Architecture for Hosted HTTP mode:
User AI Client (Cherry Studio / Claude / Cursor)
↓ HTTPS: mcp.priceminder.online?key=xxx
↓
Nginx (443 → Reverse Proxy)
↓
MCP Server (127.0.0.1:8020)
↓ Authenticate and obtain sentinel_token
↓
Backend API (priceminder.online/shopee)Method 1: Docker Deployment (Recommended)
bash
# 1. Build image
cd sentinel-mcp-server
docker build -t sentinel-mcp .
# 2. Run container
docker run -d \
--name sentinel-mcp \
--restart always \
-p 127.0.0.1:8020:8020 \
-e SENTINEL_API_BASE=https://priceminder.online/shopee \
-e SENTINEL_MCP_INTERNAL_KEY=sentinel-mcp-internal-2026 \
-e MCP_MODE=http \
-e MCP_HOST=0.0.0.0 \
-e MCP_PORT=8020 \
-e LOG_LEVEL=info \
sentinel-mcp
# 3. Verify
curl http://127.0.0.1:8020/health
# Should return: {"status":"ok","service":"sentinel-mcp"}Method 2: systemd Deployment
bash
# 1. Install
cd /opt
git clone <repo> sentinel-mcp-server
cd sentinel-mcp-server
python3.12 -m venv venv
venv/bin/pip install .
# 2. Install service
cp deploy/sentinel-mcp.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable sentinel-mcp
systemctl start sentinel-mcp
# 3. Verify
systemctl status sentinel-mcp
curl http://127.0.0.1:8020/healthNginx Reverse Proxy
bash
# 1. Copy configuration
cp deploy/nginx-mcp.conf /etc/nginx/sites-available/mcp.priceminder.online
# 2. Enable
ln -s /etc/nginx/sites-available/mcp.priceminder.online /etc/nginx/sites-enabled/
# 3. SSL certificate
certbot --nginx -d mcp.priceminder.online
# 4. Reload
nginx -t && systemctl reload nginxNginx key configuration (SSE support):
nginx
location / {
proxy_pass http://127.0.0.1:8020;
proxy_http_version 1.1;
proxy_set_header Connection '';
proxy_set_header Host $host;
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 300s;
}Key Notes
SENTINEL_MCP_INTERNAL_KEYmust match the backend API configuration- SSL certificate must be valid (MCP clients require HTTPS)
proxy_buffering offis required for SSE streaming- Database migration needed to add
mcp_usage_logstable
Health Check
After deployment, verify service status:
bash
# Local check
curl http://127.0.0.1:8020/health
# {"status":"ok","service":"sentinel-mcp"}
# Check via Nginx (requires valid SSL)
curl https://mcp.priceminder.online/health