
Massive.com MCP Server
MCPMassive(原 Polygon.io)官方 MCP,用搜索、调用、SQL 查询三个工具覆盖美股、期权、外汇、加密货币与期货的行情和基本面数据,内置期权希腊值与收益率计算。需要 API Key,项目仍处实验阶段。
[!IMPORTANT] :test_tube: This project is experimental and could be subject to breaking changes.
Massive.com MCP Server
A Model Context Protocol (MCP) server that provides access to the full Massive.com financial data API through an LLM-friendly interface.
Rather than exposing one tool per endpoint, this server gives the LLM three composable tools — search, call, and query — that cover the entire Massive.com API surface. Data can be stored in an in-memory SQLite database, and enriched with built-in financial functions.
[!TIP] Don't want to install anything? Massive hosts this server at
https://mcp.massive.com. See the AI Tools quickstart for setup in each client.
Tools
| Tool | Description |
|---|---|
search_endpoints | Search for API endpoints and built-in functions by natural language query. Returns titles, path patterns, and descriptions. Set detail to "more" for query parameter docs, or "verbose" for full documentation. Use max_results to limit results. |
call_api | Call any Massive.com REST API endpoint. Supports storing results as an in-memory database table (store_as) and applying post-processing functions (apply). Paginated responses include a next-page hint. |
query_data | Run SQL against stored SQLite DB. Supports SHOW TABLES, DESCRIBE <table>, DROP TABLE <table>, CTEs, window functions, and more. Results can also be post-processed with apply. |
Built-in Functions
Functions can be applied to API results or query output via the apply parameter on call_api and query_data. Use search_endpoints with scope="functions" to discover them.
| Category | Functions |
|---|---|
| Greeks | bs_price, bs_delta, bs_gamma, bs_theta, bs_vega, bs_rho — Black-Scholes option pricing and greeks |
| Returns | simple_return, log_return, cumulative_return, sharpe_ratio, sortino_ratio |
| Technical | sma (simple moving average), ema (exponential moving average) |
Data Coverage
The server dynamically indexes all Massive.com API endpoints at startup from llms.txt, so it automatically stays in sync with the API. Coverage includes:
- Stock, options, forex, crypto, and futures aggregates
- Real-time and historical trades and quotes
- Market snapshots, gainers/losers
- Ticker details and reference data
- Dividends, splits, IPOs
- Financial fundamentals
- Analyst ratings and news (Benzinga)
- Treasury yields, inflation data
- Market status and holidays
Installation
Prerequisites
- Python 3.12+
- A Massive.com API key
- Astral UV (v0.4.0+)
Claude Code
First, install Claude Code
npm install -g @anthropic-ai/claude-code
Install the MCP server, then register it with Claude Code:
# Install the server (one-time — downloads dependencies ahead of time)
uv tool install "mcp_massive @ git+https://github.com/massive-com/mcp_massive@v0.10.0"
# Register with Claude Code
claude mcp add massive -e MASSIVE_API_KEY=your_api_key_here -- mcp_massive
To upgrade to a new version later:
uv tool upgrade mcp_massive
[!NOTE] Upgrading from
uvxoruv run --with? Previous versions recommendeduvx --from ... mcp_massiveoruv run --with. These commands download dependencies on every cold start, which can cause the server to exceed Claude's 30-second connection timeout. Switch touv tool installas shown above — it downloads dependencies once and starts instantly after that.
This command will install the MCP server in your current project.
If you want to install it globally, you can run the command with -s <scope> flag.
See claude mcp add --help for more options.
To start Claude Code, run claude in your terminal.
- If this is your first time using, follow the setup prompts to authenticate
You can also run claude mcp add-from-claude-desktop if the MCP server is installed already for Claude Desktop.
Claude Desktop
- Follow the Claude Desktop MCP installation instructions to complete the initial installation and find your configuration file.
- Install the server:
uv tool install "mcp_massive @ git+https://github.com/massive-com/mcp_massive@v0.10.0"
- Find the installed binary path:
# Mac/Linux
which mcp_massive
# Windows
where mcp_massive
- Add the server to your Claude Desktop config. Replace
<path_to_mcp_massive>with the output from the previous step, and fill in the remaining fields.
claude_desktop_config.json
{
"mcpServers": {
"massive": {
"command": "<path_to_mcp_massive>",
"env": {
"MASSIVE_API_KEY": "<your_api_key_here>",
"HOME": "<your_home_directory>"
}
}
}
}
Configuration
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
MASSIVE_API_KEY | Yes | — | Your Massive.com API key |
POLYGON_API_KEY | No | — | Deprecated alias for MASSIVE_API_KEY |
MCP_TRANSPORT | No | stdio | Transport protocol: stdio, sse, or streamable-http |
MASSIVE_API_BASE_URL | No | https://api.massive.com | Base URL for API requests |
MASSIVE_LLMS_TXT_URL | No | https://massive.com/docs/rest/llms.txt | URL for the endpoint index |
MASSIVE_MAX_TABLES | No | 50 | Maximum number of in-memory tables |
MASSIVE_MAX_ROWS | No | 50000 | Maximum rows per stored tables |
Transport
By default, STDIO transport is used. The transport can be set via the --transport CLI argument or the MCP_TRANSPORT environment variable (CLI argument takes precedence).
# CLI argument
MASSIVE_API_KEY=<your_api_key_here> uv run mcp_massive --transport streamable-http
# Environment variable
MCP_TRANSPORT=streamable-http MASSIVE_API_KEY=<your_api_key_here> uv run mcp_massive
Usage Examples
Once integrated, you can prompt Claude to access Massive.com data:
Get the latest price for AAPL stock
Show me yesterday's trading volume for MSFT
What were the biggest stock market gainers today?
Get me the latest crypto market data for BTC-USD
Calculate the 20-day SMA for AAPL closing prices over the last 3 months
Compute Black-Scholes delta for these option contracts
Development
Running Locally
Check to ensure you have the Prerequisites installed.
# Sync dependencies
uv sync
# Run the server
MASSIVE_API_KEY=your_api_key_here uv run mcp_massive
Local Dev Config for claude_desktop_config.json
Install from your local checkout, then reference the binary directly:
uv tool install --force /path/to/mcp_massive
{
"mcpServers": {
"massive": {
"command": "mcp_massive",
"env": {
"MASSIVE_API_KEY": "your_api_key_here"
}
}
}
}
Debugging
For debugging and testing, we recommend using the MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp_massive run mcp_massive
This will launch a browser interface where you can interact with your MCP server directly and see input/output for each tool.
Select the STDIO transport type in the browser UI with the command uv and run mcp_massive as the arguments.
Code Linting
This project uses just for common development tasks. To lint your code before submitting a PR:
just lint
This will run ruff format and ruff check --fix to automatically format your code and fix linting issues.
Links
Privacy Policy
This MCP server interacts with Massive.com's API to fetch market data. All data requests are subject to Massive.com's privacy policy and terms of service.
- Massive.com Privacy Policy: https://massive.com/legal/privacy
- Data Handling: This server does not store or cache any user data. All requests are proxied directly to Massive.com's API.
- API Key: Your Massive.com API key is used only for authenticating requests to their API.
- User-Agent: API requests include a User-Agent string containing the MCP server version (e.g.,
MCP-Massive/0.x.y). No personally identifiable information is included.
Contributing
If you found a bug or have an idea for a new feature, please first discuss it with us by submitting a new issue. We will respond to issues within at most 3 weeks. We're also open to volunteers if you want to submit a PR for any open issues but please discuss it with us beforehand. PRs that aren't linked to an existing issue or discussed with us ahead of time will generally be declined.
相關資源

