Market Brief
MarketBrief
自动将 40 多个数据源转化为华尔街风格的每日市场简报,并发送到您的 Telegram。
MarketBrief 是一个开源框架,用于获取实时市场数据,聚合来自 40 多个 RSS 订阅源的新闻,并使用 Claude AI 生成结构化的分析师级报告。可以将其视为您个人的彭博终端,浓缩成每日简报。
Every morning at 7:00 AM, you wake up to this in Telegram:
"Rates rise, equities capsize"
TODAY'S FOCUS:
- CPI 08:30 ET — beat eases Fed, miss reprices June cut
- Gold $3,100 support — break below = safe-haven bid fading
- Trump tariff speech 14:00 ET — new China tariffs trigger risk-off
4 analyst-grade issues with source citations...
Positioning table (OW/UW/MW)...
Categorized news digest with 30+ items...
Economic calendar with 10+ events...它解决了什么问题?
如果您是散户投资者、加密货币交易员或市场爱好者,您可能:
每天早上查看 5-10 个网站以获取市场更新
错过重要的经济数据发布
缺乏系统的方法来连接各资产类别之间的关联
希望有一位分析师为您撰写每日简报
MarketBrief 实现了这一切的自动化。 它从官方来源(美联储、SEC、FRED、欧洲央行)、市场数据提供商(雅虎财经、CoinGecko)和 40 多个新闻源中提取数据,然后使用 Claude AI 将所有内容综合成一份结构化的简报,包含特定的价格水平、来源引用和可操作的仓位建议。
Related MCP server: TickerAPI
工作原理
YOU CONFIGURE IT FETCHES
┌─────────────────────┐ ┌──────────────────────┐
│ portfolio.json │ │ Yahoo Finance │
│ - your holdings │ │ FRED (official) │
│ - interest areas │ │ CoinGecko │
│ │ │ SoSoValue (ETF) │
│ dashboard.json │ │ Frankfurter (ECB) │
│ - assets to track │ │ 40+ RSS feeds │
│ │ │ Forex Factory │
│ feeds.json │ │ MyFXBook │
│ - news sources │ └──────────┬───────────┘
└─────────┬───────────┘ │
│ │
▼ ▼
┌─────────────────────────────────────────────────────────┐
│ Claude AI (2-stage pipeline) │
│ │
│ Stage 1: Pre-flight Editorial Analysis │
│ → Identifies market regime (risk-on/off/rotation) │
│ → Groups news into narrative threads │
│ → Kills 30-50% of noise items │
│ │
│ Stage 2: Structured Report Generation │
│ → 4-issue analysis (what/reaction/contradiction/view) │
│ → Source-cited positioning table │
│ → Categorized news digest │
│ → Economic calendar with impact scoring │
└─────────────────────┬───────────────────────────────────┘
│
┌────────────┼────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Telegram │ │ Feishu │ │ Terminal │
│ (HTML+PDF)│ │ (Card) │ │ (JSON) │
└──────────┘ └──────────┘ └──────────┘没有 AI 密钥?没问题。 如果没有 ANTHROPIC_API_KEY,MarketBrief 仍然会输出一份完整的数据报告:市场快照、新闻源、经济日历——只是没有 AI 的评论部分。
快速入门
1. 克隆并安装
git clone https://github.com/yukipanpan/marketbrief.git
cd marketbrief
pip install -e .2. 配置
cp config/portfolio.example.json config/portfolio.json
cp config/dashboard.example.json config/dashboard.json
cp config/feeds.example.json config/feeds.json
cp .env.example .env编辑 .env 文件并填入您的 API 密钥:
# Required for AI analysis (skip for data-only mode)
ANTHROPIC_API_KEY="sk-ant-your-key-here"
# Optional — enhances data coverage
FRED_API_KEY="your-fred-key" # Free at https://fred.stlouisfed.org/docs/api/api_key.html
SOSOVALUE_API_KEY="your-sosovalue-key" # ETF flow data
# Optional — delivery channels
TELEGRAM_BOT_TOKEN="your-bot-token" # Create at https://t.me/BotFather
TELEGRAM_CHAT_ID="your-chat-id"3. 运行
# Data-only mode (no AI key needed, free)
marketbrief generate --no-ai
# Full AI-powered report
marketbrief generate --output json
# Fetch specific data
marketbrief fetch market # Live prices: equities, FX, commodities, crypto
marketbrief fetch news # Aggregated news from 40+ feeds
marketbrief fetch calendar # Economic calendar (Forex Factory + FRED)
marketbrief fetch crypto # BTC, ETH, SOL prices from CoinGecko
marketbrief fetch etf # BTC/ETH spot ETF flows from SoSoValue
marketbrief fetch fred # Official US economic data (CPI, GDP, NFP...)您可以自定义的内容
这是一个模板框架,而不是成品。一切设计皆可修改:
资产与投资组合 (config/portfolio.json)
跟踪您关心的任何内容。默认设置以美国市场为重点,但您可以:
{
"holdings": [
{"name": "Nikkei 225 ETF", "ticker": "EWJ", "category": "Japan Equities"},
{"name": "Copper Futures", "ticker": "HG=F", "category": "Industrial Metals"},
{"name": "Bitcoin", "ticker": "BTC-USD", "category": "Crypto"}
],
"interest_areas": ["Semiconductors", "Uranium", "Japan"],
"focus_regions": ["Japan", "US", "EU"]
}仪表板 (config/dashboard.json)
添加或删除雅虎财经支持的任何资产:
{
"equities": [
{"label": "Nikkei 225", "yf": "^N225"},
{"label": "FTSE 100", "yf": "^FTSE"},
{"label": "DAX", "yf": "^GDAXI"}
],
"crypto_ids": ["bitcoin", "ethereum", "solana", "dogecoin"]
}新闻源 (config/feeds.json)
添加任何 RSS 订阅源。按类别组织以进行智能过滤:
{
"feeds": [
{"name": "my_niche_blog", "category": "research", "url": "https://example.com/feed.xml"},
{"name": "industry_news", "category": "markets", "url": "https://industry.com/rss"}
]
}类别很重要: government(政府)和 geopolitics(地缘政治)订阅源从不截断。macro(宏观)和 ai_tech(AI 技术)订阅源会获取过去 7 天的数据(新闻则为 36 小时)。
AI 分析风格 (config/prompts/)
Claude 的提示词完全可编辑。您可以:
更改输出语言(英语、中文或混合)
调整分析问题的数量(默认:4)
修改分析师的语气(果断的卖方风格 vs 中立风格)
添加自定义分析框架
更改仓位建议选项
用例与构思
MarketBrief 是一个起点。以下是您可以利用它构建的内容:
用例 | 方法 |
个人每日简报 | 配置您的投资组合 + Telegram,设置 GitHub Actions 定时任务 |
加密货币追踪器 | 移除股票,添加 20 个加密货币订阅源,跟踪 DeFi 协议 |
宏观研究助手 | 侧重 FRED + 美联储 + 财政部订阅源,关注利率/外汇 |
团队晨会 | 推送到共享的 Telegram 频道或飞书群 |
AI 代理数据源 | 使用 MCP 服务器为任何 AI 助手提供实时市场数据 |
交易信号流水线 | 将您自己的评分逻辑添加到新闻/日历抓取器中 |
多语言简报 | 将提示词中的 |
财报季追踪器 | 添加关注财报的 RSS 订阅源,自定义日历过滤 |
MCP 服务器
MarketBrief 可以作为 MCP 服务器运行,让任何 AI 助手(Claude Desktop、Claude Code 等)直接调用市场数据工具。
pip install marketbrief[mcp]
python -m marketbrief.mcp_server添加到您的 Claude Desktop 配置 (claude_desktop_config.json) 中:
{
"mcpServers": {
"marketbrief": {
"command": "python",
"args": ["-m", "marketbrief.mcp_server"],
"env": {"FRED_API_KEY": "your-key"}
}
}
}7 个可用工具
工具 | 功能 | 需要 AI 密钥 |
| 完整的 AI 驱动简报流水线 | 是 |
| 股票、大宗商品、外汇、利率、加密货币快照 | 否 |
| 聚合 40 多个 RSS 订阅源并去重 | 否 |
| 经济日历 (Forex Factory + MyFXBook) | 否 |
| 宏观环境检测(收益率曲线、信贷、轮动) | 否 |
| 市场广度信号(上涨/下跌、移动平均线交叉) | 否 |
| BTC/ETH 现货 ETF 每日资金流向和资产管理规模 | 否 |
大多数工具无需任何 API 密钥即可工作——只有 generate_report 需要 Anthropic 密钥。
自动化交付 (GitHub Actions)
按计划运行 MarketBrief——无需服务器:
复制工作流模板:
mkdir -p .github/workflows cp workflows/morning_report.yml.template .github/workflows/morning_report.yml在您的 GitHub 仓库中添加密钥 (Settings → Secrets → Actions):
ANTHROPIC_API_KEYTELEGRAM_BOT_TOKEN+TELEGRAM_CHAT_IDFRED_API_KEY(可选)
根据您的时区调整 cron 定时计划 (参见
workflows/README.md)。推送代码——报告将自动生成并发送。
数据来源
来源 | 数据 | 成本 |
雅虎财经 | 股票、大宗商品、外汇、利率、行业 | 免费 |
Frankfurter API | 欧洲央行官方汇率 | 免费 |
CoinGecko | 加密货币价格 + 市值 | 免费 |
FRED | 美国官方经济数据 (CPI, GDP, NFP, 收益率) | 免费 (需 API 密钥) |
SoSoValue | BTC/ETH 现货 ETF 每日资金流向 + AUM | 免费 (需 API 密钥) |
Forex Factory | 包含时间和影响力的经济日历 | 免费 |
MyFXBook | 包含实际值/预测值/前值的日历 | 免费 |
40+ RSS 订阅源 | 来自美联储、SEC、CNBC、彭博、CoinDesk 等的新闻 | 免费 |
项目结构
marketbrief/
├── src/marketbrief/
│ ├── core/
│ │ ├── config.py # Unified config: JSON + env vars
│ │ ├── types.py # Pydantic models for all data
│ │ ├── analysis.py # Claude AI 2-stage pipeline
│ │ └── pipeline.py # Main orchestrator
│ ├── fetchers/ # 6 data source modules
│ ├── renderers/ # HTML, Telegram, PDF, Markdown
│ ├── delivery/ # Telegram, Feishu, stdout
│ └── skills/ # Trading analysis modules
├── config/ # Customizable JSON configs + prompts
├── mcp_server/ # MCP Server (7 tools)
├── claude_skill/ # Claude Code Skill definition
└── workflows/ # GitHub Actions templates贡献
欢迎提交 PR!以下领域特别需要贡献:
新的抓取器:添加数据源 (例如 Binance, TradingView, Alpha Vantage)
渲染器:改进 HTML/PDF 输出,添加新格式 (Slack, Discord, 电子邮件)
交易技能:移植环境检测器和广度分析器
本地化:其他语言的提示词 (日语, 韩语, 西班牙语)
测试:抓取器和分析流水线的单元测试
许可证
MIT — 随您使用。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
21 paid tools: US macro data, SEC EDGAR filings, on-chain EVM reads. Settled in USDC on Base.
Real-time news with bias scoring, live market data, and AI-powered options pricing
Real-time whale trades, Smart Money Radar, market snapshots, news sentiment, signal outcomes.
Market intelligence for AI agents. Real-time data, cross-market analysis, and regime detection.
Related MCP Servers
- AlicenseAqualityBmaintenanceResearches any company in ~10 seconds using 10 data sources. Returns structured reports with bull/bear verdict for stocks, crypto, and private companies.212AGPL 3.0
- AlicenseAqualityAmaintenancePre-computed financial market intelligence for AI agents. Stocks, crypto, and ETFs.91675MIT
- AlicenseAqualityBmaintenanceReal-time news with bias scoring, live market data, and AI-powered options pricing. 9 tools across news intelligence, media bias analysis, stock/crypto data, and meme search.9511MIT
- AlicenseNot gradedqualityDmaintenanceReal-time curated knowledge API for AI agents. Updated Mon/Wed/Fri from 31 sources covering AI/tech, startups, alternative markets, and emerging markets — no scraping or storage required.1MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yukipanpan/marketbrief'
If you have feedback or need assistance with the MCP directory API, please join our Discord server