Skip to main content
Glama

@theyahia/mindbox-mcp

Mindbox CDP API용 MCP 서버 — 고객 프로필, 주문, 세그먼트, 상품 목록 및 임의 작업.

npm CI License: MIT

기능

  • Mindbox API 작업을 위한 6가지 도구

  • 전송: stdio(기본값) 및 Streamable HTTP(--http)

  • Claude Desktop, Claude Code, Cursor, Smithery 호환

  • 백오프(backoff) 및 멱등성(transactionId)을 갖춘 재시도, HTTP 전송 보호

  • 일반적인 시나리오 자동화를 위한 Skills

Related MCP server: Constant Contact MCP Server

설치

Claude Desktop

{
  "mcpServers": {
    "mindbox": {
      "command": "npx",
      "args": ["-y", "@theyahia/mindbox-mcp"],
      "env": {
        "MINDBOX_API_KEY": "ваш_ключ",
        "MINDBOX_ENDPOINT_ID": "ваш_endpoint_id"
      }
    }
  }
}

Claude Code

claude mcp add mindbox -e MINDBOX_API_KEY=ваш_ключ -e MINDBOX_ENDPOINT_ID=ваш_endpoint_id -- npx -y @theyahia/mindbox-mcp

Streamable HTTP

MINDBOX_API_KEY=ваш_ключ MINDBOX_ENDPOINT_ID=ваш_endpoint_id npx @theyahia/mindbox-mcp --http
# MCP endpoint: http://127.0.0.1:3000/mcp
# Health check: http://127.0.0.1:3000/health

기본적으로 서버는 127.0.0.1에서 수신합니다(보안 섹션 참조). 포트는 PORT, 호스트는 HOST로 설정합니다.

Docker (HTTP)

docker build -t mindbox-mcp .
docker run --rm -p 3000:3000 \
  -e MINDBOX_API_KEY=ваш_ключ -e MINDBOX_ENDPOINT_ID=ваш_endpoint_id \
  -e MINDBOX_HTTP_ALLOWED_HOSTS=ваш-домен:3000 \
  mindbox-mcp

컨테이너는 0.0.0.0:3000에서 수신합니다. 리버스 프록시 뒤에서 사용하는 경우 MINDBOX_HTTP_ALLOWED_HOSTS에 자체 호스트를 추가하세요(DNS-rebinding 보호).

Smithery

smithery.yaml 파일이 포함되어 있습니다. 필수 매개변수: MINDBOX_API_KEY, MINDBOX_ENDPOINT_ID.

인증 및 엔드포인트

인증 헤더: Authorization: Mindbox secretKey="...".

요청은 POST https://api.mindbox.ru/v3/operations/{sync|async}?endpointId=…&operation=…로 전송됩니다:

  • sync — 응답이 있는 작업(고객 프로필, 세그먼트, 주문 생성, 상품 목록). 기본값으로 사용됩니다.

  • async — fire-and-forget 이벤트(조회, 장바구니 추가). run_operation에서 mode: "async"로 사용할 수 있습니다.

작업의 시스템 이름(operation)은 각 Mindbox 프로젝트에서 설정됩니다 — 보편적인 내장 메서드가 아닙니다. Website.GetCustomerInfo 같은 기본값은 흔한 관례일 뿐입니다. 프로젝트 관리자가 동일한 시스템 이름으로 작업을 생성해야 하며, 그렇지 않으면 Mindbox가 ProtocolError를 반환합니다.

환경 변수

변수

필수

설명

MINDBOX_API_KEY

예

Mindbox API 비밀 키(MINDBOX_SECRET_KEY도 허용)

MINDBOX_ENDPOINT_ID

예

통합 지점 ID(endpointId)

PORT

아니요

HTTP 서버 포트(기본값 3000)

HOST

아니요

HTTP 바인딩 호스트(기본값 127.0.0.1)

MINDBOX_HTTP_TOKEN

아니요

/mcp 보호용 Bearer 토큰(설정된 경우 요청에 필수)

MINDBOX_HTTP_ALLOWED_HOSTS

아니요

DNS-rebinding 보호를 위한 추가 허용 Host(쉼표로 구분)

MINDBOX_HTTP_ALLOWED_ORIGINS

아니요

추가 허용 Origin(쉼표로 구분)

MINDBOX_ALLOW_RAW

아니요

0/false/off/no는 run_operation을 비활성화합니다

MINDBOX_MAX_RETRIES

아니요

429/5xx/타임아웃 시 재시도 횟수(기본값 3)

MINDBOX_RETRY_BASE_MS

아니요

백오프 기본 지연 시간(ms)(기본값 500)

MINDBOX_TIMEOUT_MS

아니요

단일 시도 타임아웃(ms)(기본값 15000)

도구 (6)

도구

설명

get_customer

이메일/전화번호/ID로 고객 프로필 조회

create_order

고객 연동 주문 생성

get_segments

고객 세그먼트 조회

get_product_list

상품 목록 조회

update_customer

고객 프로필 업데이트

run_operation

⚠️ 임의의 Mindbox API 작업 실행(보안 참조)

