Provides a demonstration of an MCP server implementation using the `http-mcp` package, exposing example tools and prompts.

소개

This project offers a practical demonstration of an MCP (Model Context Protocol) server built with the `http-mcp` Python package. It showcases how to expose custom tools and prompts to any MCP-capable client, running efficiently over both HTTP (via Starlette/Uvicorn) and standard I/O (stdio). The demo includes illustrative examples of various tools, such as retrieving weather, getting current time, accessing request context, and tracking called tools, alongside a templated prompt for generating advice. It serves as an excellent reference for developers looking to integrate AI agents with external capabilities using the MCP standard.

주요 기능

  • Offers an example prompt demonstrating dynamic content generation based on user input.
  • Exposes a variety of example tools, including data retrieval and access to incoming request context.
  • Supports both HTTP (Starlette/Uvicorn) and stdio communication modes for MCP server deployment.
  • Leverages Pydantic v2 for robust input and output validation of all exposed tool functions.
  • Includes a simple context mechanism to track session-specific tool calls.
  • 0 GitHub stars

사용 사례

  • Testing and validating MCP client configurations and interactions with a live server.
  • Demonstrating the capabilities and implementation of the Model Context Protocol (MCP).
  • Serving as a foundational example for building custom MCP servers in Python.
Advertisement

Advertisement