JW

jimmystridh/willys-mcp

浏览器自动化

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

5 stars 6 forks 质量 65 趋势 13MIT

An MCP (Model Context Protocol) server for Willys — Sweden's largest grocery chain. Control your shopping cart, browse orders, search products, and get AI-powered recommendations directly from Claude...

概览

An MCP (Model Context Protocol) server for Willys — Sweden's largest grocery chain. Control your shopping cart, browse orders, search products, and get AI-powered recommendations directly from Claude Code or any MCP client. - — Cart, orders, search, delivery slots, promotions, and more - — AI-powered product recommendations using your purchase history (OpenAI embeddings + sqlite-vec) - — Next.js app for browsing orders and testing features - — SQLite-backed with 24h expiration - — Reduces API calls by 80-90% Create .credentials in the project root: "Log in to Willys and show me my cart" "Search for havremjölk" "What did I order last week?" "Add Oatly Barista to my cart" Enable AI-powered recommendations by setting: The system uses your purchase history + semantic search to find products you're likely to want. - Product codes: 101175556_ST format - Full Swedish character support (ö, ä, å) - Sessions expire after 24 hours - CSRF handling built-in Check the path in ~/.claude.

README

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

Willys MCP Server

An MCP (Model Context Protocol) server for Willys — Sweden’s largest grocery chain. Control your shopping cart, browse orders, search products, and get AI-powered recommendations directly from Claude Code or any MCP client.

Features

  • 19 MCP Tools — Cart, orders, search, delivery slots, promotions, and more
  • Smart Matching — AI-powered product recommendations using your purchase history (OpenAI embeddings + sqlite-vec)
  • Web Interface — Next.js app for browsing orders and testing features
  • Persistent Sessions — SQLite-backed with 24h expiration
  • Order Caching — Reduces API calls by 80-90%

Quick Start

git clone https://github.com/yourusername/willys-checklist.git
cd willys-checklist
npm install

Create .credentials in the project root:

[email protected]
your-password

Claude Code Integration

Add to ~/.claude.json:

{
  "mcpServers": {
    "willys-checklist": {
      "type": "stdio",
      "command": "npx",
      "args": ["tsx", "/absolute/path/to/willys-checklist/mcp-server.ts"]
    }
  }
}

Restart Claude Code. Then just ask:

“Log in to Willys and show me my cart” “Search for havremjölk” “What did I order last week?” “Add Oatly Barista to my cart”

Web Interface

npm run dev

Open http://localhost:3000

MCP Tools

Auth

Tool Description
mcp__willys_login Login, returns session ID
mcp__willys_logout Clear session
mcp__willys_check_auth Check auth status

Cart

Tool Description
mcp__willys_get_cart Get cart contents
mcp__willys_add_to_cart Add product (e.g., 101175556_ST)
mcp__willys_remove_from_cart Remove product
mcp__willys_checkout Start checkout

Orders

Tool Description
mcp__willys_get_orders Order history
mcp__willys_get_order_details Full order with items
Tool Description
mcp__willys_search Product search
mcp__willys_search_suggestions Autocomplete
mcp__willys_get_product_detail Product info
mcp__willys_get_common_products Your frequent items
mcp__willys_get_smart_product_matches AI-powered matching

Delivery

Tool Description
mcp__willys_get_delivery_slots Delivery times
mcp__willys_get_pickup_slots Pickup times
mcp__willys_select_slot Book slot

Other

Tool Description
mcp__willys_get_offers Current promotions
mcp__willys_get_customer_info Profile & bonus

Smart Product Matching

Enable AI-powered recommendations by setting:

export OPENAI_API_KEY=sk-...
在 GitHub 查看完整 README

安装

npx tsx /absolute/path/to/willys-checklist/mcp-server.ts
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "willys-checklist": { "type": "stdio", "command": "npx", "args": ["tsx", "/absolute/path/to/willys-checklist/mcp-server.ts"] } } }