HN

hung-ngm/coles-woolworths-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

37 stars 8 forks 质量 68 趋势 12MIT

一个实验性的模型上下文协议(MCP)服务器实现,允许人工智能助手搜索澳大利亚主要超市Coles和Woolworths的产品信息。

概览

一个实验性的模型上下文协议(MCP)服务器实现,允许AI助手搜索澳大利亚主要超市Coles和Woolworths的产品信息。该服务器通过MCP协议暴露产品搜索功能,使AI助手轻松获取产品价格和详细信息。 https://github.com/user-attachments/assets/0af3b07a-578a-4112-acfe-e7a7eee31161 - : 在Coles和Woolworths超市搜索产品 - : 以一致格式获取两家零售商的价格信息 - : 使用门店ID搜索特定Coles门店 - : 控制搜索结果中退回的产品数量 4. 配置您的MCP客户端以使用该服务器(参见与MCP客户端集成) 1. Python 3.8 或更高版本 2.UV 包管理器 uv 是一个快速的 Python 安装器和解析器。安装方法: 1. 克隆仓库并导航到项目目录 2.

概述(AI 翻译)

一个实验性的模型上下文协议(MCP)服务器实现,允许AI助手搜索澳大利亚主要超市Coles和Woolworths的产品信息。该服务器通过MCP协议暴露产品搜索功能,使AI助手轻松获取产品价格和详细信息。

演示

与 Claude Desktop 的使用

https://github.com/user-attachments/assets/0af3b07a-578a-4112-acfe-e7a7eee31161

特色

  • 产品搜索:在Coles和Woolworths超市搜索产品
  • 价格比较:以一致格式获取两家零售商的价格信息
  • 商店选择:使用商店ID搜索特定Coles门店
  • 结果限制:控制搜索结果中返回的产品数量

Claude 桌面、光标及其他客户端的快速启动

  1. 克隆此仓库

  2. 导航到项目目录

  3. 安装先决条件

  4. 配置您的MCP客户端以使用该服务器(参见与MCP客户端集成)

安装

先决条件

  1. Python 3.8 或更高版本
  2. uv 包管理器

安装UV

uv 是一个快速的 Python 软件包安装器和解析器。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Coles and Woolworths MCP Server

An experimental Model Context Protocol (MCP) server implementation that allows AI assistants to search for product information from Australia’s major supermarkets: Coles and Woolworths. This server exposes product search functionality through the MCP protocol, making it easy for AI assistants to retrieve product pricing and details.

Demo

Use with Claude Desktop

https://github.com/user-attachments/assets/0af3b07a-578a-4112-acfe-e7a7eee31161

Features

  • Product Search: Search for products at both Coles and Woolworths supermarkets
  • Price Comparison: Get pricing information from both retailers in a consistent format
  • Store Selection: Search specific Coles stores using store IDs
  • Result Limiting: Control how many products are returned in search results

Quick Start for Claude Desktop, Cursor, and other clients

  1. Clone this repository
git clone https://github.com/hung-ngm/coles-woolworths-mcp-server.git
  1. Navigate to the project directory
cd coles-woolies-mcp
  1. Install the prerequisites

  2. Configure your MCP client to use this server (see Integrating with MCP Clients)

Installation

Prerequisites

  1. Python 3.8 or higher
  2. The uv package manager

Installing uv

uv is a fast Python package installer and resolver. To install:

macOS/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows:

powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Setup

  1. Clone the repository and navigate to the project directory
  2. Use uv to install dependencies:
# Install dependencies
uv pip install fastmcp requests python-dotenv

Configuration

The server uses the following environment variables:

  • COLES_API_KEY: API key for accessing the Coles API (required for Coles product searches)

You can set these variables in a .env file in the project directory.

Running the Server

To run the Coles and Woolworths MCP server directly using uv:

uv run main.py

By default, the server runs with stdio transport for MCP client integration.

Integrating with MCP Clients

Claude Desktop Configuration

To use the Coles and Woolworths MCP server with Claude Desktop:

  1. Locate your Claude Desktop configuration file (usually claude_desktop_config.json)
  2. Add the following configuration to the mcpServers section:
{
  "mcpServers": {
    "coles-woolies-mcp": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "fastmcp",
        "--with",
        "requests",
        "--with", 
        "python-dotenv",
        "fastmcp",
        "run",
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "coles-woolies-mcp": { "command": "uv", "args": [ "run", "--with", "fastmcp", "--with", "requests", "--with", "python-dotenv", "fastmcp", "run", "/full/path/to/coles-woolies-mcp/main.py" ] } } }