Skip to main content
Glama

Order MCP

Model Context Protocol(MCP)を使用し、Groq を利用する注文アシスタントの小さなエンドツーエンドの例です。

アーキテクチャ

Groq LLM -> MCP client -> MCP server -> REST order backend
  • src/ai-client.ts はユーザーの質問を Groq に送信し、MCP クライアントとして機能します。

  • src/index.ts は MCP サーバーであり、get_order_status ツールを stdio 経由で公開します。

  • src/backend.ts は、http://localhost:3000 で動作するサンプルの REST 注文バックエンドです。

Related MCP server: woocommerce-mcp-server

ツールの発見と呼び出し

MCP サーバーへの接続後、クライアントは listTools() を呼び出して、ツールとその JSON スキーマを発見します。クライアントはそれらの定義を Groq の関数ツールに変換し、チャットリクエストに含めます。Groq がツール呼び出しを返すと、クライアントはその名前と引数を callTool() に渡します。MCP サーバーが REST バックエンドを呼び出し、クライアントは最終的な応答のためにツールの結果を Groq に送り返します。

インストールと実行

Node.js 20 以降が必要です。

npm install

GROQ_API_KEY 環境変数で Groq API キーを指定してください。キーをソースコードに記述したり、Git にコミットしたりしないでください。

REST バックエンドを一方のターミナルで起動します:

npm run backend

次に、別のターミナルでクライアントを実行します。クライアントは自動的に起動し、MCP サーバーに接続します:

PowerShell:

$env:GROQ_API_KEY = "your-key"
npm run client

macOS/Linux:

export GROQ_API_KEY="your-key"
npm run client

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    D
    quality
    D
    maintenance
    Provides tools for AI assistants to interact with a WooCommerce store, enabling fetching recent orders with optional filtering and retrieving detailed information about specific orders by ID.
    2
    4
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables investigating delayed e-commerce orders by searching orders, retrieving order context, diagnosing delay causes, and recommending resolutions through natural language.
    4
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Shreerang4/order-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server