mcp-server-examples

mcp-server-examples

3.5

This project includes examples of Model Context Protocol (MCP) servers, implementing functionalities like BMI calculation and weather information retrieval.

The MCP Server Examples project demonstrates the implementation of a Model Context Protocol server with two primary functionalities: a BMI calculator and a weather information retriever. The project is structured to include a Python virtual environment, a server implementation file, and a configuration file. The server is designed to handle requests for calculating BMI based on height and weight inputs and to fetch weather information for a specified city. The project is set up to run in a development mode or be installed on platforms like Claude Desktop, showcasing the versatility and practical application of MCP technology.

Features

  • BMI Calculator: Computes BMI using height and weight inputs.
  • Weather Information Retrieval: Fetches current weather data for a specified city.
  • Python Virtual Environment: Isolates project dependencies.
  • Development and Installation Modes: Supports running in development mode or installation on platforms like Claude Desktop.

MCP Tools

  • {'calculate_bmi': 'Tool for calculating BMI using height and weight inputs.'}
  • {'fetch_weather': 'Tool for retrieving weather information for a specified city.'}

Usage with Different Platforms

development_mode

bash
# Run server in development mode
mcp dev server.py

claude_desktop_installation

bash
# Install server on Claude Desktop
mcp install server.py

Related MCP Servers

View all python servers →