coolpc
利用「原價屋」估價資料作為生成電腦設備估價單的 MCP Server
claude mcp add --transport stdio shyuan-coolpc-mcp-server node /path/to/coolpc-mcp-server/build/index.js
How to use
CoolPC MCP Server 提供一個以 MCP (Model Context Protocol) 為基礎的伺服器,讓 Claude Desktop 等 MCP 客戶端能透過自然語言查詢原價屋 CoolPC 的電腦零組件資料、進行價格比較、篩選分類並自動產生報價單。伺服器內建多個專門工具,包含 search_products、get_product_by_model、list_categories、get_category_products,以及針對特定零件的 search_cpu、search_gpu、search_ram、search_ssd 與 search_motherboard,讓你可以依照關鍵字、分類、價格區間、腳位、晶片組、容量等條件進行複雜查詢。使用時,先啟動 MCP 伺服器,並在 Claude Desktop 內設定對應的 mcpServers.coolpc,指定伺服器執行檔路徑,之後即可用自然語言命令取得商品清單、比較規格、或自動產生符合預算和需求的報價單。常見使用範例包括「查詢 AM5 主機板的價格範圍」、「搜尋 RTX 4060 顯示卡,價格由低到高排序」以及「整理一套預算 X 元內的遊戲電腦配置」。
How to install
安裝步驟(含前置條件)
-
確保在系統上已安裝以下先決條件:
- Python 3.x
- Node.js 18+(與 npm 一同安裝)
-
取得專案與設定:
- 克隆專案或下載原始碼 git clone https://github.com/your-repo/coolpc-mcp-server.git cd coolpc-mcp-server
- 安裝 Node.js 相依性 npm install
- 安裝 Python 相依性(若有需要,Parser 傳輸或資料處理使用)
以本專案為例,coolpc_parser.py 是獨立的 Python 程式,使用前請確認 Python 版本與模組需求
如有 requirements.txt,則可執行:
pip install -r requirements.txt
- 產生或更新產品資料(選擇性,但建議定期執行)
下載最新資料並解析為 product.json
python3 coolpc_parser.py --download --json product.json或使用本地 evaluate.html 解析
python3 coolpc_parser.py evaluate.html --json product.json
-
建置與啟動 MCP Server: Dev 模式(自動編譯與熱重載)
npm run dev生產模式
npm run build npm start -
對接 Claude Desktop:請在 Claude Desktop 的設定檔中加入對應的 mcpServers.coolpc 設定,並將路徑指向編譯後的 build/index.js。 例如:
{ "mcpServers": { "coolpc": { "command": "node", "args": ["/path/to/coolpc-mcp-server/build/index.js"], "env": {} } } }將 /path/to/coolpc-mcp-server 替換為專案實際路徑,重新啟動 Claude Desktop 後即可使用。
-
系統期望的依賴與資料: confirm product.json 與 evaluate.html 的可用性,並確保 parsers 與 Node.js 依賴正常運作。
Additional notes
小貼士與常見問題:
- 設定環境變數(env)可用於提供 API 金鑰、資料來源設定或本地化配置,例如將 product.json 路徑作為環境變數以便解析器或伺服器在啟動時載入。
- 若搜尋結果為空,請檢查 product.json 是否存在且格式正確,或確認解析器是否成功取得最新資料。
- 定期更新資料以反映新品與價格變動,可使用 python3 coolpc_parser.py --download --json product.json 重新產生檔案。
- 在 Claude Desktop 連線狀態顯示 🔌 圖示時,表示 MCP Server 與 Claude Desktop 的連線正常;若連線中斷,請檢查伺服器是否正在執行並確認路徑與執行權限。
- 如遇 Node.js 相依性版本相容性問題,建議使用與專案相容的 Node.js 版本(通常在 package.json 或 README 會列出版本要求)。
Related MCP Servers
any-chat-completions
MCP Server for using any LLM as a Tool
bitbucket
Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs
time
⏰ Time MCP Server: Giving LLMs Time Awareness Capabilities
unity-editor
An MCP server and client for LLMs to interact with Unity Projects
website-publisher
AI Website builder and publisher MCP. Quickly publish and deploy your AI generated code as real website URL. Support html, css, js, python etc.
xgmem
Global Memory MCP server, that manage all projects data.