MCP Server
Description
# MCP Server ## Установка git clone [[https://github.com/yourusername/mcp_server.git](https://github.com/DenisPr97/MCP-Server)](https://github.com/DenisPr97/MCP-Server) cd MCP-Server-main ## Установка зависимостей pip install -r requirements.txt ## Активируйте ваше виртуальное…
About
# MCP Server ## Установка git clone [[https://github.com/yourusername/mcp_server.git](https://github.com/DenisPr97/MCP-Server)](https://github.com/DenisPr97/MCP-Server) cd MCP-Server-main ## Установка зависимостей pip install -r requirements.txt ## Активируйте ваше виртуальное окружение: python -m venv venv…
Details
- Author
- DenisPr97
- Downloads
- 148
- Categories
- Other
Jump to
- Provides weather data for any city via /weather/{city} endpoint.
- Returns current news headlines via /news endpoint.
- Returns current USD/RUB exchange rate via /exchange_rate endpoint.
- Includes a client script (client.py) for easy interaction.
- Built with FastAPI and supports hot-reload during development.
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.
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 jinja2pip 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.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



