Agentic Support Agent MCP
自主客户支持助手(FastAPI + RAG + MCP)
一个电商支持代理,能够查询真实订单数据、基于 FAQ 通过 RAG 回答政策问题,并在无法解决问题时自主提交支持工单——所有决策都由 LLM 在工具调用循环中完成,而非硬编码的 if/else 逻辑。
这有意地选择了与普通"文档问答式 RAG 项目"不同的领域(订单查询 + 工单创建是动作,而不仅仅是检索)。如果你希望简历上有两个不同类型的项目,而不是同一个思路的重复呈现,这一点会很有用。
它展示了什么
Agentic AI:多步骤工具调用——模型可以在单次对话中按需串联
check_order_status→faq_search→create_support_ticket。FastAPI:通过 Pydantic 进行请求验证并自动生成文档的 REST 端点。
RAG:回答问题前,先对 FAQ 文档进行分块并按相关性检索。
MCP:相同的订单/工单/FAQ 工具以 MCP 服务器(
app/mcp_server.py)的形式暴露,供此 API 之外使用,例如从 Claude Desktop 调用。
Related MCP server: CommerceHub MCP
设置
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # add your GROQ_API_KEY运行
uvicorn app.main:app --reload --port 8001文档位于 http://localhost:8001/docs。
示例:完整 agentic 流程
curl -X POST http://localhost:8001/agent/chat \
-H "Content-Type: application/json" \
-d '{"message": "My order ORD1002 seems delayed and I need it urgently, my email is a@b.com. What can you do?"}'预期推理链:check_order_status(ORD1002) → 发现订单仍处于 Processing 状态 → faq_search("shipping delay") 获取政策上下文 → 判断客户需要升级 → create_support_ticket(...) → 返回工单 ID 和清晰的解释。
模拟数据
data/faq.txt—— RAG 层检索的退货/发货/取消政策。app/tools.py—— 内存中的模拟订单数据库(ORD1001、ORD1002、ORD1003)和工单存储。生产环境中可以换成真实数据库/CRM;新的函数签名保持不变。
作为 MCP 服务器运行
python -m app.mcp_server向任意 MCP 主机暴露这些工具的 faq_search、check_order_status、create_support_ticket、get_ticket_status。
面试时可以聊的亮点
*——为什么 返回结构化 dict 而不是自由文本:LLM 对结构化数据的推理更可靠,这也是同一套逻辑能同时复用到纯 REST 端点(/orders/{id})和 agent 循环的原因。
系统提示词显式告诉模型何时升级为工单、何时直接基于 FAQ/订单数据回答——这是 agent 设计中的关键决策(过度创建工单是常见的败笔,这一点值得提出来)。
max_steps防止无限的工具调用循环——这是 agent 系统中非常实际的稳定性问题。
可以继续扩展的方向
把工单/订单持久化到 Postgres 中,而不是放在内存 dict 里。
增加一个
/agent/chat的对话 ID + 存储历史记录,支持多轮客服对话。在创建工单时加入人工审核(通过 Slack webhook 升级)。
任何公网部署前,请先加上限流和 API key 鉴权。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to perform e-commerce operations including product search, budget-constrained shopping recommendations, and sustainability analysis. Includes a secure HTTP bridge with OAuth integration and observability features for production deployment.
- AlicenseCqualityDmaintenanceEnables AI agents to manage e-commerce operations across multiple platforms (Shopify, WooCommerce, Stripe, MercadoLibre) through a conversational interface.4116MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to assist sales advisors of the fictional e-commerce Velora by providing tools to search products, check stock, get order status, and handle returns.
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to browse product catalogs, search products with filters, and initiate checkouts, generating order summaries and checkout URLs.
Related MCP Connectors
Run AI customer support from your terminal: conversations, knowledge base, and chat widget.
Manage your NanoCart store from any AI agent: products, orders, coupons, subscribers, reports.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/snehaharurkar/-agentic-support-agent-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server