MCP_Server_1_ite

nishantrajpoot719/MCP_Server_1_ite

3.2

If you are the rightful owner of MCP_Server_1_ite and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

This is a Python Model Context Protocol (MCP) server designed to interact with a grocery simulation database.

Tools
6
Resources
0
Prompts
0

MCP Server: Grocery Simulation

This is a Python Model Context Protocol (MCP) server exposing tools to interact with the grocery simulation database in Database/grocery_simulation.db.

Tools

  • list_products(query?, limit?, offset?, confirmation_token?): Lists available products with price/weight/unit. Confirmation required.
  • get_user_info(user_id? | phone? | email?, confirmation_token?): Returns user profile and wallet balance. Confirmation required.
  • get_order_history(user_id? | phone? | email?, start_date?, end_date?, limit?, offset?, confirmation_token?): Lists past orders with items. Confirmation required.
  • place_order(items_json, user_id? | phone? | email?, confirmation_token?): Places an order with items like [{"name": "Milk", "quantity": 2}]. Confirmation required.
  • cancel_order(user_id? | phone? | email?, order_id? | order_date? | products_json?, confirmation_token?): Cancels a not-delivered order. Confirmation required.
  • confirm(token, proceed=true): Second step to approve or cancel a pending action.

Confirmation Flow

All tools (including reads) are protected by a confirmation layer. First call returns a Token and a human-readable Summary. To proceed, call confirm with the token (or cancel). Upon confirmation, the server executes the stored action.

Setup

  1. Ensure the SQLite DB exists at Database/grocery_simulation.db. You can regenerate it by running Database/databaseCreation.py.
  2. Use Python 3.11+.
  3. Install dependencies:
    • Activate your virtualenv if desired.
    • pip install -r server/requirements.txt

Run (stdio)

  • python server/mcp_server.py

Connect from ChatGPT (MCP)

  • In ChatGPT, add a Model Context Protocol (MCP) server pointing to the command: python with args server/mcp_server.py (or the absolute path). The app will use stdio to communicate.

Notes

  • Product names must match entries in Products table exactly for ordering/cancellation by product name.
  • Cancellation is allowed only for orders where Status != 'Delivered'. Refund is recorded in Wallet as a positive RECHARGE linked to the order.
  • Wallet balance is computed as the sum of all wallet transactions for the user.