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
- Clone the repository and set up a virtual environment.
- Install the FastMCP library.
- 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
andsse
protocols, configurable in themcp.run()
call.