Skip to content

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)
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/health

Nginx 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 nginx

Nginx 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

  1. SENTINEL_MCP_INTERNAL_KEY must match the backend API configuration
  2. SSL certificate must be valid (MCP clients require HTTPS)
  3. proxy_buffering off is required for SSE streaming
  4. Database migration needed to add mcp_usage_logs table

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

Released under the MIT License.