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

Інструкція з налаштування та підключення MCP-сервера Labstar для AI-клієнтів.

- **Навігаційний шлях:** [Головна](https://labstar.com.ua/index.md) → MCP Інтеграція
- **Мова:** UA · [RU](https://labstar.com.ua/ru/page/mcp.md)
- **Формат:** Markdown · [HTML](https://labstar.com.ua/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/index.md)
- [Категорії](https://labstar.com.ua/category.md)
- [Пошук](https://labstar.com.ua/search.md)
- [Виробники](https://labstar.com.ua/manufacturer.md)
- [Блог](https://labstar.com.ua/posts.md)
- [Контакти](https://labstar.com.ua/page/contacts.md)

## Допомога

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