Skip to main content
Glama
smart-retail-mcp

smart-retail-mcp

🤖 Smart Retail MCP Server

Model Context Protocol (MCP) 기반의 도구 서버로, AI 에이전트에게 재고 예측 분석 기능을 제공합니다.

사용 가능한 도구

도구

설명

get_current_stock

모든 제품의 현재 재고와 공급업체 배송 시간을 가져옵니다.

get_sales_velocity

최근 N일 동안 제품별 일일 평균 판매 속도를 계산합니다.

create_ai_recommendation

재고가 다음 배송 전에 소진될 때 재입고 알림을 생성합니다.

Related MCP server: vanam-erp-mcp

아키텍처

src/
├── index.ts   → Definición e implementación de herramientas MCP (stdio transport)
├── db.ts      → Pool de conexión a PostgreSQL
└── seed.ts    → Script para insertar datos de prueba

구성

환경 변수 (.env)

DATABASE_URL=postgresql://usuario:password@localhost:5432/smart_retail

스크립트

npm start      # Ejecutar el servidor MCP
npm run dev    # Desarrollo con hot-reload (tsx watch)
npm run seed   # Insertar datos de prueba
npm run build  # Compilar TypeScript

의존성

  • @modelcontextprotocol/sdk — MCP 공식 SDK

  • pg — PostgreSQL 클라이언트

  • dotenv — 환경 변수

통신

서버는 stdio(stdin/stdout)를 통해 통신합니다. Next.js 프론트엔드는 MCP SDK의 StdioClientTransport를 사용하여 이를 자식 프로세스로 실행합니다. HTTP 포트를 노출하지 않습니다.

라이선스

ISC

Available Tools

3 tools
create_ai_recommendationA

Crea una alerta de reabastecimiento en la base de datos cuando detectas que el stock se agotará antes de que el proveedor pueda entregar.

Inputs: reason (required), product_id (required), recommended_order_qty (required).

get_current_stockA

Obtiene los niveles actuales de inventario de todos los productos y los tiempos de entrega del proveedor.

Inputs: no named parameters.

get_sales_velocityA

Calcula el promedio de ventas diarias de los productos en los últimos X días. Útil para predecir cuándo se agotará el stock.

Inputs: days (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a distinct inventory concern: current stock and lead times, sales velocity, and creating restock alerts. There is no meaningful overlap, so an agent can select the correct tool without ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern: get_current_stock, get_sales_velocity, create_ai_recommendation. The naming is predictable and clear.

    Tool Count4/5

    Three tools is at the low end, but each tool has a clear role in the inventory-alerting workflow. The count feels appropriate for a narrow purpose, though the broad server name could imply more coverage.

    Completeness2/5

    The set covers the input side well, but create_ai_recommendation is a create-only operation with no way to list, update, or delete existing recommendations. This leaves agents with a dead end for managing alert state.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      MCP server for querying inventory items and stock levels via internal API, enabling AI chatbots to look up product codes and current quantities.
      2
      -
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enterprise-grade MCP server for intelligent supply chain analytics, enabling managers to investigate forecast accuracy, vendor performance, demand trends, and root causes using natural language.
      -