About MCP Server
MCP Server is a Python server for querying the current US dollar exchange rate, weather forecasts, and news from the past week. It is intended for MCP clients that need these data sources in one server; API keys are configured through an environment file.
Key features
- 01Current US dollar exchange rate
- 02Weather forecasts
- 03News from the past week
- 04Python client and Docker files
Use cases
- 01Checking the current dollar rate
- 02Consulting a weather forecast
- 03Reviewing recent news
MCP support
The Python MCP server provides exchange-rate, weather, and news data to connected MCP clients. The repository also includes a client.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP Server
MCP сервер на Python, предоставляющий текущий курс доллара, прогноз погоды и новости за последнюю неделю.
Установка
-
Клонируйте репозиторий:
git clone https://github.com/Cavumnigrum/mcp_server_project.git cd mcp_server_project -
Создайте виртуальное окружение:
python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows -
Установите зависимости:
pip install -r requirements.txt -
Настройте API ключи:
- Зарегистрируйтесь на:
- exchangerate-api.com для курса доллара.
- openweathermap.org для погоды.
- newsapi.org для новостей.
- Скопируйте
.env.exampleв.envи заполните своими ключами:cp .env.example .env
- Зарегистрируйтесь на:
-
Запустите сервер:
python mcp_server.pyСервер будет доступен по адресу
http://localhost:8000.
Тестирование
Запустите тесты с помощью pytest:
pytest test_mcp_server.py -v
Подключение клиента
Самописный клиент:
python mcp_client.py
- При запуске клиента есть инструкция как им пользоваться
Дополнительно
В репозитории есть docker-файлы для создания контейнеров. Порядок работы с докер-файлами:
- Убедиться, что установлены необходимые пакеты для docker и docker-compose
- Перейти в папку с проектом
cd path\to\project - Запустить docker-compose файл в двух режимах для сервера и клиента
docker-compose up -d server docker-compose run --rm client - После завершения работы можно уронить контейнеры с помощью
docker-compose down server client
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.