模型上下文协议(MCP)服务器
一个用于风险投资运营的智能自动化系统,可以简化交易流程、市场情报和投资分析。
特性
1.交易流管理
- 自动电子邮件处理
- 解析入站交易流电子邮件 - 提取公司信息、融资阶段和团队详细信息 - 识别热情的介绍 - 按部门对机会进行分类
- 流水线结构
- 与Affinity CRM集成 - 维护公司和创始人的结构化数据 - 跟踪关系历史和互动背景
2.市场情报
- 实时监控
- 跨目标行业的新闻聚合 - 社交媒体趋势分析 - 资金轮次跟踪 - 竞争对手分析
- 趋势分析
- 行业势头跟踪 - 投资模式分析 - 新兴技术识别 - 市场定位评估
3.投资分析
- 公司评分
- 多因素评价框架 - 团队评估 - 模式分析 - 技术评估 - 影响/ESG评分
- 尽职调查支持
- 自动化研究汇编 - 竞争格局分析 - 市场规模验证 - 风险因素识别
4.投资组合管理
- 自动投资组合跟踪
- 公司绩效监控 - 新闻和社交媒体跟踪 - 里程碑跟踪 - 关系管理
设置
1.环境设置
创建一个 .env 具有以下配置的文件:
# Affinity Configuration
AFFINITY_API_KEY=your_affinity_api_key
AFFINITY_INCUBATORS_LIST_ID=your_incubators_list_id
AFFINITY_PORTFOLIO_LIST_ID=your_portfolio_list_id
# Email Configuration
EMAIL_SERVER=imap.gmail.com
EMAIL_ADDRESS=your_email
EMAIL_PASSWORD=your_password
# API Keys
NEWS_API_KEY=your_news_api_key
TWITTER_BEARER_TOKEN=your_twitter_token
CRUNCHBASE_API_KEY=your_crunchbase_key
# Server Configuration
PORT=80002.安装依赖项
pip install -r requirements.txt3.运行服务器
python -m uvicorn src.main:app --reloadAPI文档
交易流端点
GET /daily-dealflow:处理并返回电子邮件中的每日交易流GET /market-insights:获取市场洞察和趋势GET /company-insights/{company_name}:获取全面的公司分析
投资组合管理
GET /incubators:列出所有孵化器POST /crawl-portfolio/{incubator_name}:抓取投资组合数据GET /portfolio/{incubator_name}:获取投资组合公司数据
投资分析
POST /score-company:根据投资标准对公司进行评分GET /investment-memo/{company_name}:生成投资委员会备忘录
项目结构
.
├── src/
│ ├── crawlers/ # Web crawling modules
│ ├── data_processing/ # Email and market data processing
│ ├── models/ # Scoring and evaluation models
│ ├── schemas/ # Data models and schemas
│ └── utils/ # Helper functions and clients
├── data/ # Storage for CSV files
├── tests/ # Test cases
└── config/ # Configuration files配置
该系统可通过以下方式进行高度配置 config/config.py,包括:
- 行业关键字和分类
- 投资标准权重
- 团队评估参数
- 市场情报设置
- 交易流处理规则
测试
搭建测试环境
pip install -U pytest运行测试
# Run all tests
pytest
# Run tests with verbose output
pytest -v
# Run tests in a specific directory
pytest tests/
# Run a specific test file
pytest tests/test_email_processor.py
# Run tests matching a specific pattern
pytest -k "email or market"测试结构
tests/
├── conftest.py # Shared test fixtures
├── test_email_processor.py # Email processing tests
├── test_market_intel.py # Market intelligence tests
├── test_scoring.py # Company scoring tests
└── test_portfolio.py # Portfolio management tests写作测试
每个测试文件都应遵循以下约定:
- 使用描述性测试名称
test_前缀 - 班级中的小组相关测试
Test前缀 - 使用夹具进行常见设置
- 模拟外部API调用
- 包括阳性和阴性测试用例
例子:
def test_email_processing_warm_intro():
processor = EmailProcessor()
email_content = "I wanted to introduce you to..."
result = processor._is_warm_intro(email_content)
assert result == True安全说明
- 将所有API密钥和凭据安全地存储在
.env - 切勿将敏感凭据提交到版本控制
- 对API终结点使用适当的访问控制
- 定期轮换API密钥和证书
- 监控API使用情况并实施速率限制
贡献
- 分叉存储库
- 创建要素分支
- 提交您的更改
- 推到分支
- 创建拉取请求
许可证
MIT许可证-有关详细信息,请参阅许可证文件
