flipkart-mcp-server

suvan2367/flipkart-mcp-server

3.1

If you are the rightful owner of flipkart-mcp-server 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.

The Flipkart Seller MCP Server is a cloud-based middleware solution that connects Flipkart Seller APIs with local services, enabling efficient management of orders, shipments, and product listings.

Flipkart Seller MCP Server

This project provides a cloud-based Model Context Protocol (MCP) server that acts as a middleware between Flipkart Seller APIs and your local services or automation tools. It facilitates authentication, order and shipment management, and product listing control with Flipkart’s APIs.

Features

Secure Authentication with Flipkart Seller API using App ID and Secret

Order Management: List, fetch details, and cancel orders

Shipment Handling: List, track, pack, dispatch shipments; generate shipping labels and invoices

Product Listings: View, filter, update inventory and prices for product listings

Return Requests: Fetch return and replacement info

Metrics & Health Endpoints: For monitoring server usage and status

Redis or In-memory Storage for token management

ExpressJS server with security, rate-limiting, and CORS configuration

Getting Started

Prerequisites

Node.js (v14+ recommended)

Flipkart Seller API credentials (App ID & App Secret)

Redis (optional, for scalable token storage)

Installation

bash

git clone https://github.com/suvan2367/flipkart-mcp-server.git

cd flipkart-mcp-server

npm install

Configuration

Create a .env file in the root directory based on .env.example. Add the following environment variables:

PORT=9093

REDIS_URL=redis://localhost:6379 (optional)

FLIPKART_API_URL=https://sandbox-api.flipkart.net

ALLOWED_ORIGINS=https://claude.ai,https://chatgpt.com,http://localhost:3000

Any relevant Flipkart app credentials

Usage

Start the server:

bash

npm start

The server exposes HTTP endpoints to handle Flipkart seller operations. Example endpoints:

Health & Status

GET /health : Health check

GET /ready : Readiness status

GET /metrics : Usage metrics

Authentication

POST /auth/authenticate : Authenticate with Flipkart (appId, appSecret, sellerId, userId)

GET /auth/status/:userId : Authentication status

POST /auth/revoke/:userId : Revoke authentication

Seller Operations

POST /flipkart/listorders : List orders (filter by date/states)

GET /flipkart/getorder/:orderId : Get order details

POST /flipkart/listshipments : List shipments (filter by states/orderIds)

GET /flipkart/getshipment/:shipmentId : Get shipment details

POST /flipkart/generatelabel : Generate shipping label

POST /flipkart/generateinvoice : Generate invoice

POST /flipkart/packshipment : Mark as packed

POST /flipkart/dispatchshipment : Mark as dispatched

POST /flipkart/cancelorder : Cancel an order item

POST /flipkart/getreturns : List returns/replacements

GET /flipkart/listlistings : List products (filter by status)

GET /flipkart/getlisting/:skuId : Product details

PATCH /flipkart/updateinventory : Update inventory

PATCH /flipkart/updateprice : Update price