FastAPI Server icon

FastAPI Server

Provides a minimalist FastAPI server implementation designed to mimic a subset of the Model Context Protocol (MCP) functionality.

Acerca de

This project offers a lightweight FastAPI server that emulates key aspects of the Model Context Protocol (MCP). It features both a straightforward RESTful echo endpoint and a robust JSON-RPC 2.0 interface. The RPC endpoint supports discovering available tools (`mcp.list_tools`) and executing them (`mcp.call_tool`), demonstrating functionality with built-in examples like `echo`, `uppercase`, `query_manse` for database interaction, and `calc_daewoon` for date calculations. Complete with Pydantic models for structured data handling, basic logging, and comprehensive tests, it serves as an excellent starting point for building or integrating with MCP-style services.

Características Principales

  • Echo-style REST endpoint returning structured responses
  • JSON-RPC 2.0 endpoint supporting tool listing and execution
  • Includes example tools for text manipulation, database query, and date calculations
  • Uses Pydantic models for request and response validation
  • Includes basic logging and pytest for comprehensive testing
  • 0 GitHub stars

Casos de Uso

  • Learning FastAPI server implementation with structured RPC and database integration patterns
  • Exposing internal Python functions or microservices via a standardized JSON-RPC API
  • Developing and testing services compatible with the Model Context Protocol