Overview
What is MCP Server?
MCP Server is a lightweight API server that provides three practical data services: the current US dollar exchange rate, a weather forecast for any city, and a weekly news summary. It is designed for developers who need a simple, self-hosted backend to integrate these data points into their applications or MCP clients.
How to use MCP Server?
Install Python 3.x and the required libraries (Flask, Requests, Feedparser, pytest). Clone the repository, run pip install -r requirements.txt, then start the server with python main.py. The server listens on http://127.0.0.1:5000. Use HTTP GET requests to the endpoints /rate, /weather/<city>, and /news to retrieve the corresponding data.
Key features of MCP Server
- Fetches the current US dollar exchange rate.
- Provides current temperature for any city.
- Delivers a summary of the last week’s news.
- Simple REST API with three endpoints.
- Easy to test with curl or Postman.
Use cases of MCP Server
- Check the latest dollar rate for currency conversion apps.
- Get real-time weather for a city in a travel dashboard.
- Pull a quick news roundup for a morning briefing tool.
- Serve as a lightweight backend for prototyping an MCP-enabled client.
FAQ from MCP Server
What programming language and dependencies are required?
Python 3.x is required, along with Flask, Requests, and Feedparser libraries (listed in requirements.txt).
How do I start the server?
Clone the repository, install dependencies with pip install -r requirements.txt, then run python main.py. The server runs on http://127.0.0.1:5000.
How can I test the endpoints?
Use curl or Postman. For example, curl http://127.0.0.1:5000/rate returns the dollar rate, curl http://127.0.0.1:5000/weather/Moscow returns Moscow’s weather, and curl http://127.0.0.1:5000/news returns the news summary.
Is there a built-in test suite?
Yes. Run pytest from the project root to execute the tests.
Does the server require authentication or use a specific transport?
No authentication is mentioned; it uses plain HTTP on port 5000 with standard REST endpoints.