██████ ███████ ██████ ██████ ███████ ███████ ██ ███████
██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ███
██████ ███████ ██████ ██████ ███ ██ ██ ███
██ ██ ██ ██ ██ ██ ███ ██ ██ ███
██ ██ ██ ██ ██ ██ ███████ ███████ ███████ ███████
Order from Rappi directly from the terminal, via REST API, or as an MCP server for Claude. Built with Bun, TypeScript, Zod, and Hono.
# From npm (requires Bun)
bun add -g rappi-cli
# Or clone and link
git clone https://github.com/camilocbarrera/rappi-cli.git
cd rappi-cli
bun install
bun linkrappi login # Opens browser — log in with your Rappi accountOr manually set your token:
rappi setup <bearer-token> [lat] [lng]# Browse
rappi search "hamburguesa" # Search products and stores
rappi restaurants 20 # List nearby restaurants
rappi store 900006505 # Store details and menu
rappi product 900006505 3522980 # Product options (toppings)
# Order
rappi add-to-cart 900006505 3522980 "McCombo" 1 "3525800"
rappi cart # View current cart
rappi tip 2000 # Set delivery tip (COP)
rappi checkout # Preview order summary
rappi place-order # Place the order!
rappi orders # Track active orders
# Account
rappi whoami # User info + Prime status
rappi addresses # List saved addresses
rappi addresses set <id> # Set delivery addressrappi server # Starts on http://localhost:3100| Method | Endpoint | Description |
|---|---|---|
| GET | /api/whoami |
User info + Prime status |
| GET | /api/search?q=pizza |
Search products and stores |
| GET | /api/restaurants?limit=20 |
Nearby restaurants |
| GET | /api/store/:id |
Store detail + menu |
| GET | /api/product/:storeId/:productId |
Product toppings |
| POST | /api/cart/add |
Add to cart |
| GET | /api/cart |
View cart |
| POST | /api/cart/recalculate |
Recalculate totals |
| POST | /api/tip |
Set tip |
| GET | /api/checkout |
Checkout preview |
| POST | /api/place-order |
Place order |
| GET | /api/orders |
Track orders |
| GET | /api/addresses |
List addresses |
| POST | /api/addresses/set |
Set address |
The Rappi CLI includes an MCP (Model Context Protocol) server that lets Claude use Rappi tools natively — no CLI commands needed.
Add .mcp.json to your project root:
{
"mcpServers": {
"rappi": {
"command": "bun",
"args": ["run", "/path/to/rappi-cli/src/mcp/index.ts"]
}
}
}Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"rappi": {
"command": "/path/to/.bun/bin/bun",
"args": ["run", "/path/to/rappi-cli/src/mcp/index.ts"]
}
}
}Use the full path to
bunfor Claude Desktop (runwhich bunto find it).
| Tool | Description |
|---|---|
whoami |
User profile + Prime status |
search |
Search products and stores |
list_restaurants |
Nearby restaurants |
get_store |
Store detail + menu |
get_product_options |
Product toppings/customization |
add_to_cart |
Add to cart with toppings and price |
get_cart |
View current cart |
checkout_preview |
Order summary with price breakdown |
set_tip |
Set delivery tip |
place_order |
Place the order |
track_orders |
Track active orders |
list_addresses |
List saved addresses |
set_address |
Set delivery address |
src/
constants.ts → URLs, headers, defaults
http.ts → Typed HTTP helpers (get/post/put)
config.ts → Config load/save with Zod validation
formatters.ts → Price formatting (COP)
schemas/ → Zod schemas (auth, address, search, store, product, cart, checkout, order)
services/ → Business logic (shared by CLI, API + MCP)
api/app.ts → Hono REST API
mcp/index.ts → MCP server (13 tools for Claude)
commands/ → CLI commands
index.ts → CLI entry point
server.ts → API server entry point
- Bun — Runtime
- TypeScript — Type safety
- Zod — Schema validation
- Hono — REST API framework
- Playwright — Browser login automation
- MCP SDK — Claude integration (13 tools)