Skip to main content
Glama
Ichibu013

Agentic Swiggy MCP Server

by Ichibu013

Agentic Swiggy MCP Server

Python LangChain LangGraph FastMCP ChromaDB

고도로 모듈화된 비결정적(non-deterministic) 에이전트 방식의 Model Context Protocol(MCP) 서버로, (Swiggy 같은) 음식 배달 도우미를 흉내 냅니다. LangGraph, FastMCP, ChromaDB로 구축된 이 서버는 지능형 ReAct 에이전트를 활용하여 작업을 동적으로 라우팅하고, 질문에 답하며, 추천을 제공하고, Human-in-the-Loop(HITL) 워크플로를 통해 음식 주문을 안전하게 실행합니다.


핵심 기능

  • 비결정적 ReAct 에이전트: 대화 맥락에 따라 어떤 도구를 사용할지 하드코딩 없이 동적으로 결정합니다.

  • Human-In-The-Loop(HITL): 주문 접수가 안전하게 가로채집니다. 에이전트는 실제 거래를 확정하기 전에 사람의 승인을 요청하기 위해 실행을 일시 중지합니다.

  • 다중 형식 RAG 수집: .json, .csv, .md, .txt, .pdf 파일을 로컬 ChromaDB 벡터 저장소에 범용적으로 파싱하는 분리된 수집 파이프라인입니다.

  • 맥락 기반 추천: 사용자의 현재 지리적 위치와 시간대를 기준으로 평가된 상위 3개 음식 항목을 동적으로 추천합니다.

  • Model Context Protocol(MCP): 에이전트의 기능을 표준화된 MCP 도구로 노출하여, 최신 LLM 클라이언트(예: Claude Desktop)에서 발견하고 사용할 수 있게 합니다.

  • 100% 로컬 임베딩: HuggingFace sentence-transformers를 내장 지원하여 무료로 오프라인 벡터 임베딩을 생성합니다.


Related MCP server: Food402

프로젝트 구조

swiggy_agent/
├── data/
│   ├── restaurants_menu.json        # Restaurant catalog & timings
│   ├── order_history.json           # Past & active order records
│   ├── food_reviews.csv             # Customer reviews & sentiment
│   └── platform_policies.md         # Packaging & late-night guidelines
├── src/
│   ├── ingestion.py                 # Multi-format universal data ingestor
│   ├── tools/
│   │   ├── __init__.py
│   │   ├── order_tool.py            # Tool 1: Order Food (HITL sensitive)
│   │   ├── recommendation_tool.py   # Tool 2: Geo/Time Recommendations
│   │   ├── history_tool.py          # Tool 3: Order tracking & history
│   │   └── rag_tool.py              # Tool 4: Review retrieval RAG
│   ├── agent.py                     # Non-deterministic LangGraph agent + HITL
│   └── mcp_server.py                # FastMCP Server exposing tools
├── requirements.txt
├── .env                             # Environment variables (API Keys)
└── main.py                          # Entry point for interactive CLI testing

설치 및 설정

1. 의존성 설치

Python 3.10+가 설치어 있는지 확인하세요. 필수 패키지를 설치합니다:

pip install -r requirements.txt
# Alternatively, install manually:
pip install mcp langchain langchain-openai langchain-huggingface langchain-chroma langgraph chromadb sentence-transformers python-dotenv

2. 환경 변수 구성

루트 디렉터리에 .env 파일을 만들고 LLM API 키(예: Google Gemini, OpenAI, 또는 Groq)를 추가하세요:

# Example using Google Gemini (Recommended for free tier)
GEMINI_API_KEY=your_api_key_here

# Example using OpenAI (If applicable)
# OPENAI_API_KEY=your_api_key_here

3. 벡터 데이터베이스 초기화

에이전트를 실행하기 전에, 로컬 ChromaDB 벡터 저장소를 구축하기 위해 합성 데이터를 수집하세요:

python src/ingestion.py

사용법

옵션 1: 대화형 에이전트 데모 실행

터미널에서 LangGraph 에이전트 및 Human-in-the-Loop 주문 워크플로우를 테스트하세요:

python main.py

다음과 같은 프롬프트를 시도해 보세요: "안녕하세요, 저는 21:00에 Koramangala에 있는 USR_500입니다. 주변에 무엇이 맛있을까요? 리뷰에서 사람들이 말하는 내용을 확인하고, 평점이 괜찮다면 5th Block으로 1인분을 주문해 주세요."

옵션 2: MCP 서버 시작

도구를 MCP 호환 클라이언트(예: Claude Desktop 또는 외부 애플리케이션)에 노출하려면:

python src/mcp_server.py

도구 참조

도구 이름

설명

출력

order_food

음식 주문을 접수합니다. 사용자로부터 "yes" 승인을 요청하는 그래프 인터럽트를 발생시킵니다.

JSON 확인

get_top_3_food

locationcurrent_time을 기반으로 주변 음식점을 평가하여 최고의 음식점을 추천합니다.

JSON 배열

get_order_status_and_history

특정 사용자 ID의 활성 및 과거 주문 데이터를 검색합니다.

JSON dict

query_food_reviews_and_policies

리뷰, 메뉴 및 플랫폼 정책에 대해 RAG 의미 검색을 수행합니다.

Markdown 텍스트


라이선스

MIT License

A
license - permissive license
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

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

  • MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.

  • MCP server for AI dialogue using various LLM models via AceDataCloud

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/Ichibu013/Swiggy-Agentic-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server