Vibe-Trading
MCP港大 HKUDS 开源的交易研究 agent,MCP 服务有 70 余个工具,覆盖 A 股、港美股与加密货币的行情、财报、回测和投研分析。需本地装 Python,港美股与加密研究免 API Key;结果仅供研究,投资决策需专业人员复核。
HKUDS/Vibe-Trading38.5k
OpenBB MCP Server
MCPOpenBB 官方 MCP 服务器,把 OpenBB Platform 的股票、ETF、宏观经济、加密资产、新闻等数据接口开放给 agent,可按类别只启用需要的工具以节省上下文。需本机安装 uv,部分数据源需自备 API Key;分析结果不构成投资建议。
OpenBB-finance/OpenBB75.5k
Finance Toolkit MCP
MCPFinanceToolkit 开源库作者出品的 MCP,用 500 多种公式透明的方法计算财务比率、估值、风险与宏观指标,适合公司对比与尽调初稿。托管版免安装,首次连接时填入 Financial Modeling Prep API Key(免费档仅限美股、近 5 年数据);结果需专业人员复核。
JerBouma/FinanceToolkit5.5k
同花顺金融数据服务
MCP同花顺官方的 A 股数据服务,提供托管 MCP,让 agent 查询 A 股行情、财务报表、估值、涨跌停与龙虎榜;指数板块、公募基金、期货期权另有独立服务,可按同样方式添加。需在官网注册并创建 API Key;不含港美股和分钟级行情,分析结论不构成投资建议。
HiThink-Tech/Financial-API4.3k
CNEquity
MCP把 A 股行情、财报、资金流、公告、宏观等 52 个数据集整理成本地数据湖,提供只读 MCP 让 agent 按时点口径查数、跑 SQL,基础采集无需账号或 Token。需 Python 3.10+ 并先用 cne 命令建库;研究结论需专业人员复核。
rootSunc/CNEquity1.1k
MaverickMCP
MCP面向个人投资者的股票分析 MCP:基于 yfinance 提供行情、RSI/MACD 等技术指标、选股策略、持仓与交易日志,核心工具无需 API Key;可选装回测与深度研究扩展。
wshobson/maverick-mcp729