Price Monitor MCP Server

Integrations

  • Manages environment variables for configuration settings like database credentials and Slack webhook URLs

  • Used for data validation and settings management in the price monitoring server

  • Provides a Python client interface to interact with the MCP server, allowing programmatic access to price monitoring workflows and tools

Price Monitor MCP Server

outline

This project is a price monitoring server based on Model Context Protocol (MCP). It compares the DB standard price and Gmarket real-time price using product codes, and sends a notification to Slack when the price drops.

  • Server/tool/prompt structure following MCP standards
  • Automate the entire process of crawling, price comparison, and notifications
  • Supports Slack webhook integration

Key Features

  1. DB standard price search : Search the standard price in DB using the product code
  2. Gmarket Real-time Price Crawling : Using Firecrawl API
  3. Compare prices and calculate discount rates
  4. Send Slack notifications when price drops
  5. Provides a tool to automate the entire workflow

Folder structure

price_monitor_mcp/ ├── src/ │ └── price_monitor_mcp.py # MCP 서버 메인 코드 ├── mcp_client.py # MCP 클라이언트 코드 ├── README.md └── .env # 환경변수

How to run

1. Prepare virtual environment and install package

conda activate price_monitor_mcp pip install -r requirements.txt # 또는 필요한 경우 pip install mcp firecrawl requests python-dotenv psycopg2-binary pydantic

2. Setting environment variables

Set environment variables such as Slack webhooks in .env file as follows.

SLACK_WEBHOOK_URL=https://hooks.slack.com/services/... DB_HOST=... DB_PORT=... DB_NAME=... DB_USER=... DB_PASSWORD=...

3. Run the MCP server

mcp run src/price_monitor_mcp.py
  • Or run it with devtools: mcp dev src/price_monitor_mcp.py
  • Or activate the conda environment with a shell script and then run

MCP Tools/Prompts List

  • get_db_price(product_code) : DB standard price query
  • crawl_gmarket_price(product_code) : Gmarket real-time price crawling
  • send_slack_alert(message) : Send Slack notification
  • monitor_price_workflow(product_code) : Automatically run the entire process (recommended)
  • monitor_price(product_code) : prompt (for LLM)

Example of calling a workflow tool

In the MCP dev tools/client:

  • Select the monitor_price_workflow tool, enter product_code , and run it.
  • Results: Returns DB price, lowest price, price difference, discount rate, Slack notification, etc.

Python client example

import asyncio from mcp import ClientSession, StdioServerParameters from mcp.client.stdio import stdio_client async def main(): server_params = StdioServerParameters( command="python", args=["src/price_monitor_mcp.py"], ) async with stdio_client(server_params) as (read, write): async with ClientSession(read, write) as session: await session.initialize() result = await session.call_tool("monitor_price_workflow", arguments={"product_code": "ULCK25151"}) print("워크플로우 결과:", result) if __name__ == "__main__": asyncio.run(main())

Slack notification test

  • If your Slack webhook is set up correctly, you will automatically be notified when a price drops.
  • The message format can be freely modified in send_slack_alert function.

LLM (Claude, GPT, etc.) linkage

  • Claude, GPT, etc. will be able to run prompts/tools in natural language once MCP server connection is officially supported
  • Currently, the results are received through MCP client code and pasted to LLM for summary/analysis request.

References/Documents


Contact/Contribution

  • Please leave any questions, bugs, or extension requests as issues!
-
security - not tested
F
license - not found
-
quality - not tested

Monitors product prices by comparing database reference prices with real-time G-Market prices and sends Slack notifications when prices drop.

  1. 개요
    1. 주요 기능
      1. 폴더 구조
        1. 실행 방법
          1. 1. 가상환경 준비 및 패키지 설치
          2. 2. 환경 변수 설정
          3. 3. MCP 서버 실행
        2. MCP 툴/프롬프트 목록
          1. 전체 프로세스 자동 실행 (추천)
            1. 워크플로우 툴 호출 예시
          2. 슬랙 알림 테스트
            1. LLM(Claude, GPT 등) 연동
              1. 참고/문서
                1. 문의/기여
                  ID: n3lbm0w19k