Frisco MCP
Frisco MCP
AIアシスタント(Claude、Geminiなど)がポーランドのオンライン食料品店であるfrisco.plとやり取りできるようにする、TypeScript製の**Model Context Protocol (MCP)**サーバーです。
セキュリティ第一 — このサーバーは、あなたのメールアドレスやパスワードを一切保存しません。表示されるブラウザウィンドウで手動でログインし、セッションクッキーのみがローカルに保持されます。

機能
セッション
ツール | 説明 |
| ログインページで表示可能なChromiumウィンドウを開きます。手動でログインすると、サーバーが成功をポーリングし、セッションクッキーを保存します。 |
| チェックアウトページでブラウザを開き、配送枠の選択と支払いを行えるようにします。自動決済は行われません。 |
| ブラウザを閉じ、保存されたセッションファイルを削除します。 |
カート
ツール | 説明 |
| カートに商品を追加します。2つのフローをサポートします: (1) |
| 現在のカートの内容と合計金額を返します。 |
| 名前(部分一致)で指定した商品をカートから削除します。 |
| カート内の商品の数量を変更します(名前の部分一致)。 |
| カート内の売り切れ商品や利用不可商品を検出し、それぞれの代替品をリストアップします。 |
| 現在のカート内の有効なプロモーション、割引、合計節約額を表示します。 |
製品
ツール | 説明 |
| frisco.plを検索し、価格/在庫状況を含む上位N件の結果を返し、カート追加用の検索URL/コンテキストを保存します。 |
| 詳細な製品情報を返します:栄養成分(100gあたりのマクロ)、重量/グラム数、原材料、価格(プロモーション中の場合は元の価格と単価を含む)。 |
| 製品のカスタマーレビューと評価(Trustmateより)を返します。 |
ログ
ツール | 説明 |
| 現在または特定のセッションのJSONLログイベントを返します。 |
| 最新のN件のログイベントを返します。 |
Related MCP server: Rohlik MCP Server
アーキテクチャ
flowchart LR
A[MCP Client / AI Assistant] -->|stdio| B[src/index.ts<br/>McpServer]
B --> C[Session Tools<br/>src/tools/session.ts]
B --> D[Cart Tools<br/>src/tools/cart.ts]
B --> E[Product Tools<br/>src/tools/products.ts]
C --> G[src/browser.ts<br/>Playwright singleton]
D --> G
E --> G
C --> H[src/auth.ts<br/>session cookies]
D --> H
E --> H
D --> I[src/tools/helpers.ts<br/>navigation, HTML parsing & formatters]
E --> I
H --> J[(~/.frisco-mcp/session.json)]
B --> L[src/logger.ts] --> M[(~/.frisco-mcp/logs/)]
G --> N[(in-memory lastSearchContext)]
G --> K[frisco.pl 🌐]
I --> Kその他の図(ログインフロー、カートフロー): docs/DIAGRAMS.md
要件
Node.js 20以降
Chromium (Playwright用、以下のセットアップコマンドでインストール)
セットアップ
npm install
npx playwright install chromium
npm run buildMCPクライアント設定
サーバーは stdio を介して通信します。MCPクライアントで node dist/index.js を指定してください。
Claude Desktop
claude_desktop_config.json に追加します:
{
"mcpServers": {
"frisco": {
"command": "node",
"args": ["/absolute/path/to/frisco-mcp/dist/index.js"]
}
}
}Gemini (Google AI Studio)
このリポジトリ内の .gemini/settings.json には既に設定が含まれています:
{
"mcpServers": {
"frisco-mcp": {
"command": "node",
"args": ["/absolute/path/to/frisco-mcp/dist/index.js"]
}
}
}Cursor
CursorのMCP設定(~/.cursor/mcp.json またはワークスペースの .cursor/mcp.json)に追加します:
{
"mcpServers": {
"frisco": {
"command": "node",
"args": ["/absolute/path/to/frisco-mcp/dist/index.js"]
}
}
}注意: パスは、お使いの環境の
dist/index.jsへの絶対パスに置き換えてください。
使用方法
1. ログイン
"Friscoにログインして"
login ツールは frisco.pl/login でChromiumウィンドウを開きます。手動でログインしてください。サーバーは最大5分間待機し、ログイン成功を検知するとセッションクッキーを保存します。
2. 買い物
"ナチュラルヨーグルトを探して"
search_products ツールは、価格付きの該当商品リストを返します。利用不可の商品は ⚠️ NIEDOSTĘPNY とマークされます。また、その後のカート操作のために現在の検索URLと結果コンテキストを保存します。
"PIĄTNICA Skyrについて詳しく教えて"
get_product_info ツールは商品ページに移動し、詳細情報を抽出します:栄養成分(100gあたりのkcal、タンパク質、脂質、炭水化物、糖質、塩分)、重量/グラム数、原材料、価格(プロモーション中の場合は元の価格と単価)、および製品URL。
"それをカートに追加して"
add_items_to_cart ツールは2つのフローをサポートします:(1) productUrl が提供されている場合(get_product_info からなど)、直接その商品ページに移動して「Do koszyka」をクリックします(推奨フロー);(2) それ以外の場合は、最新の search_products 結果ページを使用して商品を見つけて追加します。
"カートからバターを削除して"
remove_item_from_cart ツールは名前でカート内の商品を見つけて削除します。
"牛乳の数量を3に変更して"
update_item_quantity ツールはカート内の商品を見つけて数量を更新します。
"カートに何か問題はある?"
check_cart_issues ツールはカート内の売り切れ商品をスキャンし、それぞれの代替品を表示します。
"Skyr Piątnicaのレビューはどう?"
get_product_reviews ツールはTrustmateからカスタマー評価とレビューを取得します。
"カート内の有効なプロモーションを見せて"
view_promotions ツールは、すべての有効なプロモーション、割引バッジ、合計節約額をリストアップします。
3. チェックアウト
"Friscoのセッションを終了して"
finish_session ツールは frisco.pl/stn,cart でカートを開き、配送枠の選択と支払いを行えるようにします。サーバーが自動的に支払いを行うことはありません。
プロジェクト構造
frisco-mcp/
├── src/
│ ├── index.ts # MCP server setup, tool registration
│ ├── auth.ts # Session cookie save/restore, login check
│ ├── browser.ts # Playwright browser singleton, product cache, last search context
│ ├── logger.ts # JSONL session logging
│ ├── types.ts # Shared TypeScript types
│ └── tools/
│ ├── session.ts # login, finish_session, clear_session
│ ├── cart.ts # add_items_to_cart, view_cart, remove_item_from_cart,
│ │ # update_item_quantity, check_cart_issues, view_promotions
│ ├── products.ts # search_products, get_product_info, get_product_reviews
│ └── helpers.ts # Navigation, popup dismissal, DOM parsing, formatters
│ └── __tests__/ # Unit tests (Vitest)
├── test_data/ # Sample HTML fixtures for tests
│ └── products/ # Product page HTMLs (skyr, chicken, bananas, eggs, bag, promotion)
├── docs/
│ └── DIAGRAMS.md # Mermaid architecture & flow diagrams
├── .github/
│ └── workflows/
│ └── test.yml # CI — runs tests on push & PR
├── dist/ # Compiled JS (generated by `npm run build`)
├── vitest.config.ts
├── package.json
├── tsconfig.json
└── .gitignoreデータストレージ
すべてのユーザーデータはローカルの ~/.frisco-mcp/ に保存されます:
ファイル | 用途 |
| 保存されたブラウザクッキー(認証情報は含まれません) |
| アクティブなログセッションへのポインタ |
| セッションごとのイベントログ |
開発
# Run in dev mode (tsx, no separate build step)
npm run dev
# Build
npm run build
# Run built server
npm start
# Run tests
npm test
# Watch mode for tests
npm run test:watchCI
テストは、GitHub Actions (.github/workflows/test.yml) を通じて master へのすべての push および pull request で自動的に実行されます。マトリックスはNode.js 20および22に対してテストされます。
技術スタック
ライブラリ | 役割 |
MCPサーバーフレームワーク | |
ブラウザ自動化 (Chromium) | |
製品情報取得のためのHTML解析 | |
入力スキーマ検証 | |
言語 & ビルド | |
ユニットテストフレームワーク |
ライセンス
このプロジェクトは MIT License の下でライセンスされています。
Available Tools
10 toolsadd_items_to_cartA
Searches for and adds a list of products to the cart. By default appends to current cart, optionally clearing it first.
Inputs: items (required), clearCartFirst.
clear_sessionB
Clears the saved session and closes the browser.
Inputs: no named parameters.
finish_sessionA
Opens the browser at the checkout page so you can select a delivery time and pay.
Inputs: no named parameters.
get_logsB
Returns persisted JSONL log events for the current or selected session.
Inputs: sessionId, limit.
get_product_infoA
Gets detailed info for a product: nutritional values (macros per 100g), weight/grammage, ingredients, and price.
Inputs: query (required).
loginA
Opens a visible Chromium browser to log in to Frisco manually. Run this first to establish a session.
Inputs: no named parameters.
remove_item_from_cartA
Removes a specific product from the Frisco cart by name (partial match supported).
Inputs: productName (required).
search_productsA
Searches frisco.pl for products and returns top matches with prices.
Inputs: query (required), topN.
tail_logsB
Returns the most recent events from persisted session logs.
Inputs: sessionId, lines.
view_cartA
Returns the current contents and total of the Frisco cart.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools are clearly distinct: search_products vs get_product_info, add_items_to_cart vs view_cart vs remove_item_from_cart. The only real overlap is get_logs vs tail_logs, both returning persisted log events, though the descriptions (all events vs most recent) provide some separation.
Tool names consistently follow a verb_noun snake_case pattern: get_logs, tail_logs, finish_session, clear_session, add_items_to_cart, search_products, get_product_info, remove_item_from_cart, view_cart. Even 'login' fits the simple verb style without breaking the pattern.
10 tools is well-scoped for an online grocery automation server. Each tool maps to a clear workflow stage: session management, product discovery, cart manipulation, and checkout handoff. No redundant or superfluous tools.
The core shopping lifecycle is covered: login, search products, inspect product details, add/remove/view cart, and finish session for checkout. Minor gaps exist, such as no explicit quantity adjustment or standalone clear-cart tool, but add_items_to_cart's optional clearing and the manual checkout flow mitigate most dead ends.
Maintenance
Related MCP Connectors
Search live store shelves, verify delivery windows, and run instant AI agent checkouts.
Turn any shopping list into a ready-to-checkout grocery cart across 26 European supermarkets.
Let your AI agent operate any website through a real, logged-in browser session.
Let AI agents use any website you're logged in to. Sessions stay encrypted on your machine.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to search for products, manage shopping carts, and place grocery orders on Instacart using browser automation. It includes comprehensive tools for store discovery, product searching, and secure checkout with explicit user confirmation.1159 npm12MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to search grocery products, build and manage shopping carts, and access account, order, delivery, and discount information through the Rohlik Group's online grocery delivery platforms. Supports multiple country-specific storefronts by selecting a regional base URL.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to shop groceries across Rohlik Group platforms by searching products, managing carts, analyzing purchase history for personalized suggestions, and accessing account, order, delivery, and discount information.-
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to search grocery products, manage shopping carts, and access account, order, delivery, and discount information across multiple European online grocery platforms.MIT