MCP Server

MCP Server

By DenisPr97 GitHub

-

Overview

what is MCP Server?

MCP Server is a Python-based server application that provides an API for accessing weather data, news, and exchange rates.

how to use MCP Server?

To use MCP Server, clone the repository, set up a virtual environment, install the required dependencies, and run the server. The API will be accessible at http://127.0.0.1:8000.

key features of MCP Server?

  • Provides weather information for specified cities.
  • Fetches the latest news.
  • Offers exchange rate information for USD/RUB.

use cases of MCP Server?

  1. Integrating weather data into applications.
  2. Displaying news updates on websites.
  3. Providing currency exchange information in financial apps.

FAQ from MCP Server?

  • What programming language is MCP Server built with?

MCP Server is built using Python.

  • How can I run the server?

You can run the server by executing the command uvicorn server:app --reload after setting up the environment.

  • What endpoints are available?

The available endpoints include /weather/{city}, /news, and /exchange_rate.

Content

MCP Server

Установка

git clone [https://github.com/yourusername/mcp_server.git](https://github.com/DenisPr97/MCP-Server)

cd MCP-Server-main

Установка зависимостей

pip install -r requirements.txt

Активируйте ваше виртуальное окружение:

python -m venv venv

.\venv\Scripts\activate

Установка зависимостей (внутри окружения):

pip install jinja2

pip install httpx

pip install pytest

pip install -r requirements.txt

pip install python-multipart

pip install fastapi[all]

Запуск тестов

pytest tests/

После установки зависимостей запустите сервер:

uvicorn server:app --reload

Запуск клиента (во втором окне PowerShell / Bash)

python client.py

Использование

API будет доступен по адресу:

http://127.0.0.1:8000

Введите название города в форму и получите данные о текущей погоде в выбранном городе

Вы можете проверить работоспособность API с помощью следующих эндпоинтов:

/weather/{city} — Получить погоду для города.

/news — Получить новости.

/exchange_rate — Получить курс обмена USD/RUB.

No tools information available.
No content found.