Content
# Ozon MCP Server (Fork)
MCP server for buyer search on Ozon.ru: products, cards, reviews.
This is a **fork** of [eduard256/ozon-mcp-server](https://github.com/eduard256/ozon-mcp-server) with four minimal edits for stable work from a real Windows desktop in 2026:
1. `browser.js` — `chromium.launch({ headless: false })` + full chromium (instead of `chrome-headless-shell`). Variti in 2026 detects lite headless-shell build, and full chromium with real rendering passes the challenge.
2. `browser.js` — UA Windows instead of Linux. Corresponds to the real system.
3. `browser.js` — `chromium.launchPersistentContext()` instead of `launch + newContext`: cookies, localStorage, and selected region live between launches in `OZON_USER_DATA_DIR` (by default `~/.ozon-mcp-userdata`).
4. `ozon.js` — `details()` requests are made sequentially instead of `Promise.all`. Variti cuts two simultaneous fetches on the same product like a bot → stable HTTP 403. Also, fallback to an empty description if page2 still doesn't return.
## Installation
```jsonc
// ~/.claude.json → mcpServers
"ozon": {
"type": "stdio",
"command": "npx",
"args": ["-y", "github:Pir0manT/ozon-mcp-server"],
"env": {
"OZON_CITY": "",
"OZON_HIDE_WINDOW": "1"
}
}
```
Before first use, run:
```bash
npx playwright@1.60.0 install chromium chromium-headless-shell
```
## Environment Variables
| Variable | Default | Description |
|---|---|---|
| `OZON_CITY` | (not set) | After warmup, tries to set the region through UI. If Ozon's layout has changed, suppresses warning and continues. Better set together with persistent context. |
| `OZON_HIDE_WINDOW` | `1` | Chromium window launches out of screen. If `0`, the window is visible (needed for manual region selection on the first launch). |
| `OZON_USER_DATA_DIR` | `~/.ozon-mcp-userdata` | Where to save cookies/storage between launches. |
## Set Region Manually Once
If automatic `OZON_CITY` didn't work (Ozon might have changed the layout):
1. In `.claude.json` temporarily: `"OZON_HIDE_WINDOW": "0"`
2. `/mcp` → reconnect ozon → make any request
3. In the opened chromium window, click on the current region in the header and select your own
4. Close the window (or wait for idle timeout 10 minutes)
5. Cookies will be saved in `OZON_USER_DATA_DIR`
6. Return `"OZON_HIDE_WINDOW": "1"` — everything works with correct prices automatically
## License
MIT (as in the original). Thanks to [@eduard256](https://github.com/eduard256) for the initial implementation.