Token导航 LogoToken导航TokenDH.com
Magnificent 7 Financial Analyst MCP Server logo
搜索检索stdio官方级别未说明来源级核验

Magnificent 7 Financial Analyst MCP Server

MCP Server

一个提供对Magnificent 7科技公司年报数据进行结构化访问的MCP服务器,支持语义搜索、财务指标提取和关键事件查询。

工具数

7

提示词数

0

GitHub Stars

0

资源数

0
PythonClaude搜索Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

yxuan1996

提供方

yxuan1996

最后核验

2026/5/17 20:20

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python -m venv .venv

详细介绍

Magnificent 7金融分析师——MCP服务器

MCP(模型上下文协议) 服务器 为AI助手提供结构化的年度报告数据访问权限 华丽7 科技公司:

Ticker公司
AAPL苹果
微软
GOOGL字母表
亚马逊
NVDA英伟达
METAMETA
特斯拉

本存储库中描述了基础知识库的数据摄取

______________________________________________________________________

建筑

mcp_server/
├── main.py                  ← FastMCP app, uvicorn entrypoint, lifespan hooks
├── auth.py                  ← JWT middleware + UserContext helpers
├── config.py                ← Pydantic-settings (reads .env)
├── requirements.txt
├── .env                     ← secrets (gitignored)
├── .env.example             ← template to copy
│
├── tools/
│   ├── vector_tools.py      ← search_report_text, search_report_tables
│   ├── financial_tools.py   ← get_financial_metric, compare_*
│   ├── graph_tools.py       ← diagnostic and utility tools for Neo4j graph
│   ├── event_tools.py       ← get_key_developments
│   └── people_tools.py      ← get_key_persons
│
└── services/
    ├── pinecone_service.py  ← Pinecone index wrapper
    ├── neo4j_service.py     ← Neo4j Cypher query wrapper
    └── auth_service.py      ← (placeholder — auth removed)

知识库

存储内容
松果从10-K表格年度报告中分块的段落文本和Markdown表格。文本块带有 text 元数据密钥;桌块携带 table_markdown 钥匙。
Neo4j结构化财务事实(Company → Document → FiscalYear → Fact → Metric)、关键人物和从年度报告中提取的关键发展。

______________________________________________________________________

设置

1.克隆并安装依赖项

python -m venv .venv
source .venv/bin/activate          # Windows: .venv\Scripts\activate
pip install -r requirements.txt

2.配置机密

cp .env.example .env
# Edit .env with your real credentials

3.运行服务器

# Development — run directly
fastmcp run mcp_server/main.py

服务器启动于 http://localhost:8000 默认情况下。

4.健康检查

curl http://localhost:8000/health
# {"status": "ok", "server": "mag7-financial-analyst"}

______________________________________________________________________

连接MCP客户端

克劳德桌面/Claude.ai

将服务器添加到MCP配置文件中(通常 ~/.config/claude/claude_desktop_config.json 在macOS/Linux上):

{
  "mcpServers": {
    "mag7-analyst": {
      "url": "http://localhost:8000"
    }
  }
}

程序化(Python——FastMCP客户端)

from fastmcp import Client

async with Client("http://localhost:8000") as client:
    tools = await client.list_tools()
    result = await client.call_tool("get_financial_metric", {
        "ticker": "AAPL",
        "metric_name": "Revenue",
        "fiscal_year": 2023,
    })

卷曲

curl http://localhost:8000/health

______________________________________________________________________

可用工具

矢量搜索工具

search_report_text

语义搜索结束 段落文本 在年度报告中。

参数类型必填说明
querystring自然语言问题
tickersstring\[\]默认为所有允许的股票代码
top_kint返回的结果(1-20,默认值5)
fiscal_yearint筛选到特定年份

示例提示: *“苹果对其服务收入战略有何看法?”*

______________________________________________________________________

search_report_tables

语义搜索结束 Markdown格式的表格 在年度报告中。

参数类型必填说明
querystring自然语言问题
tickersstring\[\]默认为所有允许的股票代码
top_kint返回的结果(1-20,默认值5)
fiscal_yearint筛选到特定年份

示例提示: *“查找微软2023年的细分收入明细表。”*

______________________________________________________________________

财务图表工具

get_financial_metric

检索一家公司的特定财务指标。

参数类型必填说明
tickerstring公司股票代码,例如。 "AAPL"
metric_namestring例如 "Revenue", "Net Income", "EPS"
fiscal_yearint具体年份;省略所有年份

______________________________________________________________________

compare_metric_across_years

一家公司指标的同比时间序列。

参数类型必填说明
tickerstring公司股票代码
metric_namestring财务指标名称

______________________________________________________________________

compare_metric_across_companies

多家Magnificent 7公司的并排指标比较。

参数类型必填说明
tickersstring\[\]两个或多个自动收报机
metric_namestring财务指标名称
fiscal_yearint用于比较的财政年度

______________________________________________________________________

关键人物工具

get_key_persons

检索年度报告中提到的高管和董事会成员。

参数类型必填说明
tickerstring公司股票代码
role枚举按角色筛选(见下文)

角色价值观: CEO · CFO · COO · Chairperson · BoardMember

______________________________________________________________________

关键开发工具

get_key_developments

从年度报告文件中检索公司事件和发展。

参数类型必填说明
tickerstring公司股票代码
category枚举按类别筛选(见下文)
fiscal_yearint筛选到特定年份

类别值:

描述
M&A合并、收购、资产剥离
Restructuring裁员、重组、工厂关闭
Litigation诉讼、罚款、和解
ProductLaunch新产品、服务、平台
RegulatoryAction政府调查、同意令
GuidanceChange前瞻性指导修订

______________________________________________________________________

查询示例

# Compare revenue across all Mag-7 for FY2023
compare_metric_across_companies(
  tickers=["AAPL","MSFT","GOOGL","AMZN","NVDA","META","TSLA"],
  metric_name="Revenue",
  fiscal_year=2023
)

# Apple's net income over time
compare_metric_across_years(ticker="AAPL", metric_name="Net Income")

# NVIDIA product launches in 2023
get_key_developments(ticker="NVDA", category="ProductLaunch", fiscal_year=2023)

# Microsoft board members
get_key_persons(ticker="MSFT", role="BoardMember")

# Search for AI strategy discussion in GOOGL 2023 10-K
search_report_text(
  query="artificial intelligence strategy and investments",
  tickers=["GOOGL"],
  fiscal_year=2023
)

______________________________________________________________________

Neo4j图形模式参考

(:Company {ticker, name})
(:Document {id, type, filing_date})
(:FiscalYear {year})
(:Metric {name, unit})
(:Fact {value, period})
(:key_person {name, role, description})
(:key_development {title, category, description, date})

(Document)-[:BELONGS_TO]->(Company)
(Document)-[:BELONGS_TO]->(FiscalYear)
(Document)-[:REPORTS]->(Fact)
(Fact)-[:FOR_METRIC]->(Metric)
(Document)-[:MENTIONS]->(key_person)
(Document)-[:MENTIONS]->(key_development)

______________________________________________________________________

许可证

麻省理工学院

目录标签

目录标签

PythonClaude搜索财经分析本地部署年报处理语义搜索财务指标企业事件

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

7

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP