🍽️ MCP Restaurant Ordering API Server

by sachnaror

232 downloads
Not rated
GitHub

About

MCP API server example : where customers can order from a fun dummy restaurant menu, track order status (success/failed), and view order history. Fully RESTful, plug-and-play, and perfect for testing MCP integrations.

Details

Author
sachnaror
Downloads
232
Categories
Developer Tools

- Follows Model‑Context‑Protocol (MCP) pattern
- Simulates customer orders from a dummy menu
- Tracks order status in real time
- Provides six RESTful API endpoints
- Built with Python 3.11+, Django 5.x, and Django REST Framework
- Uses SQLite as the development database

Clone the repository, set up a Python virtual environment, install dependencies from requirements.txt, configure a SECRET_KEY and DEBUG in .env, run migrations, and start the development server with python manage.py runserver. Use cURL or any HTTP client to interact with the RESTful endpoints at http://localhost:8000/api/, for example POST /api/orders/ to place an order or GET /api/orders/recent/?hours=2 to retrieve recent orders.

🍽️ MCP Restaurant Ordering API Server

Python
Django
License
Build

Welcome to the MCP-compatible Restaurant API built with Django + Django REST Framework.

Simulate customer orders from a dummy restaurant menu and track their status in real-time .
Ideal for integration with any MCP server.

---

🧠 Why MCP Server?

We call this an MCP server because it follows the Model-Context-Protocol pattern:

- Model β†’ The Order model defines the data structure (items, status, time).
- Context β†’ Recent queries like /recent/?hours=2 give contextual insights (e.g., last 2 hours).
- Protocol β†’ RESTful APIs define a structured communication protocol.

Think of it like a food court AI assistant:

πŸ” Model = What's on the menu

⏰ Context = What's trending now

πŸ“‘ Protocol = How it communicates with you (API)

This makes it ideal for plugging into larger AI/automation pipelines where structured data, temporal context, and clean APIs matter.

πŸ“ Project Directory

β”œβ”€β”€ mcp_server/
β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”œβ”€β”€ db.sqlite3
β”‚   β”œβ”€β”€ README.md
β”‚   β”œβ”€β”€ .env
β”‚   β”œβ”€β”€ manage.py
β”‚   β”œβ”€β”€ orders/
β”‚   β”‚   β”œβ”€β”€ models.py
β”‚   β”‚   β”œβ”€β”€ serializers.py
β”‚   β”‚   β”œβ”€β”€ apps.py
β”‚   β”‚   β”œβ”€β”€ admin.py
β”‚   β”‚   β”œβ”€β”€ tests.py
β”‚   β”‚   β”œβ”€β”€ urls.py
β”‚   β”‚   └── views.py
β”‚   β”œβ”€β”€ mcp_server/
β”‚   β”‚   β”œβ”€β”€ asgi.py
β”‚   β”‚   β”œβ”€β”€ settings.py
β”‚   β”‚   β”œβ”€β”€ urls.py
β”‚   β”‚   └── wsgi.py

---

πŸš€ Quickstart

```

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.