Order MCP
Order MCP
Un pequeño ejemplo de extremo a extremo de un asistente de pedidos impulsado por Groq que utiliza el Model Context Protocol (MCP).
Arquitectura
Groq LLM -> MCP client -> MCP server -> REST order backendsrc/ai-client.tsenvía la pregunta del usuario a Groq y actúa como el cliente MCP.src/index.tses el servidor MCP y expone la herramientaget_order_statusa través de stdio.src/backend.tses un backend REST de pedidos de ejemplo enhttp://localhost:3000.
Related MCP server: commerce-ops-mcp
Descubrimiento y llamada de herramientas
Después de conectarse al servidor MCP, el cliente llama a listTools() para descubrir las herramientas y sus esquemas JSON. Convierte esas definiciones en herramientas de función de Groq y las incluye en la solicitud de chat. Cuando Groq devuelve una llamada a herramienta, el cliente pasa su nombre y argumentos a callTool(). El servidor MCP llama al backend REST, y el cliente envía el resultado de la herramienta de vuelta a Groq para la respuesta final.
Instalación y ejecución
Requiere Node.js 20 o posterior.
npm installProporciona una clave de API de Groq a través de la variable de entorno GROQ_API_KEY. No pongas la clave en el código fuente ni la confirmes en Git.
Inicia el backend REST en una terminal:
npm run backendLuego ejecuta el cliente en otra terminal. El cliente se inicia y se conecta al servidor MCP automáticamente:
PowerShell:
$env:GROQ_API_KEY = "your-key"
npm run clientmacOS/Linux:
export GROQ_API_KEY="your-key"
npm run clientThis server cannot be deployed
Maintenance
Related MCP Connectors
Evidence-based commerce completion checks for agents. x402 paid calls and free standard metadata.
Manage Shipday orders, drivers, driver earnings, reports from your AI assistants.
Read-only access to your Order41 wholesale data. Look up orders, carts, products, drops and contacts, with their custom tags, straight from Claude, ChatGPT or Cursor. Order41 is a B2B ordering platform for fashion and action-sports brands, their sales agencies and retail buyers. Sign in with your Order41 account; you only see what your role allows.
Search 16,000+ API operations and 95 built tools by need, then call any of them by name
1
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to verify orders in an ERP system through Supabase API, checking order existence and retrieving details.MIT
- AlicenseAqualityDmaintenanceEnables investigating delayed e-commerce orders by searching orders, retrieving order context, diagnosing delay causes, and recommending resolutions through natural language.4MIT
- FlicenseAqualityCmaintenanceProvides e-commerce customer support tools for order status, delivery, account, and policy questions, with RAG-grounded retrieval and strict authorization checks over mock data.6-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to find stale unshipped orders, retrieve order details, and mark orders as shipped by wrapping the orders REST API as MCP tools.4MIT