内容
# Storefront MCP Tool 启用 AI-Assistant
实验性打印机商店 MCP-SSE 启用的 AI 助手,支持客户查询产品库存,促进购买交易,并处理分析问题。
## 解决方案架构

## 特性
- 通过 AI/Assistant 提供客户服务,实时访问产品信息和库存水平,允许定制订单。
- 根据客户偏好和可用库存推荐产品。
- 使用 MCP tool 服务器与微服务进行实时交互。
- 在回答产品查询时检查实时库存水平。
- 通过使用产品 ID 和数量促进产品购买。
- 在订单履行后实时更新库存水平。
- 通过自然语言查询提供临时分析订单交易。
## 用例示例
### 在支持中使用 CLI AI/Assistant

### 在网页商店中使用 Web AI/Assistant

## 环境设置
```
❯ node --version
v22.14.0
❯ npm --version
10.9.2
❯ pnpm --version
10.6.5
```
## 设置 LLM 提供者
```
❯ cat .env_example
GROQ_API_KEY="Your GROQ_API_KEY"
GROQ_API_URL="https://api.groq.com/openai/v1"
> 复制到文件 .env
cp .env.examples .env
> 输入您自己的 API 密钥
```
在 MCP 客户端和服务器文件夹中重复上述步骤
## 设置 API 服务器
#### 运行微服务产品 API(端口 8082)
```
$ git clone https://github.com/minyang-chen/customer-order-mcp-ai.git
$ cd backoffice-products-api
$ npm install
$ npm run dev
```
结果日志
```
customer-order-mcp-ai/backoffice-products-api on main via v22.14.0
❯ npm run dev
> products-api@1.0.0 dev
> PORT=8082 tsx watch server.ts
Printer Store Products API Server is running on port http://localhost:8082
/products
```
#### 运行微服务订单履行 API(端口 8081)
```
$ git clone https://github.com/minyang-chen/customer-order-mcp-ai.git
$ cd backoffice-fulfillment-api
$ npm install
$ npm run dev
```
结果日志
```
❯ npm run dev
> fulfillment-api@1.0.0 dev
> PORT=8081 tsx watch server.ts
Printer Store Fulfillment API Server is running on port http://localhost:8081
/inventory
/orders
/purchase
```
## 设置 MCP 服务器
#### 运行订单 MCP 服务器(端口 8083)
```
$ git clone https://github.com/minyang-chen/customer-order-mcp-ai.git
$ cd mcp-order-server
$ npm install
$ npm run dev
```
结果日志
```
❯ npm run start
> apps@1.0.0 start
> node order-sse-server.js
Printer Store MCP SSE Server is running on http://localhost:8083/sse
/sse
/messages
```
## 设置助手
#### 运行 CLI AI/Assistant
```
$ git clone https://github.com/minyang-chen/customer-order-mcp-ai.git
$ cd mcp-store-client/sse
$ npm install
$ npm run dev
```
结果日志
```
customer-order-mcp-ai/mcp-store-client/sse on main is 📦 v1.0.0 via v22.14.0
❯ npm run client
> sse@1.0.0 client
> tsx client.ts
https://api.groq.com/openai/v1
================================================
正在检索 MCP 服务器可用工具
================================================
MCP Tools: {{
```
## 技术栈
```
LLM Provider - Groq (Qwen2.5)
AI SDK by Vercel
Nodejs / express for microservices
```
## 贡献
欢迎任何建议和改进想法。
连接信息
猜你喜欢
google-meta-ads-ga4-mcp
适用于谷歌广告、Meta 广告和 GA4 的 MCP 服务器 — 支持 ChatGPT、Claude、Cursor、n8n、Windsurf 等。...
AP2
AP2提供了代理支付协议的代码示例和演示。
clipforge
ClipForge(原『带货剪手』/ daihuo-jianshou):开源 AI 带货短视频神器——上传一张商品图,AI 自动提炼卖点 + 写种草脚本...
gpt-image-2-6-mcp-server
Use GPT Image 2.6 from Claude, Cursor and VS Code via MCP.
awesome-ai-reverse-engineering
AI 辅助逆向工程工具清单,收录 MCP、Skill、插件、Agent 与工作站,覆盖 Web、二进制、移动端、浏览器自动化和流量分析。
summer
The game engine built for AI. MCP server, CLI and skills that let any agent...