订单管理系统

一个基于微服务的订单管理系统,具有现代Web界面和智能聊天助手,适用于客户支持和订单查询场景。

  • by sarvadnya2030
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 sarvadnya2030/MCP-silicon-stack

使用说明

硅堆叠MCP服务器

基于微服务的订单管理系统,具有现代web界面和智能聊天助手。

特性

  • 🔍 按订单号或电子邮件查找订单
  • 💬 人工智能聊天界面,用于订单查询
  • 📱 响应式web界面
  • 🚀 使用MongoDB的FastAPI后端
  • 🤖 自然语言查询的LLM集成
  • 💾 基于会话的订单缓存
  • ⚡ 实时订单状态更新

入门指南

先决条件

环境变量

# MongoDB Configuration
export MCP_MONGODB_URI="your_mongodb_uri"
export MCP_DATABASE="customer_support"

# LLM Configuration
export OLLAMA_API_URL="http://localhost:11434"
export OLLAMA_MODEL="qwen3:0.6b"

# Server Configuration
export PORT=5001  # Optional, defaults to 5001

安装

  1. 克隆存储库:
git clone https://github.com/yourusername/silicon-stack-mcp-server.git
cd silicon-stack-mcp-server
  1. 创建并激活虚拟环境:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. 安装依赖项:
pip install -r requirements.txt
  1. 启动服务器:
python app.py
  1. 打开web界面:
http://localhost:5001/static/index.html

API文档

MCP工具

  1. get_order_status

    • 输入: {"order_number": "ORD-YYYY-NNN"}
    • 返回完整的订单详细信息
  2. get_order_history_by_email

    • 输入: {"email": "user@example.com", "limit": 10}
    • 返回电子邮件的订单列表

聊天界面

发布 /mcp/chat

  • 输入:
    {
      "message": "What's the total cost?",
      "context": {
        "type": "order|email",
        "order": {...} | "orders": [...]
      }
    }
    
  • 返回AI生成的订单响应

项目结构

silicon-stack-mcp-server/
├── app.py              # FastAPI server
├── assistant.py        # CLI assistant
├── mcp_client.py      # MCP client library
├── requirements.txt    # Python dependencies
├── static/            # Web interface
│   ├── index.html    # Main page
│   ├── styles.css    # Styling
│   └── app.js        # Frontend logic
└── README.md

贡献

  1. 分叉存储库
  2. 创建功能分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add some amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

许可证

此项目根据MIT许可证获得许可-有关详细信息,请参阅许可证文件。