Skip to main content
Glama

Price Monitor MCP Server

by moongzee

Price Monitor MCPサーバー

概要

このプロジェクトは、Model Context Protocol(MCP)ベースの価格監視サーバーです。商品コードでDBの価格とGマーケットのリアルタイム価格を比較し、価格が下がったときにSlackに通知を送信します。

  • MCP規格に準拠したサーバー/ツール/プロンプト構造
  • クロール、価格比較、通知全体のプロセスを自動化
  • スラックウェブフック連動サポート

主な機能

  1. DB基準価照会:商品コードでDBから基準価格を照会する
  2. Gマーケットリアルタイム価格クロール:Firecrawl APIの活用
  3. 価格比較と割引率の計算
  4. 価格下落時にスラック通知を送信
  5. フルワークフロー自動実行ツールを提供

フォルダ構造

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

実行方法

1. 仮想環境の準備とパッケージのインストール

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

2. 環境変数の設定

.envファイルに以下のようにSlack Webhookなどの環境変数を設定します。

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

3. MCP サーバーの実行

mcp run src/price_monitor_mcp.py
  • またはdevツールで実行: mcp dev src/price_monitor_mcp.py
  • またはシェルスクリプトでconda環境を有効にした後に実行する

MCPツール/プロンプトリスト

  • get_db_price(product_code) : DB 基準が照会
  • crawl_gmarket_price(product_code) :Gマーケットリアルタイム価格クロール
  • send_slack_alert(message) : スラック通知の送信
  • monitor_price_workflow(product_code) : フルプロセス自動実行 (推奨)
  • monitor_price(product_code) :プロンプト(LLM用)

フルプロセス自動実行(推奨)

ワークフローツール呼び出しの例

MCP開発ツール/クライアントから:
  • monitor_price_workflowツールを選択し、 product_code入力して実行
  • 結果:DB価格、最低価格、価格差、割引率、スラック通知などを返す
Pythonクライアントの例
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())

スラック通知テスト

  • スラックウェブフックが正しく設定されていると、価格が下がると自動的に通知が送信されます。
  • メッセージフォーマットはsend_slack_alert関数で自由に変更可能

LLM(Claude、GPTなど)連動

  • Claude、GPTなどでMCPサーバー接続機能が公式にサポートされると、自然言語でのプロンプト/ツール実行が可能
  • 現在は、MCPクライアントコードで結果を受け取り、LLMに貼り付けて要約/分析要求

参考/文書


お問い合わせ/貢献

  • 気になる点、バグ、拡張リクエストは問題として残してください!
-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

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. 仮想環境の準備とパッケージのインストール
          2. 環境変数の設定
          3. MCP サーバーの実行
        2. MCPツール/プロンプトリスト
          1. フルプロセス自動実行(推奨)
            1. ワークフローツール呼び出しの例
          2. スラック通知テスト
            1. LLM(Claude、GPTなど)連動
              1. 参考/文書
                1. お問い合わせ/貢献

                  Related MCP Servers

                  • A
                    security
                    A
                    license
                    A
                    quality
                    Enables interaction with the PolyMarket API to fetch prediction market data such as market information, prices, and historical data, with robust error handling and rate limit management.
                    Last updated -
                    4
                    21
                    Python
                    MIT License
                    • Apple
                  • A
                    security
                    A
                    license
                    A
                    quality
                    Enables interaction with Shopify store data via GraphQL API, providing tools for managing products, customers, orders, discounts, and more with robust error handling.
                    Last updated -
                    15
                    76
                    30
                    TypeScript
                    MIT License
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A server implementation that streams real-time Binance market data (spot and futures) via WebSockets, enabling applications to receive and process cryptocurrency market information through the Model Context Protocol.
                    Last updated -
                    6
                    6
                    TypeScript
                    MIT License
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A server that provides tools for retrieving real-time price information for various assets including precious metals and cryptocurrencies, allowing language models to access and display current asset price data.
                    Last updated -
                    1
                    56
                    1
                    JavaScript
                    MIT License
                    • Apple
                    • Linux

                  View all related MCP servers

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/moongzee/mcp-price-monitor'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server