Agentic Support Agent MCP
Agentic Customer Support Assistant (FastAPI + RAG + MCP)
실제 주문 데이터를 조회하고, RAG를 통해 FAQ에 근거한 정책 질문에 답하며, 문제를 해결하지 못할 때 자동으로 지원 티켓을 접수하는 전자상거래 지원 에이전트입니다. 이 모든 것은 하드코딩된 if/else 로직이 아니라 도구 사용 루프에서 LLM이 결정합니다.
이 프로젝트는 의도적으로 단순한 "문서 Q&A" RAG 프로젝트와 다른 도메인입니다(주문 조회 + 티켓 생성은 단순 검색이 아니라 행동입니다). 이력서에 같은 아이디어를 두 번 넣는 대신 서로 다른 두 가지를 원한다면 유용합니다.
시연 내용
에이전트 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: Commerce MCP Server
설정
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에서 확인할 수 있습니다.
예시: 전체 에이전트 흐름
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) → 아직 처리 중임을 확인 → 정책 맥락을 위해 faq_search("shipping delay") → 고객에게 에스컬레이션이 필요하다고 판단 → create_support_ticket(...) → 티켓 ID와 명확한 설명을 반환합니다.
모의 데이터
data/faq.txt— RAG 레이어가 검색하는 반품/배송/취소 정책.app/tools.py— 인메모리 가짜 주문 DB(ORD1001,ORD1002,ORD1003) 및 티켓 저장소. 프로덕션에서는 실제 데이터베이스/CRM으로 교체하세요. 도구 함수 시그니처는 동일하게 유지됩니다.
MCP 서버로 실행
python -m app.mcp_serverfaq_search, check_order_status, create_support_ticket, get_ticket_status를 모든 MCP 호스트에 노출합니다.
면접 포인트
도구가 자유 텍스트가 아닌 구조화된 dict를 반환하는 이유: LLM은 구조화된 데이터를 더 안정적으로 추론하며, 이를 통해 동일한 함수를 일반 REST 엔드포인트(
/orders/{id})와 에이전트 루프에서 재사용할 수 있습니다.시스템 프롬프트는 모델에게 FAQ/주문 데이터에서 답변할지, 티켓으로 에스컬레이션할지 언제 결정해야 하는지 명시적으로 알려줍니다 — 핵심 에이전트 설계 결정입니다(과도한 티켓 생성은 언급할 가치가 있는 일반적인 실패 모드입니다).
max_steps는 무한 도구 호출 루프를 방지합니다 — 에이전트 시스템에서 실제 신뢰성 문제입니다.
가능한 확장
인메모리 dict 대신 Postgres에 티켓/주문을 저장.
다중 턴 지원 채팅을 위해
/agent/chat대화 ID + 저장된 기록 추가.티켓 생성 시 인간 개입 에스컬레이션(Slack 웹훅) 추가.
공개 배포 전에 속도 제한 및 API 키 인증 추가.
This server cannot be deployed
Maintenance
Related MCP Connectors
Launch and manage online stores with AI agents: products, inventory, pricing, orders and promotions.
AI customer service: set up an AI support agent, search knowledge, look up orders, answer customers.
Hosted MCP for e-commerce: live product catalog, stock, and pricing for AI agents.
The E-commerce Marketplace For Every AI Agent. A Governed Catalog Of 600M+ US Products, Plus Four Agent Ready Capabilities Search, Price Comparison, Product-Vs-Product, And Detailed Q&A.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables AI agents to manage e-commerce operations across multiple platforms (Shopify, WooCommerce, Stripe, MercadoLibre) through a conversational interface.4121 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to browse product catalogs, search products with filters, and initiate checkouts, generating order summaries and checkout URLs.-
- FlicenseAqualityDmaintenanceProvides e-commerce customer support tools for order status, delivery, account, and policy questions, with RAG-grounded retrieval and strict authorization checks over mock data.6-
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to provide e-commerce customer service with product search, RAG-based FAQ answers, human handoff, and automated security auditing with a review workflow.-