# Интеграция по протоколу Model Context Protocol (MCP)

Инструкция по настройке и подключению MCP-сервера Labstar для AI-клиентов.

- **Хлебные крошки:** [Главная](https://labstar.com.ua/ru/index.md) → MCP Интеграция
- **Язык:** RU · [UA](https://labstar.com.ua/page/mcp.md)
- **Формат:** Markdown · [HTML](https://labstar.com.ua/ru/page/mcp)

## Подключение к MCP-серверу

- **Адрес подключения:** `https://labstar.com.ua/mcp`
- **Транспорт:** `HTTP`
- Чтение каталога и поиск товаров являются публичными операциями и не требуют авторизации.
- Инструмент order_create создаёт отдельный гостевой заказ напрямую в магазине и не имеет связи с браузерной корзиной покупателя.

## Доступные инструменты (Tools)

### catalog_list_categories

Получение иерархии или плоского списка категорий каталога для навигации.

```json
{
    "properties": {
        "locale": {
            "description": "Storefront locale for category names and URLs. Use uk by default; use ru for Russian storefront text.",
            "default": "uk",
            "enum": [
                "uk",
                "ru"
            ],
            "type": "string"
        },
        "tree": {
            "description": "Set true for a nested navigation tree. Leave false for a flat list that is easier to scan or filter by slug.",
            "default": false,
            "type": "boolean"
        }
    },
    "type": "object"
}
```

### catalog_list_products

Просмотр товаров каталога с пагинацией, фильтрацией по категории и ценами.

```json
{
    "properties": {
        "locale": {
            "description": "Storefront locale for product names, URLs, category labels, and manufacturer labels. Use uk by default; use ru for Russian storefront text.",
            "default": "uk",
            "enum": [
                "uk",
                "ru"
            ],
            "type": "string"
        },
        "category": {
            "description": "Optional category slug or numeric category id. Use a slug returned by catalog_list_categories; values with spaces are invalid.",
            "maxLength": 255,
            "pattern": "^[A-Za-z0-9._-]+$",
            "type": "string"
        },
        "page": {
            "description": "Positive page number for paginated browsing. Defaults to 1.",
            "default": 1,
            "minimum": 1,
            "type": "integer"
        },
        "per_page": {
            "description": "Maximum products per page. Must be between 1 and 50; omit to use the storefront default.",
            "minimum": 1,
            "maximum": 50,
            "type": "integer"
        }
    },
    "type": "object"
}
```

### catalog_search_products

Поиск товаров по ключевым словам, коду товара или названию производителя.

```json
{
    "properties": {
        "query": {
            "description": "Non-empty search text up to 120 characters. Matches public product code, localized product name, or localized manufacturer name.",
            "minLength": 1,
            "maxLength": 120,
            "type": "string"
        },
        "locale": {
            "description": "Storefront locale for product names, URLs, category labels, and manufacturer labels. Use uk by default; use ru for Russian storefront text.",
            "default": "uk",
            "enum": [
                "uk",
                "ru"
            ],
            "type": "string"
        },
        "page": {
            "description": "Positive page number for paginated search results. Defaults to 1.",
            "default": 1,
            "minimum": 1,
            "type": "integer"
        },
        "per_page": {
            "description": "Maximum products per page. Must be between 1 and 50; omit to use the storefront default.",
            "minimum": 1,
            "maximum": 50,
            "type": "integer"
        }
    },
    "type": "object",
    "required": [
        "query"
    ]
}
```

### catalog_get_product

Получение подробной информации о товаре по его публичному коду: цены, характеристики, отзывы.

```json
{
    "properties": {
        "product_code": {
            "description": "Public Labstar product code, not a database id. Use a code returned by catalog_list_products or catalog_search_products.",
            "minLength": 1,
            "maxLength": 32,
            "type": "string"
        },
        "locale": {
            "description": "Storefront locale for product content, URLs, attributes, variants, reviews, and category labels. Use uk by default; use ru for Russian storefront text.",
            "default": "uk",
            "enum": [
                "uk",
                "ru"
            ],
            "type": "string"
        }
    },
    "type": "object",
    "required": [
        "product_code"
    ]
}
```

### order_create

Оформление прямого гостевого заказа с указанием контактов покупателя и адреса доставки. Не связано с корзиной браузера.

```json
{
    "properties": {
        "buyer": {
            "description": "Buyer registration and contact information",
            "properties": {
                "name": {
                    "description": "Buyer's full name",
                    "maxLength": 64,
                    "type": "string"
                },
                "email": {
                    "description": "Buyer's email address",
                    "type": "string"
                },
                "phone": {
                    "description": "Buyer's phone number in international format",
                    "maxLength": 32,
                    "type": "string"
                }
            },
            "type": "object",
            "required": [
                "name",
                "email",
                "phone"
            ]
        },
        "shipping": {
            "description": "Shipping and delivery details",
            "properties": {
                "address": {
                    "description": "Detailed delivery shipping address",
                    "maxLength": 250,
                    "type": "string"
                },
                "postal_index": {
                    "description": "Zip / postal code",
                    "maxLength": 36,
                    "type": "string"
                }
            },
            "type": "object",
            "required": [
                "address",
                "postal_index"
            ]
        },
        "items": {
            "description": "List of products to be purchased",
            "minItems": 1,
            "items": {
                "properties": {
                    "product_code": {
                        "description": "Storefront product code (e.g. PRD-001)",
                        "type": "string"
                    },
                    "quantity": {
                        "description": "Quantity of packages to purchase (integer >= 1)",
                        "minimum": 1,
                        "type": "integer"
                    }
                },
                "type": "object",
                "required": [
                    "product_code",
                    "quantity"
                ]
            },
            "type": "array"
        },
        "comment": {
            "description": "Optional buyer message or comment to the order",
            "maxLength": 1000,
            "type": "string"
        },
        "locale": {
            "description": "Storefront locale for checkout confirmation instructions.",
            "default": "uk",
            "enum": [
                "uk",
                "ru"
            ],
            "type": "string"
        }
    },
    "type": "object",
    "required": [
        "buyer",
        "shipping",
        "items"
    ]
}
```

---

## Навигация

- [Главная](https://labstar.com.ua/ru/index.md)
- [Категории](https://labstar.com.ua/ru/category.md)
- [Поиск](https://labstar.com.ua/ru/search.md)
- [Производители](https://labstar.com.ua/ru/manufacturer.md)
- [Блог](https://labstar.com.ua/ru/posts.md)
- [Контакты](https://labstar.com.ua/ru/page/contacts.md)

## Помощь

- [О нас](https://labstar.com.ua/ru/page/about-us.md)
- [Оплата и доставка](https://labstar.com.ua/ru/page/delivery.md)
- [Условия возврата](https://labstar.com.ua/ru/page/return-policy.md)
- [MCP Интеграция](https://labstar.com.ua/ru/page/mcp.md)
- [Карта для агентов](https://labstar.com.ua/ru/llms.txt)
