Skip to main content

Price comparison tool for momo and PChome

Project description

Price Compare MCP

台灣電商比價工具 MCP Server,支援 momo、PChome、Coupang 價格搜尋與比較。

功能

工具 說明
compare_prices 跨平台搜尋最低價商品
search_pchome 搜尋 PChome 24h
search_momo 搜尋 momo 購物
search_coupang 搜尋 Coupang 台灣

參數說明

compare_prices

參數 類型 預設值 說明
query str (必填) 搜尋關鍵字
top_n int 20 回傳筆數
min_price int 0 最低價格過濾 (0=不過濾)
max_price int 0 最高價格過濾 (0=不過濾)
coupang_keywords list[str] None Coupang 必要關鍵字過濾 (不分大小寫)

search_coupang

參數 類型 預設值 說明
query str (必填) 搜尋關鍵字
max_results int 20 回傳筆數
required_keywords list[str] None 必要關鍵字過濾,產品名稱須包含所有關鍵字 (不分大小寫)

使用範例

# 搜尋 SONY 電視,過濾 Coupang 不相關結果
compare_prices(
    query="SONY 50吋電視",
    coupang_keywords=["SONY"]  # Coupang 結果必須包含 "SONY"
)

# 搜尋特定品牌+型號
search_coupang(
    query="iPhone 15 Pro",
    required_keywords=["iPhone", "15", "Pro"]  # 必須同時包含這三個關鍵字
)

提示:Coupang 的搜尋結果有時會包含不相關的低價商品,使用 coupang_keywords 可有效過濾。

安裝

pip install mcp-taiwan-price-compare
# 或
uv pip install mcp-taiwan-price-compare

MCP Server 配置

Claude Desktop / Claude Code

CLI 快速安裝(推薦):

claude mcp add price-compare -- uv run --directory /path/to/price_compare price-compare-mcp

手動編輯配置檔:

系統 路徑
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Windows %APPDATA%\Claude\claude_desktop_config.json
Linux ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "price-compare": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/price_compare", "price-compare-mcp"]
    }
  }
}

Gemini CLI

安裝 Gemini CLI:

npm install -g @google/gemini-cli@latest

編輯 ~/.gemini/settings.json

{
  "mcpServers": {
    "price-compare": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/price_compare", "price-compare-mcp"]
    }
  }
}

ChatGPT(Developer Mode)

需要 ChatGPT Plus/Pro/Team/Enterprise 方案

ChatGPT 僅支援遠端 HTTPS MCP server,需先部署或使用 ngrok:

# 本地開發:使用 ngrok 建立 HTTPS 通道
ngrok http 8000
  1. 開啟 ChatGPT → Settings → Developer mode → 啟用
  2. Settings → Connectors → Create
  3. 輸入 MCP server URL(ngrok 提供的 HTTPS URL)

詳細說明:OpenAI MCP 文件

其他安裝方式

使用 uvx(無需安裝):

{
  "mcpServers": {
    "price-compare": {
      "command": "uvx",
      "args": ["--from", "mcp-taiwan-price-compare", "price-compare-mcp"]
    }
  }
}

使用 npx + stdio wrapper:

{
  "mcpServers": {
    "price-compare": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-proxy", "--", "uv", "run", "price-compare-mcp"]
    }
  }
}

CLI 使用

# 搜尋最便宜的 10 筆
uv run python -m price_compare "iPhone 15"

# 指定數量與價格範圍
uv run python -m price_compare "藍牙耳機" -n 20 --min 500 --max 3000

# 價格由高到低
uv run python -m price_compare "機械鍵盤" --desc

參考資料

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_taiwan_price_compare-0.1.1.tar.gz (58.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_taiwan_price_compare-0.1.1-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_taiwan_price_compare-0.1.1.tar.gz.

File metadata

File hashes

Hashes for mcp_taiwan_price_compare-0.1.1.tar.gz
Algorithm Hash digest
SHA256 db24baa9e37962c578f0382a38dea94bc2ba2c9a8e28ad0fa6448874832f593e
MD5 bccb7be6dfe355595c223b8373a23154
BLAKE2b-256 44804d578452b9fe859c186a4c35d9a38c541f71bef292209199f07bcbb04dd8

See more details on using hashes here.

File details

Details for the file mcp_taiwan_price_compare-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_taiwan_price_compare-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c95cc3c3613655644c7339ed39df9cb1c9e4129b5a9f89f988944a487366c272
MD5 949dfaa49ecf17a85b03f93136f6cf09
BLAKE2b-256 f14b592d44ae48e46ec89b44a604a3bc7b66cc938fddb1a964abbeafe601bcf7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page