food_delivery_mcp
Local Model Context Protocol Server for a Food Delivery Application
claude mcp add --transport stdio gonzalo-cordova-pou-food_delivery_mcp python server.py \ --env ENVIRONMENT="development or production" \ --env FIREBASE_PROJECT_ID="your-firestore-project-id" \ --env FIRESTORE_CREDENTIALS="Path to Firebase service account JSON (e.g., /path/to/serviceAccount.json)"
How to use
This MCP server implements a local model context for a food delivery workflow. It exposes resources and tools that a large language model can reason about and invoke during an assistant session. Resources provide read-only context such as restaurant data and menus, while Tools perform actions like searching for restaurants, placing orders, or checking order status. To use it, start the server in your Python environment, ensure your Firestore credentials are accessible, and direct the agent to request information or actions using natural language. The agent may first query Resources to inform itself about available restaurants and menus, then decide to call Tools such as search_restaurants or place_order when a user makes a request. Remember to prompt for confirmation before executing sensitive operations like placing an order.
Capabilities include:
- Resource: View restaurant lists and menus (read-only context).
- Tool: Search for restaurants with filters (e.g., cuisine, rating).
- Tool: Place an order (creates an Order in Firestore and triggers downstream processes).
- Tool: Check order status (retrieve real-time updates for a specific order).
Use cases span browsing menus, composing orders, and tracking delivery status, with the agent orchestrating between Resources and Tools to fulfill user requests.
How to install
Prerequisites
- Python 3.12 or newer
- Git installed
- Access to a Firebase Firestore project and a service account JSON file
- Clone the repository (or download the project directory):
- git clone <repository-url>
- cd food_delivery_mcp
- Create and activate a Python virtual environment:
- python -m venv .venv
- source .venv/bin/activate (on Windows use .venv\Scripts\activate)
- Install dependencies:
- pip install -r requirements.txt
- Provide Firestore credentials:
- Place your service account JSON file somewhere secure, for example: /path/to/serviceAccount.json
- Export the path or point your config to it via FIRESTORE_CREDENTIALS as shown in the mcp_config
- Run the MCP server:
- python server.py
- Optional: Use a different entrypoint if you package the server differently; ensure the command and path in mcp_config match how you launch the server.
Additional notes
Notes and tips:
- Ensure the Firebase service account has the appropriate Firestore permissions for read/write access.
- Keep sensitive credentials out of version control; use environment variables or a secured secrets manager.
- When calling sensitive Tools (like place_order), consider implementing user confirmation prompts in the host application before execution.
- The server exposes both Resources (read-only data) and Tools (actions with side effects). Use Resources to surface context and Tools for user-driven actions.
- If you modify data models or the Firestore schema, update the corresponding data_models.py and db/firestore_client.py to keep behavior consistent.
- For debugging, check server logs for tool invocation details and error messages related to Firestore access.
- If running behind a container or orchestrator, translate the mcp_config into the appropriate runtime command and map environment variables accordingly.
Related MCP Servers
mcp-playground
A Streamlit-based chat app for LLMs with plug-and-play tool support via Model Context Protocol (MCP), powered by LangChain, LangGraph, and Docker.
knowledgebase
BioContextAI Knowledgebase MCP server for biomedical agentic AI
appdog
Compose and generate effortlessly MCP servers from any OpenAPI specifications
frankfurtermcp
A MCP server for the Frankfurter API for currency exchange rates.
fastmcp-builder
A comprehensive Claude Code skill for building production-ready MCP servers using FastMCP. Includes reference guides, runnable examples, and a complete implementation with OAuth, testing, and best practices.
Cozmo
MCP server for DDL/Anki Cozmo robots using PyCozmo