A Model Context Protocol (MCP) server built with Python, and fastmcp. This server provides a some practical tools for AI models, ranging from real-time weather data to financial calculations.
- 🧮 Calculator: Basic arithmetic operations (Add, Subtract, Multiply, Divide).
- 🌤️ Weather: Real-time weather forecasts using the
wttr.inAPI. - 🕒 Time: Timezone conversion and current time lookup (IANA compliant).
- 💱 Currency: Real-time exchange rates via Open Exchange Rates (Supports NGN, USD, EUR, etc.).
- 📏 Unit Converter: Physics-based unit conversions using the
pintlibrary.
- Python 3.11 or higher
uv(Python package manager)make(Optional, for running shortcuts)
-
Clone the repository:
git clone <YOUR_REPO_URL_HERE> cd <YOUR_REPO_NAME>
-
Install dependencies: This project uses
uvfor fast dependency management.make install
The easiest way to test the tools is using the built-in Makefile command, which launches the MCP Inspector.
make devAlternatively: uv run fastmcp dev main.py
Below are example inputs for testing the tools in the MCP Inspector.
Gets real-time weather data.
- Input:
{ "location": "Lagos", "location_identifier": "city" } - Response:
{"temp_C": "32", "weatherDesc": [{"value": "Sunny"}], ...}
Converts money using live market rates.
- Input:
{ "amount": 100, "from_currency": "USD", "to_currency": "NGN" } - Response:
{ "result": "165400.50 NGN", "exchange_rate": "1 USD = 1654.005 NGN" }
Converts physical quantities (e.g., length, weight, temp).
- Input:
{ "amount": 100, "from_unit": "celsius", "to_unit": "fahrenheit" } - Response:
"100 celsius = 212.0000 fahrenheit"
Converts time between timezones.
- Input:
{ "source_timezone": "UTC", "target_timezone": "Africa/Lagos", "time_string": "2026-01-10 12:00:00" } - Response:
"2026-01-10 13:00:00 WAT"
Performs basic arithmetic operations.
- Input (Example: Addition):
{ "a": 10, "b": 5, "operation": "add" } - Response:
15
- fastmcp: For MCP server architecture.
- httpx: For async API requests.
- pint: For unit conversions.
- zoneinfo: For timezone handling.
No private API keys are required!
- Weather: Uses
wttr.in(Open Source). - Currency: Uses
open.er-api.com(Open Source).