mcp-server

mcp-server

2.2

This project is a tutorial for creating a simple Model Context Protocol server using the FastMCP library. It provides a range of mathematical operations and a dynamic greeting feature, accessible over MCP Inspector using SSE transport.

Overview

This project is an MCP Server tutorial repository, showcasing how to build a simple Model Context Protocol server using FastMCP. It offers various mathematical operations and a dynamic greeting resource accessible through the MCP protocol.

Features

  • Basic arithmetic operations
  • Advanced mathematical functions
  • Dynamic greeting resource

Requirements

  • Python 3.8 or higher
  • FastMCP library

Usage

  1. Clone the repository and set up a virtual environment.
  2. Install the FastMCP library.
  3. Run the server and connect using MCP Inspector via SSE transport.

Available Tools

  • Arithmetic operations like addition, subtraction, multiplication, and division
  • Functions for power, square root, cube root, factorial, logarithm, and trigonometry

Modifying the Server

  • Use decorators to add new tools and resources.

Transport Options

  • Supports stdio and sse protocols, configurable in the mcp.run() call.