mcp_sse_sample

mcp_sse_sample

3.2

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

This is a sample MCP server implementation using Server-Sent Events (SSE) to demonstrate the capabilities of the Model Context Protocol.

The MCP SSE Sample is a demonstration project showcasing the implementation of the Model Context Protocol (MCP) using Server-Sent Events (SSE). It provides a variety of tools and features to illustrate how MCP can be utilized for different operations, including message echoing, arithmetic operations, long-running tasks, and LLM sampling. The project also includes a logging mechanism that sends random-leveled log messages every 15 seconds, providing insights into server operations. This sample is designed to help developers understand and implement MCP in their own projects, offering a practical example of how to handle different types of requests and responses using SSE.

Features

  • Echo tool for message reflection
  • Arithmetic operations with the add tool
  • Progress notifications for long-running operations
  • LLM sampling demonstration
  • Environment variable debugging

Tools

  1. echo

    Simple tool to echo back input messages

  2. add

    Adds two numbers together

  3. longRunningOperation

    Demonstrates progress notifications for long operations

  4. sampleLLM

    Demonstrates LLM sampling capability using MCP sampling feature

  5. getTinyImage

    Returns a small test image

  6. printEnv

    Prints all environment variables

  7. annotatedMessage

    Demonstrates how annotations can be used to provide metadata about content