MCP (Model Context Protocol) Server for Ozon marketplace. Allows AI assistants to search products, get detailed information, prices, and delivery info from Ozon.ru.
- ozon_search - Search products with filters (price, sorting, pagination)
- ozon_product_details - Get detailed product info (price, characteristics, images, rating)
- ozon_products_list - Get info for multiple products at once
- ozon_set_location - Set delivery city
- ozon_get_filters - Get available filters for search
- ozon_get_categories - Get product categories list
The server uses Playwright to automate a headless browser and bypass Ozon's antibot protection:
- Maintains a persistent browser session with cookies
- Uses "natural navigation" (homepage → target page) to avoid captcha
- Extracts data from page DOM and embedded JSON
- Simulates human-like behavior (mouse movements, scrolling)
# Clone repository
git clone https://github.com/eduard256/ozon-mcp-server.git
cd ozon-mcp-server
# Install dependencies
npm install
# Install Playwright browsers
npx playwright install chromium
npx playwright install-deps chromium
# Start server
npm start# Clone and build
git clone https://github.com/eduard256/ozon-mcp-server.git
cd ozon-mcp-server
docker-compose up -dEnvironment variables:
PORT- HTTP server port (default: 3001)
The server exposes MCP Streamable HTTP transport at /mcp endpoint.
Base URL: http://localhost:3001
Endpoints:
GET /- Server info and available toolsGET /health- Health checkPOST /mcp- MCP JSON-RPC endpointGET /mcp- SSE stream (Accept: text/event-stream)DELETE /mcp- Terminate session
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ozon_search",
"arguments": {
"query": "iPhone 15",
"sort": "popular",
"limit": 10
}
}
}'curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ozon_product_details",
"arguments": {
"productId": "https://www.ozon.ru/product/smartfon-apple-iphone-15-128gb-1234567890/"
}
}
}'Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"ozon": {
"url": "http://localhost:3001/mcp"
}
}
}Or for remote server:
{
"mcpServers": {
"ozon": {
"url": "http://YOUR_SERVER_IP:3001/mcp"
}
}
}Search for products on Ozon.
Parameters:
query(required) - Search textsort- Sort order:popular,price,price_desc,new,rating,discountpage- Page number (default: 1)priceMin- Minimum price in rublespriceMax- Maximum price in rubleslimit- Max results (default: 20, max: 50)
Returns: Array of products with id, url, name, price, image, rating
Get detailed product information.
Parameters:
productId(required) - Product ID or full URL
Returns: Object with title, price, oldPrice, discount, rating, reviewsCount, images, characteristics, description, seller, inStock
Get multiple products at once.
Parameters:
productIds(required) - Array of product IDs or URLs
Returns: Array of product details
Set delivery city (affects prices and availability).
Parameters:
city(required) - City name
Returns: Success status
Get available filters for a search.
Parameters:
query(required) - Search query or category URL
Returns: Available sort options and filters
Get list of product categories.
Parameters: None
Returns: Array of categories with name and url
- First request may take longer (browser initialization)
- Product detail pages require natural navigation to bypass captcha
- Rate limiting: avoid too many rapid requests
- Ozon may change their antibot measures, requiring updates
MIT