mcpField
F
finance-portfolio-agent

finance-portfolio-agent

Local
github.com/dre1144Finance0Updated 82w ago

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

  1. 01Tinkoff Invest API integration
  2. 02Portfolio and risk analysis
  3. 03Portfolio optimization recommendations
  4. 04Market data monitoring
  5. 05Performance metric calculations

Use cases

  1. 01Reviewing portfolio risks
  2. 02Finding portfolio optimization options
  3. 03Monitoring market data
  4. 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.

mcp.json · Universal config
{
"mcpServers": {
"finance-portfolio-agent": {
"command": "docker",
"args": [
"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-agent"
],
"env": {
"SUPABASE_URL": "<SUPABASE_URL>",
"SUPABASE_SERVICE_KEY": "<SUPABASE_SERVICE_KEY>",
"ENCRYPTION_KEY": "<ENCRYPTION_KEY>",
"MCP_API_KEY": "<MCP_API_KEY>",
"MCP_API_URL": "<MCP_API_URL>",
"GITHUB_PERSONAL_ACCESS_TOKEN": "<GITHUB_PERSONAL_ACCESS_TOKEN>"
}
}
}
}
Run commanddocker 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-agent
Environment variables to set
SUPABASE_URL
SUPABASE_SERVICE_KEYSecret
ENCRYPTION_KEYSecret
MCP_API_KEYSecret
MCP_API_URL
GITHUB_PERSONAL_ACCESS_TOKENSecret

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
ocimcp/finance-portfolio-agent

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MCP Finance Agent

Model Context Protocol агент для анализа финансового портфеля и генерации рекомендаций.

Возможности

  • Интеграция с Tinkoff Invest API
  • Анализ портфеля и рисков
  • Генерация рекомендаций по оптимизации портфеля
  • Мониторинг рыночных данных
  • Расчет метрик эффективности

Установка

  1. Убедитесь, что у вас установлен Python 3.11+
  2. Установите Poetry:
curl -sSL https://install.python-poetry.org | python3 -
  1. Клонируйте репозиторий:
git clone <repository-url>
cd mcp-finance-agent
  1. Установите зависимости:
poetry install
  1. Создайте файл .env на основе .env.example:
cp .env.example .env
  1. Настройте переменные окружения в .env

Разработка

  1. Активируйте виртуальное окружение:
poetry shell
  1. Установите pre-commit хуки:
pre-commit install
  1. Запустите тесты:
pytest

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

  1. Запустите агента:
poetry run python -m src.main
  1. 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

Markdown supported

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.