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.
Potencia tu agente
Instalación del publicador. No es un endpoint de PlugMCP.
Host a copy with our keys and logs.
Aún no hay una versión empaquetada en el registro. Sigue el README del repositorio.
¿URL remota o un comando en tu máquina? En qué se diferencian las dos instalaciones
Ejecutar en PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
AbrirDel publicador
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.
Herramientas
Aún no hay lista de herramientas. Los servidores remotos la reciben tras la primera comprobación de estado.
Preguntas frecuentes
Copia en esta página la configuración stdio para Cursor, Claude Desktop, Claude Code o VS Code. Usa la instalación del publicador, no un proxy de PlugMCP.
Este registro no indica ninguna variable de entorno obligatoria.
Ifood se ejecuta localmente por stdio.
Última comprobación: 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.