Skip to main content
Glama
snehaharurkar

Agentic Support Agent MCP

Agentic Customer Support Assistant (FastAPI + RAG + MCP)

실제 주문 데이터를 조회하고, RAG를 통해 FAQ에 근거한 정책 질문에 답하며, 문제를 해결하지 못할 때 자동으로 지원 티켓을 접수하는 전자상거래 지원 에이전트입니다. 이 모든 것은 하드코딩된 if/else 로직이 아니라 도구 사용 루프에서 LLM이 결정합니다.

이 프로젝트는 의도적으로 단순한 "문서 Q&A" RAG 프로젝트와 다른 도메인입니다(주문 조회 + 티켓 생성은 단순 검색이 아니라 행동입니다). 이력서에 같은 아이디어를 두 번 넣는 대신 서로 다른 두 가지를 원한다면 유용합니다.

시연 내용

  • 에이전트 AI: 다단계 도구 사용 — 모델은 필요할 때 단일 대화에서 check_order_statusfaq_searchcreate_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에서 확인할 수 있습니다.

예시: 전체 에이전트 흐름

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_server

faq_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 키 인증 추가.

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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