보안

  • **run_operation**은 비밀 키로 임의의 Mindbox 작업을 실행하며 데이터를 변경할 수 있습니다. 신뢰할 수 없는 에이전트 시나리오에서는 prompt-injection 벡터가 될 수 있습니다. 호출은 stderr에 기록됩니다. 완전히 비활성화하려면 MINDBOX_ALLOW_RAW=0을 설정하세요.

  • HTTP 전송에는 선택적 MINDBOX_HTTP_TOKEN 외에 내장 인증이 없습니다. 서버는 기본적으로 127.0.0.1에서 수신하며, DNS-rebinding 보호(Host/Origin 검증)가 활성화되어 있고, CORS *는 /health에서만 허용됩니다. 원격 액세스의 경우 인증 리버스 프록시 뒤에 배치하고 필요 없으면 포트를 외부에 열지 마세요.

  • 비밀 키는 서버 측에서만 사용되며 브라우저에 절대 노출되어서는 안 됩니다.

Skills

스킬

설명

트리거

skill-customer-search

Mindbox에서 고객 검색

"Mindbox에서 고객을 찾아줘"

skill-segment-stats

세그먼트 통계

"세그먼트 통계"

요청 예시

Найди клиента с email user@example.com
Создай заказ для клиента с телефоном +7900...
Какие сегменты у клиента user@example.com?
Покажи список товаров
Обнови имя клиента с ID 12345
Выполни операцию Custom.GetData с телом {"key": "value"}

문제 해결

증상

원인 및 해결 방법

환경 변수 MINDBOX_API_KEY … 필수

MINDBOX_API_KEY/MINDBOX_ENDPOINT_ID가 설정되지 않음. 서버는 이 값 없이도 시작되어 도구 목록을 반환하지만, 모든 호출에는 키가 필요합니다.

Mindbox HTTP 401/403

secretKey 또는 endpointId가 잘못되었거나, 키에 작업 권한이 없음.

상태: ProtocolError / 작업을 찾을 수 없음

작업의 시스템 이름이 Mindbox 프로젝트에 설정되지 않음. 일치하는 systemName으로 작업을 생성하거나 올바른 operation을 전달하세요.

Mindbox: 요청 시간 초과

MINDBOX_TIMEOUT_MS(기본 15초) 초과. 서버는 이미 재시도를 수행합니다. 필요한 경우 타임아웃/재시도를 늘리세요.

HTTP 403 Invalid Host header

DNS-rebinding 보호가 작동함. MINDBOX_HTTP_ALLOWED_HOSTS에 자체 호스트를 추가하세요.

개발

npm install          # установка + сборка (prepare)
npm run dev          # stdio
npm run dev:http     # HTTP на порту 3000
npm test             # Vitest
npm run typecheck    # tsc --noEmit
npm run lint         # ESLint

CONTRIBUTING.md 참조.

라이선스

MIT

Available Tools

6 tools
create_orderB

Создание заказа в Mindbox с привязкой к клиенту.

Inputs: lines (required), order_id (required), total_price (required), operation, +3 more.

get_customerA

Получение профиля клиента из Mindbox по email, телефону или ID.

Inputs: email, phone, operation, external_id.

get_product_listC

Получение списка товаров из Mindbox.

Inputs: page, operation, page_size.

get_segmentsC

Получение сегментов клиента в Mindbox.

Inputs: email, phone, operation, external_id.

run_operationA

⚠️ ОПАСНО: выполнение ПРОИЗВОЛЬНОЙ операции Mindbox API под секретным ключом. Может изменять данные. Отключается через MINDBOX_ALLOW_RAW=0.

Inputs: operation (required), body, mode.

update_customerC

Обновление профиля клиента в Mindbox.

Inputs: email, phone, last_name, operation, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct function: customer profile retrieval/update, order creation, segments lookup, product list, and a raw operation escape hatch. No two tools seem to overlap, and the dangerous run_operation is clearly separated by its warning.

    Naming Consistency5/5

    All tools follow a consistent snake_case verb_noun pattern (get_customer, create_order, get_segments, get_product_list, update_customer, run_operation). This is predictable and easy for an agent to parse.

    Tool Count5/5

    With 6 tools, the set is well-scoped for a CRM/ecommerce integration. It covers core customer and order operations without unnecessary bloat, making it easy to navigate.

    Completeness4/5

    The set covers customer retrieval/update, order creation, segments, and products, but lacks explicit order retrieval or listing, and there is no direct customer creation. However, the run_operation tool provides a raw API fallback, mitigating some gaps, though it introduces risk.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      C
      maintenance
      MCP server for MoySklad (МойСклад) warehouse and CRM management API. 21 tools covering the full order lifecycle: products, stock, counterparties, customer orders, shipments, supplies, warehouses, organizations, reports, and webhooks.
      60
      71 npm
      10
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides comprehensive access to the Constant Contact API v3 for email marketing, campaign management, contact management, analytics, and automation through MCP tools.
      2
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables managing Kontur.Elba data through the official Public API, including organizations, bank accounts, counterparties, products, documents, invoices, and public links via MCP tools.
      4
      8 npm
      MIT