Skip to main content
Glama

Price Monitor MCP Server

by moongzee

价格监控 MCP 服务器

大纲

该项目是一个基于模型上下文协议(MCP)的价格监控服务器。通过产品代码比较DB标准价格和Gmarket实时价格,当价格下降时通过Slack发送通知。

  • 遵循MCP 标准的服务器/工具/提示���构
  • 自动化整个抓取、价格比较和通知过程
  • 支持Slack webhook集成

主要特点

  1. DB标准价格搜索:使用产品代码搜索DB中的标准价格
  2. Gmarket 实时价格爬取:使用 Firecrawl API
  3. 比较价格并计算折扣率
  4. 价格下降时发送 Slack 通知
  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 webhooks,如下所示。

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
  • 或者使用 devtools 运行它: mcp dev src/price_monitor_mcp.py
  • 或者使用 shell 脚本激活 conda 环境,然后运行

MCP 工具/提示列表

  • get_db_price(product_code) :DB标准价格查询
  • crawl_gmarket_price(product_code) :Gmarket实时价格爬取
  • send_slack_alert(message) :发送 Slack 通知
  • monitor_price_workflow(product_code) :自动运行整个流程(推荐)
  • monitor_price(product_code) :提示(针对法学硕士)

自动化整个过程(推荐)

调用工作流工具的示例

在 MCP 开发工具/客户端中:
  • 选择monitor_price_workflow工具,输入product_code ,然后运行它。
  • 结果:返回数据库价格、最低价、差价、折扣率、Slack通知等。
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())

Slack 通知测试

  • 如果您的 Slack webhook 设置正确,当价格下降时您将自动收到通知。
  • 消息格式可以在send_slack_alert函数中自由修改。

LLM(Claude、GPT等)链接

  • 一旦 MCP 服务器连接得到官方支持,Claude、GPT 等将能够以自然语言运行提示/工具
  • 目前,通过 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.

通过将数据库参考价格与实时 G-Market 价格进行比较来监控产品价格,并在价格下降时发送 Slack 通知。

  1. 大纲
    1. 主要特点
      1. 文件夹结构
        1. 如何运行
          1. 1.准备虚拟环境并安装包
          2. 2.设置环境变量
          3. 3. 运行 MCP 服务器
        2. MCP 工具/提示列表
          1. 自动化整个过程(推荐)
            1. 调用工作流工具的示例
          2. Slack 通知测试
            1. LLM(Claude、GPT等)链接
              1. 参考文献/文件
                1. 联系/贡献

                  Related MCP Servers

                  • A
                    security
                    A
                    license
                    A
                    quality
                    Provides real-time and historical cryptocurrency market data through integration with major exchanges. This server enables LLMs like Claude to fetch current prices, analyze market trends, and access detailed trading information.
                    Last updated -
                    7
                    52
                    Python
                    MIT License
                    • Apple
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A Model Context Protocol server enabling product searches across e-commerce platforms, price history tracking, and product specification-based searches using natural language prompts.
                    Last updated -
                    8
                    14
                    Python
                    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
                    685
                    2
                    JavaScript
                    MIT License
                    • Apple
                    • Linux
                  • -
                    security
                    F
                    license
                    -
                    quality
                    Provides real-time access to global stock market data including current prices, historical charts, and company financial information through a Model Context Protocol (MCP) server for AI assistants.
                    Last updated -
                    TypeScript
                    • Linux
                    • Apple

                  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