mcp-sse-demo logo

mcp-sse-demo

by cnych

This project demonstrates how to develop an MCP (Model Context Protocol) service using SSE (Server-Sent Events) for real-time communication. It provides a smart shopping assistant with features like product information, inventory management, and order processing.

View on GitHub

Last updated: N/A

What is mcp-sse-demo?

This is a demonstration of an MCP server that uses SSE to expose product and order microservices to an LLM, enabling it to act as a smart shopping assistant. It includes a product microservice, an order microservice, an MCP SSE server, and an MCP client.

How to use mcp-sse-demo?

The project involves setting up product and order microservices with API endpoints, configuring an MCP SSE server to expose these services as tools, and then using an MCP client (either command-line or web-based) to connect to the server and interact with the LLM. The client sends user queries, the LLM decides which tools to use, the client calls the tools, and the results are sent back to the LLM to generate a final response.

Key features of mcp-sse-demo

  • Real-time product information and inventory access

  • Product recommendations based on preferences and availability

  • Integration with microservices via MCP tools

  • Order creation and processing

  • Real-time inventory updates

  • Natural language query support for order analysis

Use cases of mcp-sse-demo

  • Building a smart shopping assistant that can answer product questions and process orders.

  • Integrating an AI assistant with existing microservices to provide real-time data access.

  • Creating a conversational interface for managing inventory and orders.

  • Developing a tool for analyzing order trends and customer behavior.

FAQ from mcp-sse-demo

What is MCP?

MCP (Model Context Protocol) is a protocol that enables communication between LLMs and external tools or services.

What is SSE?

SSE (Server-Sent Events) is a server push technology that allows a server to send updates to a client in real-time.

What microservices are used in this demo?

The demo uses a product microservice and an order microservice to simulate a real-world e-commerce environment.

How does the LLM interact with the microservices?

The LLM uses MCP tools exposed by the MCP SSE server to access data and perform actions on the microservices.

What are the advantages of using SSE for real-time updates?

SSE is more efficient than continuous polling because it only sends updates when data changes, reducing network traffic and server load.