RehmTheGreat/foodpanda-ai-mcp

GitHub: RehmTheGreat/foodpanda-ai-mcp

一个非官方的 MCP 服务器,让 AI 助手能以自然语言查询 foodpanda 在 10 个市场的公开餐厅、菜单和价格数据。

Stars: 0 | Forks: 0

# 🐼 foodpanda-ai-mcp **问问你的 AI 助手附近有什么好吃的 —— 获取真实的答案,来自真实的菜单,基于真实的价格。** [![CI](https://static.pigsec.cn/wp-content/uploads/repos/cas/ad/ad5834178f7599af9fdda11629d49cae07f2997beec49821b2920eff5bfd50e7.svg)](https://github.com/RehmTheGreat/foodpanda-ai-mcp/actions/workflows/ci.yml) [![npm version](https://img.shields.io/npm/v/foodpanda-ai-mcp.svg)](https://www.npmjs.com/package/foodpanda-ai-mcp) [![node](https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg)](https://nodejs.org) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![MCP](https://img.shields.io/badge/MCP-1.29-blue.svg)](https://modelcontextprotocol.io) [![Tests](https://img.shields.io/badge/tests-117%20passing-success.svg)](tests/) 一个 [MCP](https://modelcontextprotocol.io) 服务器,为 Claude、ChatGPT、Cursor 以及任何 其他 MCP 客户端提供对 foodpanda 在 **10 个国家/地区**公开餐厅数据的**只读**访问权限。 **无需 API key。无需账户。无需登录。它不能订餐。**
## 目录 - [你可以问它什么](#-what-you-can-ask-it) - [安装](#-install) · [Claude Desktop](#claude-desktop) · [Claude Code](#claude-code) · [Cursor](#cursor) · [ChatGPT 及其他](#chatgpt--other-mcp-clients) - [工具](#-tools) - [支持的国家/地区](#-supported-countries) - [工作原理](#-how-it-works) - [配置](#-configuration) - [自托管与部署](#-self-hosting--deployment) - [故障排除](#-troubleshooting) - [局限性](#-known-limitations-read-this) - [开发](#-development) - [法律与道德](#-legal--ethics) ## 🍽 你可以问它什么 以下是来自实时服务器的**真实、未经编辑的摘录**(卡拉奇,2026-07-27)。
1. “目前为我配送的评分最高的地方有哪些?” ``` > Find the best rated restaurants near Clifton, Karachi 5 of 50 matching restaurants near 24.81442, 67.07164 Scanned 50 of 305 nearby restaurants · sorted by rating 1. Mondo Coffee Bar [Beverages, Tea & Coffee] 🏷 5.0★ (218) · 2.7 km · ~45 min · fee Rs.99 · min Rs.249 code: sbhg 2. Cafeela [Shakes, Pasta, Paratha] 4.9★ (15689) · 1.4 km · ~45 min · fee Rs.99 · min Rs.249 code: s8ge 3. Quetta Chai [Beverages, Pakistani, Pizza] 4.9★ (15440) · 3.8 km · ~45 min · fee Rs.99 · min Rs.249 code: w4bf ```
2. “帮我找附近最便宜的 biryani(炒饭)” ``` > What's the cheapest biryani near me? 23 matches for "biryani" across 8 restaurants near Clifton, Karachi Showing the 5 cheapest by item price + delivery fee: 1. Salad — Rs.80 (was Rs.100) · Rs.179 with delivery at Al Naz Biryani Center - Iqra University (p4rc) 4.6★ · 2.8 km · ~45 min · min Rs.249 Cucumber and onions for your biryani serving 2. Aloo Biryani — Rs.192 (was Rs.240) · Rs.291 with delivery at Al Naz Biryani Center - Iqra University (p4rc) 4.6★ · 2.8 km · ~45 min · min Rs.249 ``` 请注意,它是根据**菜品价格 + 配送费**排名的,因为最便宜的菜和最便宜的 总价通常在不同的餐厅。
3. “现在到底有没有开门的店?” ``` > Are Mondo, Cafeela and Quetta Chai open? 3 of 3 restaurants are open right now (local time 2026-07-27 11:30 (Asia/Karachi)): - Mondo Coffee Bar (sbhg): OPEN, closes 23:59 - Cafeela (s8ge): OPEN, closes 23:45 - Quetta Chai (w4bf): OPEN, closes 23:59 ```
4. “比较这三家在成本和速度上的表现” ``` > Compare them for delivery Comparing 3 restaurants in pk: Mondo Coffee Bar [Beverages, Tea & Coffee] 🏷 5.0★ (218) · 2.7 km · ~5 min · fee Rs.0 · min Rs.249 · OPEN until 23:59 code: sbhg deals: 50% off for your first food order ⇒ cheapest delivery, fastest, best rated Cafeela [Fast Food, Pasta, Pakistani] 🏷 4.9★ (15689) · 1.4 km · ~10 min · fee Rs.0 · min Rs.149 · OPEN until 23:45 code: s8ge deals: 10% off; 50% off for your first food order ⇒ lowest minimum ```
5. “在这附近我到底能吃到些什么类型的食物?” ``` > What cuisines are available near me? 32 cuisines available near 24.81442, 67.07164 (305 restaurants total): - Pakistani — 169 restaurants (id 139) - Beverages — 86 restaurants (id 89) - Western — 67 restaurants (id 151) - Desserts — 65 restaurants (id 84) - Tea & Coffee — 60 restaurants (id 240) - Biryani — 36 restaurants (id 193) ```
## 📦 安装 **你需要 [Node.js 20 或更高版本](https://nodejs.org)。** 使用 `node --version` 检查。 你**不需要** clone 这个 repo,不需要全局安装任何东西,也不需要注册任何内容。 `npx` 会按需下载并运行它。 ### Claude Desktop **1. 打开配置文件。** | OS | Path | |---|---| | **macOS** | `~/Library/Application Support/Claude/claude_desktop_config.json` | | **Windows** | `%APPDATA%\Claude\claude_desktop_config.json` | | **Linux** | `~/.config/Claude/claude_desktop_config.json` | 最快的途径:**Claude Desktop → Settings → Developer → Edit Config**。 **2. 将此内容粘贴进去。** 如果文件为空,请粘贴全部内容。如果它已经有 `mcpServers`,只需在其中添加 `foodpanda` 块即可。 ``` { "mcpServers": { "foodpanda": { "command": "npx", "args": ["-y", "foodpanda-ai-mcp"] } } } ```
Windows: 如果找不到 npx Windows 有时无法从 Claude Desktop 解析 `npx`。请改用 `cmd`: ``` { "mcpServers": { "foodpanda": { "command": "cmd", "args": ["/c", "npx", "-y", "foodpanda-ai-mcp"] } } } ```
设置巴基斯坦以外的默认国家/地区 ``` { "mcpServers": { "foodpanda": { "command": "npx", "args": ["-y", "foodpanda-ai-mcp"], "env": { "FOODPANDA_DEFAULT_MARKET": "sg" } } } } ```
**3. 完全退出并重新打开 Claude Desktop。** 仅关闭窗口是不够的 —— 必须退出应用程序。 **4. 检查是否生效。** 你应该会在聊天框中看到一个工具/插头图标。问它: *“你支持哪些 foodpanda 市场?”* ### Claude Code 一条命令: ``` claude mcp add foodpanda -- npx -y foodpanda-ai-mcp ``` 然后运行 `claude mcp list` 确认。要在每个项目中都使用它: ``` claude mcp add --scope user foodpanda -- npx -y foodpanda-ai-mcp ``` ### Cursor 在你的项目中创建 `.cursor/mcp.json`(或为所有项目创建 `~/.cursor/mcp.json`): ``` { "mcpServers": { "foodpanda": { "command": "npx", "args": ["-y", "foodpanda-ai-mcp"] } } } ``` 然后进入 **Cursor → Settings → MCP**,确认 `foodpanda` 已列出且为绿色。 ### ChatGPT 及其他 MCP 客户端 ChatGPT 的 connectors 和其他远程客户端需要一个 **HTTP URL**,而不是本地命令。 以 HTTP 模式运行服务器,并将客户端指向 `/mcp`。 在本地: ``` npx -y foodpanda-ai-mcp --http # → http://localhost:3000/mcp ``` 然后将 `http://localhost:3000/mcp` 添加为自定义 MCP/connector endpoint。要获取公共 URL, 请参阅 [自托管与部署](#-self-hosting--deployment)。
通用 stdio 配置 (Zed, Windsurf, Continue, LibreChat, …) 几乎所有客户端都接受相同的 command/args 对: ``` { "command": "npx", "args": ["-y", "foodpanda-ai-mcp"] } ```
从源码运行而不是使用 npx ``` git clone https://github.com/RehmTheGreat/foodpanda-ai-mcp.git cd foodpanda-ai-mcp npm install && npm run build ``` ``` { "mcpServers": { "foodpanda": { "command": "node", "args": ["/absolute/path/to/foodpanda-ai-mcp/dist/index.js"] } } } ``` Windows 路径需要转义反斜杠:`"C:\\Users\\you\\foodpanda-ai-mcp\\dist\\index.js"`。
## 🧰 工具 11 个工具。大多数接受 **`address`** 或 **`latitude`+`longitude`** 中的任意一种。 | 工具 | 功能 | 说明 | |---|---|---| | `search_restaurants` | 核心工具。通过评分、费用、起送价、距离、配送时间、折扣、当前营业等过滤条件查找餐厅。 | 文本匹配在本地进行 —— 参阅 [局限性](#-known-limitations-read-this) | | `get_restaurant` | 完整详情:费用、起送价、ETA、评分、优惠、每周营业时间、当前是否营业。 | 需要 `code` + `market` | | `get_menu` | 餐厅菜单及价格;按关键字或类别过滤。 | 菜单可能包含数百个条目 —— 请使用 `maxItems` | | `search_menu_items` | **跨多家餐厅搜索同一道菜**,按价格排名。 | 最慢的工具:需要为每家餐厅打开一次菜单 | | `compare_restaurants` | 并排比较费用、起送价、ETA、评分、优惠;标记最便宜/最快/评分最高者。 | 2–8 家餐厅 | | `check_open_now` | 获取最多 10 家餐厅的营业/闭店状态,以及下次开门时间。 | 使用各市场的本地时区 | | `list_cuisines` | 获取某位置附近提供的菜系,及餐厅数量。 | 返回的 id 供 `browse_by_cuisine` 使用 | | `compare_restaurants` | 按菜系过滤餐厅(服务端过滤)。 | 比文本搜索更精确 | | `find_deals` | 正在提供折扣的餐厅,优先展示最优惠的。 | 仅限餐厅促销,不包含代金券 | | `resolve_location` | 地址 → 坐标 + 所属市场。 | 使用 OpenStreetMap;无需 key | | `list_markets` | 支持的国家/地区及其货币和时区。 | 可离线运行 | **提示词:** `what_should_i_order`, `cheapest_dish_nearby`, `compare_delivery_options` **资源:** `foodpanda://markets`, `foodpanda://server-info`, `foodpanda://restaurant/{market}/{code}` 每个工具都会返回人类可读的文本**以及**经过验证的结构化 JSON。 ## 🌏 支持的国家/地区 于 2026-07-27 验证上线 —— 每个国家/地区都返回了真实的供应商**以及**可用的菜单 host。 | | 国家/地区 | 代码 | 货币 | 时区 | |---|---|---|---|---| | 🇵🇰 | 巴基斯坦 *(默认)* | `pk` | Rs. | Asia/Karachi | | 🇧🇩 | 孟加拉国 | `bd` | Tk | Asia/Dhaka | | 🇲🇾 | 马来西亚 | `my` | RM | Asia/Kuala_Lumpur | | 🇸🇬 | 新加坡 | `sg` | S$ | Asia/Singapore | | 🇵🇭 | 菲律宾 | `ph` | ₱ | Asia/Manila | | 🇹🇼 | 台湾 | `tw`
标签:GNU通用公共许可证, MCP, MITM代理, Node.js, URL抓取, 人工智能, 数据抓取, 数据接口, 暗色界面, 生活服务, 用户模式Hook绕过, 自动化攻击