Overview
What is MCP Server?
MCP Server is a FastAPI-based server that provides weather, news, and exchange rate data via HTTP endpoints. It is intended for developers who want to retrieve current weather for a given city, fetch news, or get the USD/RUB exchange rate through a simple API.
How to use MCP Server?
Clone the repository, create and activate a Python virtual environment, install dependencies from requirements.txt, then start the server with uvicorn server:app --reload. The API becomes available at http://127.0.0.1:8000. In a separate terminal, run python client.py to interact with the server. You can also test the API directly using the endpoints /weather/{city}, /news, and /exchange_rate.
Key features of MCP Server
- Provides weather data for any city via
/weather/{city}endpoint. - Returns current news headlines via
/newsendpoint. - Returns current USD/RUB exchange rate via
/exchange_rateendpoint. - Includes a client script (
client.py) for easy interaction. - Built with FastAPI and supports hot-reload during development.
Use cases of MCP Server
- Get real-time weather for a city by entering its name in the web form.
- Fetch a quick list of latest news stories programmatically.
- Check the current USD to RUB exchange rate for currency conversion tasks.
FAQ from MCP Server
What data does MCP Server provide?
The server provides three types of data: current weather for a specified city, latest news headlines, and the current USD/RUB exchange rate.
How do I install and run MCP Server?
Clone the repository, create a Python virtual environment, install dependencies with pip install -r requirements.txt, then start the server with uvicorn server:app --reload. The server runs on http://127.0.0.1:8000.
Do I need any external API keys to use MCP Server?
The README does not mention any API keys or external services; all required packages are listed in requirements.txt.
Where does the data come from?
The README does not specify the data sources for weather, news, or exchange rates.
What are the runtime requirements?
The server requires Python and the packages listed in requirements.txt (e.g., FastAPI, httpx, jinja2, etc.). It runs locally and communicates over HTTP.