iFood MCP Server
Unofficial Model Context Protocol server for — Brazil's largest food delivery platform. Browse restaurants, search food, manage your cart and place orders through any AI assistant that speaks MCP.
接入你的智能体
從發布者安裝。不是 PlugMCP 端點。
遠端 URL 還是本機指令? 兩種安裝方式的差異
來自發布者
Unofficial Model Context Protocol server for — Brazil's largest food delivery platform. Browse restaurants, search food, manage your cart and place orders through any AI assistant that speaks MCP.
Unofficial Model Context Protocol server for iFood — browse, search, cart and order food via AI. Two transports (stdio + HTTP/OAuth 2.1) with real iFood OTP login.
Not affiliated with iFood. Wraps the public consumer web API for personal use.
This MCP server gives AI assistants (Claude Code, Claude Desktop, Cursor, Codex, etc.) access to your iFood account. It exposes 25 tools that let an AI:
You can run either mode independently; the same tool definitions back both.
Check your install with node -v and npm -v.
git clone https://github.com/AriOliv/ifood-mcp.git
cd ifood-mcp
npm install
npm run build
# Generate a JWT signing secret (≥32 chars)
echo "MCP_JWT_SECRET=$(openssl rand -hex 32)" >> .env
echo "PORT=3001" >> .env
# Run with auto-reload
npm run dev
Then register the server with your client.
claude mcp add --transport http ifood http://localhost:3001/mcp
Run /mcp inside Claude Code → click ifood → it'll open the browser at the OTP login page. Authenticate with your iFood e‑mail and the 6‑digit code that arrives via WhatsApp/SMS/Email.
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"ifood": {
"type": "http",
"url": "http://localhost:3001/mcp"
}
}
}
Cursor will trigger the OAuth flow on first use.
codex mcp add --transport http ifood http://localhost:3001/mcp
Extract your iFood credentials from browser DevTools:
site-api requestauthorization header value (drop the Bearer prefix)aRefreshToken, aDeviceId, aSessionId and aAccountId.env:cp .env.example .env
# fill in IFOOD_ACCESS_TOKEN, IFOOD_ACCOUNT_ID, IFOOD_DEVICE_ID, IFOOD_SESSION_ID
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"ifood": {
"command": "node",
"args": ["/absolute/path/to/ifood-mcp/build/index.js"],
"env": {
"IFOOD_ACCESS_TOKEN": "eyJraWQi...",
"IFOOD_ACCOUNT_ID": "fa0ac7f3-...",
"IFOOD_DEVICE_ID": "1141f82b-...",
"IFOOD_SESSION_ID": "97fe984b-..."
}
}
}
}
claude mcp add --transport stdio ifood \
--env IFOOD_ACCESS_TOKEN=eyJraWQi... \
--env IFOOD_ACCOUNT_ID=fa0ac7f3-... \
--env IFOOD_DEVICE_ID=1141f82b-... \
--env IFOOD_SESSION_ID=97fe984b-... \
-- node /absolute/path/to/ifood-mcp/build/index.js
Once connected, ask your AI assistant:
"encontre opções de açaí perto de -23.59182, -46.648688"
"qual é o cardápio da hamburgueria mais bem avaliada na minha região?"
"liste meus 5 últimos pedidos e me mostre o status de cada um"
"crie um carrinho no Burger King com 2 Whoppers e finalize com Pix"
"me mostre as avaliações do restaurante <id> nas últimas 30 reviews"
"existe algum cupom ativo na minha carteira pra delivery agora?"
[!TIP] If a tool needs
latitude/longitudeand you don't know yours, ask the AI to callifood_addressesfirst — your saved addresses include coordinates.
┌──────────────────┐ OAuth 2.1 ┌─────────────────────┐ Bearer JWT ┌─────────────────┐
│ AI assistant │◄────────────────►│ ifood-mcp server │◄─────────────────►│ iFood API │
│ (Claude/Cursor) │ /mcp endpoint │ (Express + MCP) │ site-api / wsl. │ (consumer web) │
└──────────────────┘ └─────────────────────┘ └─────────────────┘
│
▼
┌──────────────┐
│ /login │ HTML — iFood OTP
│ (browser) │ e‑mail / SMS / WhatsApp
└──────────────┘
/mcp call creates a fresh StreamableHTTPServerTransport + McpServer bound to the authenticated user's session — handles concurrent users without sticky sessions.src/http/ifood-auth.ts: /authorization-codes → /access-tokens → /challenges → /authentications.npm run dev # http-server with auto-reload (tsx watch)
npm run dev:stdio # stdio with auto-reload
npm run build # tsc → build/
npm run typecheck # tsc --noEmit
Project layout:
src/
index.ts tool definitions + executeTool dispatcher + stdio entry
http-server.ts Express + OAuth + Streamable HTTP transport
http/
store.ts in-memory OAuth + iFood token stores
provider.ts OAuthServerProvider implementation
session-provider.ts SessionTokenProvider + background refresh loop
login-router.ts OTP login HTML pages
ifood-auth.ts chained iFood OTP HTTP client
.env, HAR files or any DevTools captures — they contain bearer tokens. The .gitignore blocks all common spots./login/paste fallback to provide tokens manually.Issues and PRs welcome. When opening an issue please include:
npm run typecheckReleased under the MIT License.
Made by Ari and Claude a.k.a Claudão.
Unofficial Model Context Protocol server for iFood — browse, search, cart and order food via AI. Two transports (stdio + HTTP/OAuth 2.1) with real iFood OTP login.
工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
Ifood 透過 stdio 在本機執行。
上次檢查時間:2026-10-28。 Unofficial Model Context Protocol server for iFood — browse, search, cart and order food via AI. Two transports (stdio + HTTP/OAuth 2.1) with real iFood OTP login.