Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

E Commerce Order Management Server

БесплатноНе проверен

Remote MCP server for fetching order status and checking refund eligibility, built with FastMCP, FastAPI, and MySQL.

GitHubEmbed

Описание

Remote MCP server for fetching order status and checking refund eligibility, built with FastMCP, FastAPI, and MySQL.

README

Overview

This project demonstrates how to build a Remote MCP (Model Context Protocol) Server and Client using FastAPI and FastMCP.

The MCP Server exposes tools for:

  • Fetching order status
  • Checking refund eligibility

The FastAPI Client communicates with the MCP Server and exposes REST APIs that can be consumed by external applications.


Architecture

User
  │
  ▼
FastAPI Client Service
  │
  ▼
FastMCP Client
  │
  ▼
Remote MCP Server
  │
  ▼
MySQL Database

Features

  • Remote MCP Server using FastMCP
  • FastAPI Client Service
  • MySQL Database Integration
  • Order Status Retrieval
  • Refund Eligibility Check
  • Tool-based MCP Communication
  • Clean Service-Oriented Architecture

Project Structure

MCP_SERVER/
│
├── client.py
├── server.py
├── requirements.txt
├── README.md
└── database/
    └── orders.sql

Technologies Used

  • Python
  • FastAPI
  • FastMCP
  • MySQL
  • PyMySQL
  • Uvicorn

Database Schema

orders Table

Column Type
order_id VARCHAR
customer_name VARCHAR
product_name VARCHAR
status VARCHAR
order_date DATE

Example:

CREATE TABLE orders (
    order_id VARCHAR(20) PRIMARY KEY,
    customer_name VARCHAR(100),
    product_name VARCHAR(100),
    status VARCHAR(50),
    order_date DATE
);

Installation

Clone Repository

git clone https://github.com/sourabhbagda24/MCP_SERVER.git
cd MCP_SERVER

Create Virtual Environment

python -m venv venv

Activate:

Windows

venv\Scripts\activate

Linux / Mac

source venv/bin/activate

Install Dependencies

pip install -r requirements.txt

Configure Database

Update MySQL credentials inside the server file:

orders_db = pymysql.connect(
    host="localhost",
    user="root",
    password="your_password",
    database="MCP"
)

Run MCP Server

python server.py

Server starts at:

http://localhost:8001/mcp

Run FastAPI Client

uvicorn client:app --reload --port 8000

Client API:

http://localhost:8000

Available APIs

Get Order Status

GET /order/{order_id}

Example:

GET /order/ORD001

Response:

{
  "order_id": "ORD001",
  "customer_name": "John",
  "product_name": "Laptop",
  "status": "Delivered",
  "order_date": "2026-08-01"
}

Check Refund Eligibility

GET /order/{order_id}/refund-check

Example:

GET /order/ORD001/refund-check

Response:

{
  "order_id": "ORD001",
  "eligible": true,
  "days_since_order": 2,
  "reason": "Delivered within 7 days"
}

MCP Tools

get_order_status

Returns complete order information.

Input:

{
  "order_id": "ORD001"
}

check_refund_eligibility

Checks whether an order qualifies for a refund.

Input:

{
  "order_id": "ORD001"
}

Learning Outcomes

Through this project you will learn:

  • MCP (Model Context Protocol)
  • Remote MCP Communication
  • FastMCP Tool Development
  • FastAPI Integration
  • MySQL Connectivity
  • Service-Based Architecture
  • API Development

Author

Sourabh Sharma

GitHub: https://github.com/sourabhbagda24

LinkedIn: https://www.linkedin.com/in/sourabh-sharma-90758232b


⭐ If you found this project useful, consider giving it a star.

from github.com/sourabhbagda24/MCP_SERVER

Установка E Commerce Order Management Server

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/sourabhbagda24/MCP_SERVER

FAQ

E Commerce Order Management Server MCP бесплатный?

Да, E Commerce Order Management Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для E Commerce Order Management Server?

Нет, E Commerce Order Management Server работает без API-ключей и переменных окружения.

E Commerce Order Management Server — hosted или self-hosted?

Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.

Как установить E Commerce Order Management Server в Claude Desktop, Claude Code или Cursor?

Открой E Commerce Order Management Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare E Commerce Order Management Server with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории data