Shopping-Cart-MCP-Server

pratap-rahul15/Shopping-Cart-MCP-Server

3.1

If you are the rightful owner of Shopping-Cart-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 henry@mcphub.com.

The Shopping Cart MCP Server is a backend service built with Java (Spring Boot) that integrates with Claude Desktop using the Model Context Protocol (MCP) to manage a shopping cart system.

image

🛒 Shopping Cart MCP Server (Spring Boot + Claude Desktop + MongoDB)

A Shopping Cart MCP Server built with Java (Spring Boot) and integrated with Claude Desktop using the Model Context Protocol (MCP). This project demonstrates how AI-powered tools like Claude can interact with the backend seamlessly.

✨ Project Overview

->Backend service to manage a shopping cart system.

->Exposes endpoints through Spring Boot REST APIs.

->Integrated with Claude Desktop via MCP, enabling AI-assisted workflows.

->Uses MongoDB as the database for persistence.

->Implements basic shopping cart operations like adding, removing, and retrieving products.

🪓 Tech Stack

Java 17

Spring Boot

Claude Desktop (AI-assisted interface)

Model Context Protocol (MCP)

MongoDB

🔧 Features & Exposed Tools

✔️ addToCart → Add product to cart

✔️ removeCart → Remove product from cart

✔️ getCart → Get products from cart

✔️ getCartTotal → Get total price of items in cart

🖥️ Architecture

📌 Client (Prompt) → User query (AI-assisted)

📌 Claude Desktop → Interprets intent and entities

📌 MCP Server (Spring Boot) → Executes business logic

📌 MongoDB → Stores cart and product details

🚀 Getting Started

  1. Clone the Repository
git clone https://github.com/your-username/shopping-cart-mcp-server.git
cd shopping-cart-mcp-server

  1. Configure MongoDB connection in application.properties

  2. Build and run the Spring Boot server

mvn spring-boot:run
  1. Integrate with Claude Desktop by registering the MCP server in its claude_desktop_config.json file You can find this in the Developer section of the Claude Desktop.

  2. 🌟 Author

Made with ❤️ by Rahul Singh