Skip to main content
Glama
sachnaror

MCP Restaurant Ordering API Server

by sachnaror

🍽️ 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.

Related MCP server: Food Delivery MCP Server

πŸ“ 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

# 1. Clone the repo
git clone https://github.com/sachnaror/restaurant-mcp-server.git
cd restaurant-mcp-server

# 2. Setup environment
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

# 3. Add secrets to `.env`
echo "SECRET_KEY=your_django_secret_key" > .env
echo "DEBUG=True" >> .env

# 4. Run DB & server
python manage.py migrate
python manage.py runserver

πŸ§ͺ Example Usage (cURL)


# Create a new order
curl -X POST http://localhost:8000/api/orders/ \
     -H "Content-Type: application/json" \
     -d '{"item_name": "Biryani", "status": "success"}'

# Get recent orders in last 2 hours
curl http://localhost:8000/api/orders/recent/?hours=2

πŸ”Œ API Endpoints

Base URL: http://localhost:8000/api/

Method

Endpoint

Description

Sample Payload

POST

/api/orders/

πŸ“ Place a new order

{ "item_name": "Pizza", "status": "success" }

GET

/api/orders/

πŸ“‹ List all orders

–

GET

/api/orders/{id}/

πŸ” Get single order by ID

–

PUT

/api/orders/{id}/

✏️ Update an order

{ "item_name": "Burger", "status": "failed" }

DELETE

/api/orders/{id}/

πŸ—‘οΈ Delete an order

–

GET

/api/orders/recent/?hours=2

⏱️ Get orders from last 2 hours

–


🧠 Tech Stack

  • 🐍 Python 3.11+

  • 🧱 Django 5.x

  • 🌐 Django REST Framework

  • πŸ“ SQLite (Dev DB)

  • πŸ“¦ python-dotenv


🏁 Roadmap (Ideas)

  • πŸ” Token-based user authentication (optional)

  • πŸ“Š Dashboard for order analytics

  • πŸ“₯ Webhook or async order processing simulation

  • 🧠 OpenAI GPT integration for dynamic menu or chat


πŸ“Έ Screenshots


πŸ“© Contact

Name

Details

πŸ‘¨β€πŸ’» Developer

Sachin Arora

πŸ“§ Email

sachnaror@gmail.com

πŸ“ Location

Noida, India

πŸ“‚ GitHub

github.com/sachnaror

🌐 Website

https://about.me/sachin-arora

πŸ“± Phone

+91 9560330483


Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server and app that enables users to browse restaurants, view menus, manage shopping carts, and place food orders with live status tracking. It serves as a reference implementation for MCP Apps SDK patterns like tool visibility, lifecycle hooks, and structured content.
    -
  • A
    license
    A
    quality
    C
    maintenance
    An unofficial Model Context Protocol server for the efood.gr consumer app API that lets you discover restaurants, browse menus, build a cart, and place real orders on efood.gr.
    12
    1
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    MCP server for operating a fictional restaurant, providing tools to consult the menu, manage active orders, view shift summaries, update dish availability, and advance order statuses. Includes a playground that teaches JSON-RPC by showing live protocol interactions.
    1
    -