MCP 金融代理是用于分析投资组合并生成优化建议的核心金融代理,它能为投资决策提供有力支持,助力用户更好地管理投资组合,降低风险,提高收益。
MCP 金融代理可以帮助你进行投资组合分析和风险评估,以下是启动它的步骤:
poetry run python -m src.main
启动后,你可以通过 API 访问地址 http://localhost:8000 来使用相关服务。
curl -sSL https://install.python-poetry.org | python3 -
git clone
cd mcp-finance-agent
poetry install
.env.example 创建 .env 文件:cp .env.example .env
poetry shell
pre-commit install
pytest
# 运行所有测试并生成覆盖率报告
pytest
# 运行特定测试文件
pytest tests/test_specific.py
# 根据标签运行测试
pytest -m "not integration"
mcp_finance_agent/
├── src/
│ ├── agent/ # MCP 代理核心模块
│ ├── services/ # 外部服务接口
│ └── models/ # 数据模型定义
├── tests/ # 测试用例集合
└── docs/ # 文档资料库
本项目采用 MIT 许可证。