π Memory Data Server (MCP Tool Provider)
A lightweight Model Context Protocol (MCP) server built with Python and FastMCP. This service acts as a specialized tool provider that enables LLMs and Agentic AI systems (like LangChain or Claude Desktop) to securely inspect and retrieve customer support records from an in-memory datastore via Server-Sent Events (SSE).
π Features
- Standardized MCP Interface: Exposes backend capabilities via the open Model Context Protocol.
- SSE Transport: Listens on HTTP via Server-Sent Events for real-time remote procedure calls (RPC).
- Structured Tool Capabilities: Exposes deterministic data querying functions (
fetch_customer_ticket) with typed parameters.
π System Architecture
βββββββββββββββββββββββββββ SSE (Port 8000) βββββββββββββββββββββββββββββββββ AI Agent / LLM Host β ββββββββββββββββββββββββββββββββΊ β FastMCP Server ββ (LangChain / Claude) β ββββββββββββββββββββββββββββββββ β (Memory data Server) ββββββββββββββββββββββββββββ ββββββββββββββββ¬ββββββββββββββββββΌβββββββββββββββββββββββ In-Memory DB Lookupβββββββββββββββββββββββ
π Tech Stack
- Language: Python 3.10+
- Framework:
mcp(FastMCP) - Transport: SSE (Server-Sent Events) over HTTP
π Getting Started
1. Prerequisites
Ensure you have Python installed and the required dependencies:
pip install mcp
2.Running the Server
Execute the script directly to start the FastMCP SSE server listening on 0.0.0.0:8000:
python server.py
The server will start and wait for incoming SSE connections on port 8000.
π Available Toolsfetch_customer_ticketPerforms an in-memory lookup for customer support tickets using a numeric ticket_id.
Parameters:
ticket_id (int, required): The unique integer identifier of the target ticket.
Returns:
str: Formatted string containing user details, reported issue, and customer tier (or a formatted error message if not found).
π LicenseMIT License. Free to use and modify for personal or commercial projects.