Frisco MCP
Enables AI assistants to shop on frisco.pl, Poland's online grocery store, with secure manual authentication. Supports product search, cart management, and checkout preparation via browser automation without storing login credentials.
README
Frisco MCP
A TypeScript Model Context Protocol (MCP) server that lets AI assistants (Claude, Gemini, etc.) interact with frisco.pl — Poland's online grocery store.
Security First — The server never stores your email or password. You log in manually in a visible browser window; only session cookies are persisted locally.

Features
Session
| Tool | Description |
|---|---|
login |
Opens a visible Chromium window at the login page. You log in manually; the server polls for success and saves session cookies. |
finish_session |
Opens the browser at the checkout page so you can select a delivery slot and pay. No automatic payment. |
clear_session |
Closes the browser and deletes the saved session file. |
Cart
| Tool | Description |
|---|---|
add_items_to_cart |
Accepts a JSON list of products (name, search query, quantity). Searches for each item and clicks "Add to cart". Optionally clears the cart first. |
view_cart |
Returns the current cart contents and total price. |
remove_item_from_cart |
Removes a specific product from the cart by name (partial match). |
Products
| Tool | Description |
|---|---|
search_products |
Searches frisco.pl and returns top N results with prices. |
get_product_info |
Returns detailed product info: nutritional values (macros per 100g), weight/grammage, ingredients, and price. |
Logs
| Tool | Description |
|---|---|
get_logs |
Returns JSONL log events for the current or a specific session. |
tail_logs |
Returns the N most recent log events. |
Architecture
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 & parsing]
E --> I
H --> J[(~/.frisco-mcp/session.json)]
B --> L[src/logger.ts] --> M[(~/.frisco-mcp/logs/)]
G --> K[frisco.pl 🌐]
I --> K
More diagrams (login flow, cart flow): docs/DIAGRAMS.md
Requirements
- Node.js 20 or later
- Chromium for Playwright (installed via the setup command below)
Setup
npm install
npx playwright install chromium
npm run build
MCP Client Configuration
The server communicates over stdio — point your MCP client at node dist/index.js.
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"frisco": {
"command": "node",
"args": ["/absolute/path/to/frisco-mcp/dist/index.js"]
}
}
}
Gemini (Google AI Studio)
The .gemini/settings.json in this repo already contains the configuration:
{
"mcpServers": {
"frisco-mcp": {
"command": "node",
"args": ["/absolute/path/to/frisco-mcp/dist/index.js"]
}
}
}
Cursor
Add to your Cursor MCP settings (~/.cursor/mcp.json or workspace .cursor/mcp.json):
{
"mcpServers": {
"frisco": {
"command": "node",
"args": ["/absolute/path/to/frisco-mcp/dist/index.js"]
}
}
}
Note: Replace the path with the absolute path to
dist/index.json your machine.
Usage
1. Log in
"Log me in to Frisco"
The login tool opens a Chromium window at frisco.pl/login. Log in manually — the server waits up to 5 minutes and saves your session cookies once it detects a successful login.
2. Shop
"Add 2 liters of milk and wheat bread to cart"
The add_items_to_cart tool searches for each product, picks the first match, and clicks "Add to cart" the requested number of times.
"Find me natural yogurt"
The search_products tool returns a list of matching products with prices.
"Remove the butter from my cart"
The remove_item_from_cart tool finds a product in the cart by name and removes it.
3. Checkout
"Finish my Frisco session"
The finish_session tool opens your cart at frisco.pl/stn,cart so you can choose a delivery slot and pay — the server never performs payment automatically.
Project Structure
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
│ ├── 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
│ ├── products.ts # search_products, get_product_info
│ └── helpers.ts # Navigation, popup dismissal, DOM parsing
│ └── __tests__/ # Unit tests (Vitest)
├── test_data/ # Sample HTML fixtures for tests
├── 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
Data Storage
All user data is stored locally in ~/.frisco-mcp/:
| File | Purpose |
|---|---|
session.json |
Saved browser cookies (no credentials) |
current-session.json |
Pointer to the active log session |
logs/<id>.jsonl |
Per-session event logs |
Development
# 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:watch
CI
Tests run automatically on every push and pull request to master via GitHub Actions (.github/workflows/test.yml). The matrix tests against Node.js 20 and 22.
Tech Stack
| Library | Role |
|---|---|
@modelcontextprotocol/sdk |
MCP server framework |
playwright |
Browser automation (Chromium) |
cheerio |
HTML parsing for product info |
zod |
Input schema validation |
typescript |
Language & build |
vitest |
Unit testing framework |
License
This project is licensed under the MIT License.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。