Skip to main content
Glama
DigiBugCat

FMP MCP Server

by DigiBugCat

cassandra-market-research

金融市场数据 MCP 服务器。将 FMPThetaData(期权)、Polygon.io(美联储 + 做空成交量)、FREDTreasury Fiscal Data 统一在单一的 FastMCP 接口之后。

涵盖股票、SEC 文件、宏观序列、期权链、财报和财政数据。

架构

MCP client → market-research.cassandrasedge.com (CF Tunnel)
  → FastMCP backend (port 3003)
    ├─ McpKeyAuthProvider → /keys/validate (auth service)
    ├─ FMP client           → api.financialmodelingprep.com
    ├─ Polygon client       → api.polygon.io
    ├─ FRED/Treasury client → Treasury Fiscal Data + FRED
    └─ ThetaData client     → theta-terminal sidecar
                                ↓
                          ThetaTerminal.jar (Java)
                                ↓
                          ThetaData REST API

ThetaTerminal 边车(sidecar)作为独立的 k8s 部署运行,因为它是一个有状态的 Java 进程,用于登录 ThetaData 并代理 REST 调用;凭据存储在 theta-terminal k8s Secret 中。

仓库布局

cassandra-market-research/
├── backend/
│   ├── src/cassandra_fmp/
│   │   ├── main.py
│   │   ├── mcp_server.py
│   │   ├── config.py
│   │   ├── clients/
│   │   │   ├── polygon.py
│   │   │   ├── thetadata.py
│   │   │   └── treasury.py
│   │   └── tools/                  # Tool modules (register pattern)
│   ├── tests/
│   └── Dockerfile
├── theta-terminal/                 # ThetaTerminal sidecar image
│   ├── Dockerfile                  # Downloads ThetaTerminal.jar at build time
│   └── entrypoint.sh
├── .woodpecker.yaml
└── CLAUDE.md

认证

使用共享的 FastMCP 边车模式:

  • McpKeyAuthProvider 通过认证服务 /keys/validate 验证 Bearer mcp_... 令牌

  • 上游 API 密钥(FMP、Polygon、FRED)是部署级别的环境变量,而非用户个人凭据

  • ThetaData 凭据存储在 theta-terminal k8s Secret 中,由 ThetaTerminal.jar 使用,后端从不直接接触

  • ACL 策略通过 AUTH_YAML_CONTENT 构建参数内置于 Docker 镜像中

环境变量

变量

必需

描述

FMP_API_KEY

Financial Modeling Prep API 密钥

POLYGON_API_KEY

Polygon.io API 密钥(美联储数据 + 做空成交量)

FRED_API_KEY

用于宏观序列的 FRED API 密钥

THETA_TERMINAL_URL

是(期权必需)

ThetaTerminal REST 端点(例如 http://theta-terminal.production.svc.cluster.local:25510

AUTH_URL / AUTH_SECRET

认证服务连接配置

开发

cd backend
uv sync
FMP_API_KEY=<key> THETA_TERMINAL_URL=http://127.0.0.1:25510 uv run cassandra-fmp

部署

通过 Woodpecker CI 在推送到 main 分支时自动部署。BuildKit 构建两个镜像并推送到本地注册表:

  • market-research:latest 来自 backend/

  • theta-terminal:latest 来自 theta-terminal/

随后 ArgoCD 同步 cassandra-k8s/apps/market-research/cassandra-k8s/apps/theta-terminal/

Cassandra 技术栈的一部分。

Install Server
A
security – no known vulnerabilities
F
license - not found
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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/DigiBugCat/fmp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server