Woolworths MCP Server
Enables interaction with Woolworths Australia's online shopping platform through browser automation and API integration. Supports product search, browsing specials, managing shopping cart, and accessing product details through natural language.
README
Woolworths MCP Server
A Model Context Protocol (MCP) server for interacting with Woolworths Australia's online shopping platform. This server provides tools for browsing products, searching items, viewing specials, and more.
Features
- Browser Automation: Uses Puppeteer to open a browser, navigate to Woolworths, and capture session cookies
- Session Management: Maintains session cookies for authenticated API requests
- Product Search: Search for products across the Woolworths catalog with filtering and sorting
- Product Details: Get detailed information about specific products
- Specials & Deals: Browse current specials and promotional offers
- Category Browsing: Explore product categories
- Shopping Cart: Add items to cart, view cart contents, update quantities, and remove items
Installation
- Install dependencies:
npm install
- Build the TypeScript code:
npm run build
Usage
Running the Server
The MCP server runs on stdio and is designed to be used with MCP-compatible clients (like Claude Desktop, Cline, or other AI assistants).
npm start
Configuration for Claude Desktop
Add this to your Claude Desktop configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"woolworths": {
"command": "node",
"args": ["C:\\Users\\eglass\\Projects\\Woolworths\\dist\\index.js"]
}
}
}
Make sure to update the path to match your installation directory.
Available Tools
1. woolworths_open_browser
Opens a browser and navigates to the Woolworths website. This is typically the first step to establish a session.
Parameters:
headless(boolean, optional): Whether to run in headless mode (default: false)
Example:
{
"headless": false
}
2. woolworths_navigate
Navigate to a specific URL on the Woolworths website.
Parameters:
url(string, required): The URL to navigate to
3. woolworths_get_cookies
Retrieves and stores session cookies from the current browser session. Run this after logging in or when you have an active session.
Parameters: None
4. woolworths_close_browser
Closes the browser instance while preserving the captured session cookies.
Parameters: None
5. woolworths_search_products
Search for products on Woolworths.
Parameters:
searchTerm(string, required): The product search termpageSize(number, optional): Number of results to return (default: 20)
Example:
{
"searchTerm": "milk",
"pageSize": 20
}
6. woolworths_get_product_details
Get detailed information about a specific product by its stockcode.
Parameters:
stockcode(string, required): The product stockcode/ID
7. woolworths_get_specials
Get current specials and deals from Woolworths.
Parameters:
category(string, optional): Category filter (e.g., 'fruit-veg', 'meat-seafood')pageSize(number, optional): Number of results to return (default: 20)
8. woolworths_get_categories
Get the list of available product categories.
Parameters: None
9. woolworths_add_to_cart
Add a product to the shopping cart/trolley.
Parameters:
stockcode(number, required): The product stockcode/IDquantity(number, optional): Quantity to add (default: 1)
Example:
{
"stockcode": 123456,
"quantity": 2
}
10. woolworths_get_cart
Get the current contents of the shopping cart/trolley.
Parameters: None
11. woolworths_remove_from_cart
Remove a product from the shopping cart/trolley.
Parameters:
stockcode(number, required): The product stockcode/ID to remove
12. woolworths_update_cart_quantity
Update the quantity of a product in the shopping cart/trolley.
Parameters:
stockcode(number, required): The product stockcode/IDquantity(number, required): New quantity
Typical Workflow
- Open Browser: Use
woolworths_open_browserto launch a browser window - Log In (if needed): The browser will open in non-headless mode by default, allowing you to manually log in to your Woolworths account if required
- Capture Cookies: Use
woolworths_get_cookiesto capture session cookies - Close Browser: Use
woolworths_close_browserto close the browser (cookies are preserved) - Use API Tools: Now you can use any of the API tools (search, get product details, etc.)
Example Usage Scenario
1. User: "Open the Woolworths browser"
→ Calls: woolworths_open_browser
2. User manually logs in on the opened browser (if needed)
3. User: "Get the session cookies"
→ Calls: woolworths_get_cookies
4. User: "Close the browser"
→ Calls: woolworths_close_browser
5. User: "Search for bananas"
→ Calls: woolworths_search_products with searchTerm="bananas"
6. User: "What are the current specials?"
→ Calls: woolworths_get_specials
7. User: "Add product 123456 to my cart"
→ Calls: woolworths_add_to_cart with stockcode=123456
8. User: "Show me my cart"
→ Calls: woolworths_get_cart
Technical Details
Browser Automation
The server uses Puppeteer to:
- Launch a Chromium browser instance
- Navigate to Woolworths website
- Capture cookies from the browser session
- Maintain user agent and browser fingerprint
API Integration
Once cookies are captured, the server makes authenticated requests to Woolworths' internal APIs:
- Search API:
/apis/ui/Search/products(POST) - Product Detail API:
/apis/ui/product/detail/{stockcode} - Browse/Category API:
/apis/ui/browse/category - Categories API:
/apis/ui/PiesCategoriesWithSpecials - Shopping Cart API:
/apis/ui/Trolley/*(AddItem, RemoveItem, UpdateItem, Get)
Session Management
Session cookies are stored in memory for the duration of the server process. If the server restarts, you'll need to recapture cookies by opening the browser again.
Development
Watch Mode
For development with auto-recompilation:
npm run dev
Building
npm run build
Requirements
- Node.js 18 or higher
- npm or yarn
- Chromium/Chrome (automatically installed by Puppeteer)
Notes
- The browser opens in non-headless mode by default to allow for manual login
- Session cookies are stored in memory and persist until the server is restarted
- API endpoints are based on Woolworths' public web interface and may change
- Always respect Woolworths' Terms of Service when using this tool
Troubleshooting
Browser won't open
- Check that Puppeteer installed correctly
- Try running with headless: true if display issues occur
API requests fail
- Ensure you've captured cookies with
woolworths_get_cookies - Check that the session hasn't expired (you may need to re-open browser and capture new cookies)
- Verify the API endpoints are still valid
Connection issues
- Ensure you have a stable internet connection
- Check that Woolworths website is accessible from your location
License
MIT
Disclaimer
This is an unofficial tool and is not affiliated with or endorsed by Woolworths Group Limited. Use at your own risk and ensure compliance with Woolworths' Terms of Service.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。