Skip to main content
Glama
danielbres

massive-mcp

by danielbres

massive-mcp

一个 MCP (Model Context Protocol) 服务器,用于向 Claude DesktopClaude Code 公开 Massive.com REST Stocks API

基于 FastMCP + httpx (异步) 构建。使用 Stdio 传输。

涵盖内容

工具

聚合 / K线

get_aggregates, get_previous_close, get_daily_market_summary, get_daily_ticker_summary

行情 & 交易

get_last_quote, get_last_trade, get_quotes, get_trades

快照

get_snapshot, get_all_snapshots, get_top_movers

股票代码 / 参考

list_tickers, get_ticker_overview, get_related_tickers, list_ticker_types

市场参考

get_market_status, get_market_holidays, list_exchanges, list_condition_codes

新闻

get_news

指标

get_sma, get_ema, get_rsi, get_macd

公司行动

get_dividends, get_splits, get_ipos, get_ticker_events

财务数据

get_financials, get_short_interest, get_short_volume

默认设置旨在保持响应精简(较低的 limit,在 200 项时截断并附带 _truncated_note)。所有分页工具均接受 cursor,并在有更多数据可用时返回 next_cursor

安装

# Recommended: uv
uv tool install --from . massive-mcp
# or pipx
pipx install .

用于开发:

uv sync --extra dev
uv run pytest

配置

通过环境变量设置您的 API 密钥。支持两种认证模式 — 首先尝试 bearer;如果 Massive 返回 401 错误,请切换到 query

export MASSIVE_API_KEY=sk_live_...
export MASSIVE_AUTH_MODE=bearer   # or "query"

或者将 .env.example 复制为 .env

连接

Claude Desktop

编辑 claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "massive": {
      "command": "uvx",
      "args": ["massive-mcp"],
      "env": {
        "MASSIVE_API_KEY": "sk_live_...",
        "MASSIVE_AUTH_MODE": "bearer"
      }
    }
  }
}

重启 Claude Desktop。

Claude Code

claude mcp add massive --env MASSIVE_API_KEY=sk_live_... --env MASSIVE_AUTH_MODE=bearer -- uvx massive-mcp

本地开发

uv run massive-mcp

使用 MCP Inspector 手动测试工具:

npx @modelcontextprotocol/inspector uvx massive-mcp

尝试一下

连接成功后,您可以询问 Claude 如下问题:

  • “NVDA 上一个交易日的收盘价是多少?”

  • “获取 AAPL 过去 12 个月的分红记录。”

  • “显示当前涨幅前 10 名的股票。”

  • “获取 TSLA 昨天的 5 分钟 K 线数据。”

  • “计算 SPY 过去 30 天的 RSI。”

配套技能

本仓库还提供了一个 Claude 技能 — massive-trade-analysis — 它利用这些 MCP 工具来制定专业的波段/长期交易计划(入场点、止损、级联止盈、盈亏比、仓位管理)。请参阅 skills/ 获取安装说明。

注意事项与限制

  • 仅限 REST。不支持 WebSocket / FlatFiles。

  • 仅限股票资产类别。期权/外汇/加密货币端点不在 v1 的范围内。

  • 部分端点 (/vX/...) 被 Massive 标记为测试版 — 路径可能会发生变化。

  • 429 响应会自动重试并遵循 Retry-After。5xx 错误会通过指数退避算法重试(最多尝试 3 次)。

  • API 密钥绝不会被记录。错误信息会从显示的 URL 中剔除 apiKey

许可证

MIT

A
license - permissive license
B
quality
C
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

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents

  • Augments MCP Server - A comprehensive framework documentation provider for Claude Code

View all MCP Connectors

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/danielbres/SwinGrade-MCPs'

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