硅堆叠MCP服务器
基于微服务的订单管理系统,具有现代web界面和智能聊天助手。
特性
- 🔍 按订单号或电子邮件查找订单
- 💬 人工智能聊天界面,用于订单查询
- 📱 响应式web界面
- 🚀 使用MongoDB的FastAPI后端
- 🤖 自然语言查询的LLM集成
- 💾 基于会话的订单缓存
- ⚡ 实时订单状态更新
入门指南
先决条件
- Python 3.8+
- MongoDB
- 奥拉玛 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安装
- 克隆存储库:
git clone https://github.com/yourusername/silicon-stack-mcp-server.git
cd silicon-stack-mcp-server- 创建并激活虚拟环境:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- 安装依赖项:
pip install -r requirements.txt- 启动服务器:
python app.py- 打开web界面:
http://localhost:5001/static/index.htmlAPI文档
MCP工具
get_order_status
- 输入: {"order_number": "ORD-YYYY-NNN"} - 返回完整的订单详细信息
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贡献
- 分叉存储库
- 创建功能分支(
git checkout -b feature/amazing-feature) - 提交您的更改(
git commit -m 'Add some amazing feature') - 推到分支(
git push origin feature/amazing-feature) - 打开拉取请求
许可证
此项目根据MIT许可证获得许可-有关详细信息,请参阅许可证文件。
