Stock-MCP

Stock-MCP

Provides access to Massive (Polygon) market data including stock and options OHLCV bars as CSV, ticker search, and market movers via FastMCP.

Category
Visit Server

README

Massive MCP Server (CSV + Charts)

Standalone FastMCP server that exposes Massive (Polygon) market data to Claude and other MCP clients. Chart tools return chart-ready CSV; lookup tools return compact JSON.

Tools

CSV / chart tools

Tool Description
get_stock_bars_csv OHLCV bars for a stock via REST API
get_options_bars_csv OHLCV bars for an options contract via REST API
get_flat_file_bars_csv OHLCV bars from Massive Flat Files (S3 bulk data)

CSV columns: datetime,open,high,low,close,volume,transactions

Research tools (JSON)

Tool Description
search_tickers Find symbols by name or ticker
get_ticker_details Company / instrument metadata
get_stock_snapshot Latest price snapshot (paid plan)
list_options_contracts Options chain contract lookup
get_options_chain_snapshot Full chain snapshot (paid plan)
list_flat_file_datasets Flat file catalog and S3 listing
get_market_movers Top gainers or losers (paid plan)

Local Setup

cd Stock-MCP
python3.11 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env

Edit .env:

MASSIVE_API_KEY=your_rest_api_key
MASSIVE_S3_ACCESS_KEY=your_flat_files_access_key   # optional, for flat files
MASSIVE_S3_SECRET_KEY=your_flat_files_secret_key

Run locally:

fastmcp run app/mcp_server.py --transport http --host 127.0.0.1 --port 8082

MCP endpoint:

http://127.0.0.1:8082/mcp

Docker on Linux VPS

cp .env.example .env
# edit .env
docker compose -f deploy/docker-compose.yml up -d --build

The service binds to localhost:

http://127.0.0.1:8082/mcp

Cloudflare Tunnel (optional)

Expose the MCP server to Claude Projects without opening a public port on the VPS.

  1. Create a remotely managed tunnel in Cloudflare Zero Trust.
  2. Set CLOUDFLARE_TUNNEL_TOKEN in .env.
  3. Add a public hostname route: mcp-stocks.yourdomain.comhttp://stock-mcp:8080
  4. Start with the tunnel profile:
docker compose -f deploy/docker-compose.yml --profile tunnel up -d --build

Claude remote MCP URL:

https://mcp-stocks.yourdomain.com/mcp

Claude Integration

  1. Deploy the MCP server (local, VPS, or via Cloudflare Tunnel).
  2. In a Claude Project, add a remote MCP server with your /mcp URL.
  3. Add to your project instructions:

For charts, call get_stock_bars_csv or get_flat_file_bars_csv and parse the csv field. Always mention truncated and the date range in your analysis.

Environment Variables

Variable Required Description
MASSIVE_API_KEY Yes REST API key
MASSIVE_S3_ACCESS_KEY Flat files only S3 access key from Massive dashboard
MASSIVE_S3_SECRET_KEY Flat files only S3 secret key
MAX_CSV_ROWS No Row cap per CSV tool call (default 5000)
MCP_PORT No Host port for Docker (default 8082)

Testing

pytest tests/ -v

Optional integration tests (requires real API keys in .env):

RUN_INTEGRATION=1 pytest tests/test_integration.py -v

Security

  • Keep .env off Git; use chmod 600 .env on the VPS.
  • Bind to 127.0.0.1 unless behind Cloudflare Tunnel or nginx.
  • Do not log API keys.
  • Consider Cloudflare WAF rate limiting on the public MCP hostname.

API Reference Docs

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured