MCP Server
The SMACKZ MCP Server implements the Model Context Protocol to integrate restaurant APIs with Large Language Models. It allows LLMs to browse menus, manage carts, and check restaurant hours through natural language.
Tech Stack
| Component | Technology |
|---|---|
| Runtime | Python 3.12 |
| Framework | FastMCP |
| HTTP Client | httpx |
| Validation | Pydantic |
| Gateway | Smackz-MCP-Gateway (Node.js) |
Available Tools
The MCP server exposes these tools to connected LLMs:
| Tool | API Endpoint | Description |
|---|---|---|
get_working_hours |
GET /restaurants/{id}/working-hours |
Restaurant operating hours |
get_menu_items |
GET /restaurants/{id}/menu-items |
Available menu items |
get_cart |
GET /restaurants/{id}/users/{id}/cart |
User's shopping cart |
add_cart_item |
POST /.../cart/cart-items |
Add item to cart |
update_cart_item |
PUT /.../cart-items/{id} |
Update cart item quantity |
delete_cart_item |
DELETE /.../cart-items/{id} |
Remove item from cart |
set_auth_token |
(internal) | Set bearer token for session |
Authentication
The server uses bearer token authentication. At the start of each session, the LLM user sets their auth token via the set_auth_token tool. The token is stored in memory and automatically included in all subsequent API requests. The token value is never displayed in chat responses.
Architecture
LLM Client (Claude, etc.)
|
| MCP Protocol
v
MCP Gateway (Node.js)
|
| HTTP
v
MCP Server (Python/FastMCP)
|
| HTTPS
v
Yum Backend API
The MCP Gateway handles protocol translation and routing. The MCP Server makes authenticated HTTP requests to the Yum API.
Running Locally
cd Smackz-MCP
uv sync # or: pip install -e .
python server.py # or: mcp run server.py
Default API URL: https://api.qa.smackz.co (configurable via RESTAURANT_API_URL env var).
Key Files
Smackz-MCP/server.py-- MCP server implementationSmackz-MCP/models.py-- Pydantic request/response modelsdocs/Smackz-MCP-FRD.md-- MCP integration FRD