MCP-Server-Wh-CL-FX

Vinay-kumar1234/MCP-Server-Wh-CL-FX

3.1

If you are the rightful owner of MCP-Server-Wh-CL-FX and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

This document provides a comprehensive overview of a minimal MCP server that offers weather and calculation services, along with a local testing UI.

Tools
2
Resources
0
Prompts
0

MCPServer (fixed)

A minimal MCP server exposing two tools:

  • get_weather(location: str) – fetches current weather using OpenWeatherMap
  • calculate(expression: str) – safely evaluates simple math expressions

It also includes a small Streamlit UI for local testing (no MCP client required).

Quick start (VS Code)

  1. Python 3.11 or 3.12

    • Confirm: python --version
  2. Create venv

python -m venv .venv
# Windows PowerShell
.\.venv\Scripts\Activate.ps1
# macOS/Linux
# source .venv/bin/activate
  1. Install deps
pip install -r requirements.txt
  1. Env var
    • Copy .env.example to .env and set your OpenWeather API key:
OPENWEATHER_API_KEY=YOUR_KEY_HERE
  1. Run the MCP server
python main.py
  • It will print the transport info (for streamable-http). Keep the terminal open while using an MCP client.
  1. Optional: local UI (Streamlit)
streamlit run app_ui.py
  • Use the browser UI to test weather and calculator without an MCP client.

VS Code debug

  • Hit Run and DebugPython: Run main.py to start the server.
  • Or Python: Streamlit app to start the UI.

If you don't see these, add the provided .vscode/launch.json.

Notes

  • Do not commit your .env.
  • If you copied this into an existing folder that had a .venv checked in, delete that folder and create a fresh venv.
  • The included server uses OpenWeatherMap's free "Current Weather Data" endpoint.