Order MCP
Order MCP
Model Context Protocol(MCP)を使用し、Groq を利用する注文アシスタントの小さなエンドツーエンドの例です。
アーキテクチャ
Groq LLM -> MCP client -> MCP server -> REST order backendsrc/ai-client.tsはユーザーの質問を Groq に送信し、MCP クライアントとして機能します。src/index.tsは MCP サーバーであり、get_order_statusツールを stdio 経由で公開します。src/backend.tsは、http://localhost:3000で動作するサンプルの REST 注文バックエンドです。
Related MCP server: commerce-ops-mcp
ツールの発見と呼び出し
MCP サーバーへの接続後、クライアントは listTools() を呼び出して、ツールとその JSON スキーマを発見します。クライアントはそれらの定義を Groq の関数ツールに変換し、チャットリクエストに含めます。Groq がツール呼び出しを返すと、クライアントはその名前と引数を callTool() に渡します。MCP サーバーが REST バックエンドを呼び出し、クライアントは最終的な応答のためにツールの結果を Groq に送り返します。
インストールと実行
Node.js 20 以降が必要です。
npm installGROQ_API_KEY 環境変数で Groq API キーを指定してください。キーをソースコードに記述したり、Git にコミットしたりしないでください。
REST バックエンドを一方のターミナルで起動します:
npm run backend次に、別のターミナルでクライアントを実行します。クライアントは自動的に起動し、MCP サーバーに接続します:
PowerShell:
$env:GROQ_API_KEY = "your-key"
npm run clientmacOS/Linux:
export GROQ_API_KEY="your-key"
npm run clientRelated MCP Connectors
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
31Turn user requests and support messages into tasks and tell users what shipped, from any AI agent.
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