About finance-portfolio-agent
A Python MCP agent for financial portfolio analysis and recommendations, aimed at portfolio managers and investors. It integrates with Tinkoff Invest API and includes market monitoring and performance metrics.
Key features
- 01Tinkoff Invest API integration
- 02Portfolio and risk analysis
- 03Portfolio optimization recommendations
- 04Market data monitoring
- 05Performance metric calculations
Use cases
- 01Reviewing portfolio risks
- 02Finding portfolio optimization options
- 03Monitoring market data
- 04Calculating investment performance metrics
MCP support
The project identifies itself as an MCP agent. Its README describes portfolio analysis and recommendation capabilities but does not specify the tools or resources exposed to MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
docker run -i --rm -e SUPABASE_URL -e SUPABASE_SERVICE_KEY -e ENCRYPTION_KEY -e MCP_API_KEY -e MCP_API_URL -e GITHUB_PERSONAL_ACCESS_TOKEN mcp/finance-portfolio-agentSUPABASE_URLSUPABASE_SERVICE_KEYSecretENCRYPTION_KEYSecretMCP_API_KEYSecretMCP_API_URLGITHUB_PERSONAL_ACCESS_TOKENSecretLocal servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
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 Finance Agent
Model Context Protocol агент для анализа финансового портфеля и генерации рекомендаций.
Возможности
- Интеграция с Tinkoff Invest API
- Анализ портфеля и рисков
- Генерация рекомендаций по оптимизации портфеля
- Мониторинг рыночных данных
- Расчет метрик эффективности
Установка
- Убедитесь, что у вас установлен Python 3.11+
- Установите Poetry:
curl -sSL https://install.python-poetry.org | python3 -
- Клонируйте репозиторий:
git clone <repository-url>
cd mcp-finance-agent
- Установите зависимости:
poetry install
- Создайте файл .env на основе .env.example:
cp .env.example .env
- Настройте переменные окружения в .env
Разработка
- Активируйте виртуальное окружение:
poetry shell
- Установите pre-commit хуки:
pre-commit install
- Запустите тесты:
pytest
Использование
- Запустите агента:
poetry run python -m src.main
- API будет доступно по адресу: http://localhost:8000
Тестирование
# Запуск всех тестов с отчетом о покрытии
pytest
# Запуск конкретного теста
pytest tests/test_specific.py
# Запуск тестов с метками
pytest -m "not integration"
Структура проекта
mcp_finance_agent/
├── src/
│ ├── agent/ # Ядро MCP агента
│ ├── services/ # Внешние сервисы
│ └── models/ # Модели данных
├── tests/ # Тесты
└── docs/ # Документация
Лицензия
MIT
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.