AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Local Ecommerce Ai Agent

mcp-tonysmm-local-ecommerce-ai-agent · by TonySMM

基于 Dify + Ollama + MCP 实现的全本地化电商客服智能体

— No reviews yet
0 installs
4 views
0.0% view→install

Install

$ agentstack add mcp-tonysmm-local-ecommerce-ai-agent

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • ✓ Prompt-injection patterns
  • ✓ Secret / credential exfiltration
  • ✓ Dangerous shell & filesystem operations
  • ✓ Untrusted network calls
  • ✓ Known-malicious package signatures

What it can access

  • ✓ Network access No
  • ✓ Filesystem access No
  • ✓ Shell / process execution No
  • ✓ Environment & secrets No
  • ✓ Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-tonysmm-local-ecommerce-ai-agent)

Reliability & compatibility

✓ Security review passed
0 installs to date
— no reviews yet
○ 8mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Local Ecommerce Ai Agent? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

全本地化电商客服智能体 (Fully Local E-commerce AI Agent)

> 核心特性:完全离线 | 数据隐私 | MCP 架构

项目简介

本项目是一个基于 Dify Chatflow 构建的电商客服系统。与传统的云端 AI 不同,本项目实现了全链路本地化部署:

  1. 模型:用 Ollama 运行 Qwen 8B (LLM) 和 Qwen-embedding 4B (Embedding),确保数据不出本地
  2. 工具:自主开发 Python MCP Server,模拟电商后台系统
  3. 数据:库存和订单数据存储于独立的两个 JSON 文件中

文件结构说明

📁 Project_Root
├── 📜 README.md              # 项目说明文档
├── 🐍 ecommerce_server.py    # MCP 服务器代码 (基于 fastmcp)
├── 📦 inventory.json         # 库存数据库 (独立数据文件)
├── 🚚 orders.json            # 订单数据库 (独立数据文件)
├── 📚 shop_knowledge.txt     # RAG 知识库源文件 (产品参数/售后/技术支持)
└── ⚙️ 电商客服智能体.yml      # Dify DSL 导出文件 (导入即可复现完整Chatflow)

技术栈与架构

  • 编排引擎: Dify (Docker Local Version)
  • 大语言模型: Qwen 8B (via Ollama)
  • 向量模型: Qwen-embedding 4B (via Ollama)
  • 工具协议: Model Context Protocol (MCP)
  • 后端开发: Python 3.10+, fastmcp 库
  • 架构模式: RAG (检索增强) + Tool Use (工具调用) + Chatflow (多轮对话)

功能场景与实现逻辑

将用户需求分发至四个核心场景:

1. 咨询 (Consulting) - [RAG + MCP]
  • 产品咨询:知识库获取产品参数信息,mcp工具实时读取数据库查询库存
  • 物流咨询:自动提取订单号,mcp工具读取数据库获取物流状态
  • 店铺政策:如退换货、售后政策
2. 投诉 (Complaint) - [RAG]
  • 基于知识库,不管有无相关内容LLM都会进行人性化回复并安抚
3. 技术支持 (Tech Support) - [Pure RAG]
  • 基于知识库的专家问答和llm本身知识,检索维修手册,解决问题
4. 闲聊模式 (Chitchat)
  • 处理非业务类对话(如打招呼),展现客服的人格化设定

启动

1. 启动模型服务 Ollama

win+r cmd输入以下命令,确保本地Ollama服务启动:

ollama run qwen:8b              # 用于对话和逻辑处理
ollama pull qwen-embedding:4b   # 用于知识库索引
2. 启动 MCP 服务器

在项目根目录下运行Python:

pip install fastmcp
python ecommerce_server.py # 启动服务 (默认端口 3002, SSE模式)

注意:保持终端窗口开启。Dify 将通过 http://host.docker.internal:3002/sse 连接此服务。

3. 部署 Dify 应用
  1. 知识库:新建知识库,上传 shop_knowledge.txt,Embedding 模型选择本地的 qwen-embedding:4b
  2. 工具配置:在 Dify 工具页 -> MCP 工具 -> 添加自定义工具,填入上面的 SSE 地址
  3. 导入 DSL:创建空白 Chatflow,导入 电商客服智能体.yml
  4. 关联资源:进入编排页面,检查 LLM 节点和知识库检索节点是否已正确关联本地模型

Created by TonySMM | 2026

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.