Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp_polygon

MCP.Pizza Chef: massive-com

The mcp_polygon server is an MCP server that exposes the Polygon.io financial market data API through a structured, LLM-friendly interface. It enables access to comprehensive market data including stocks, options, forex, crypto aggregates, real-time and historical trades, quotes, market snapshots, and ticker details. This server facilitates seamless integration of Polygon's extensive financial data into AI workflows and applications using the Model Context Protocol.

Use This MCP server To

Access real-time stock, options, forex, and crypto market data Retrieve historical trade and quote data for analysis Fetch market snapshots for up-to-date financial insights Query detailed ticker information for investment research Integrate Polygon.io data into AI-driven trading bots Automate financial report generation with live market data Combine market data with LLMs for predictive analytics Enable chatbots to answer finance-related queries with live data

README

Polygon.io logo

Important

🧪 This project is experimental and could be subject to breaking changes.

Polygon.io MCP Server

A Model Context Protocol (MCP) server that provides access to Polygon.io financial market data API through an LLM-friendly interface.

Overview

This server exposes all Polygon.io API endpoints as MCP tools, providing access to comprehensive financial market data including:

  • Stock, options, forex, and crypto aggregates and bars
  • Real-time and historical trades and quotes
  • Market snapshots
  • Ticker details and reference data
  • Dividends and splits data
  • Financial fundamentals
  • Market status and holidays

Installation

Prerequisites

  • Python 3.8+
  • A Polygon.io API key
    Button
  • Astral UV
    • For existing installs, check that you have a version that supports the uvx command.

Claude Code

First, install Claude Code

npm install -g @anthropic-ai/claude-code

Use the following command to add the Polygon MCP server to your local environment.

# Claude CLI
claude mcp add polygon -e POLYGON_API_KEY=your_api_key_here -- uv run /path/to/mcp_polygon/entrypoint.py

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

  1. Follow the Claude Desktop MCP installation instructions to complete the initial installation and find your configuration file.
  2. Use the following example as reference to add Polygon's MCP server. Make sure you complete the various fields.
    1. Path find your path to uvx, run which uvx in your terminal.
    2. Replace <your_api_key_here> with your actual Polygon.io API key.
    3. Replace <your_home_directory> with your home directory path, e.g., /home/username (Mac/Linux) or C:\Users\username (Windows).
claude_desktop_config.json
{
    "mcpServers": {
        "polygon": {
            "command": "<path_to_your_uvx_install>/uvx",
            "args": [
                "--from",
                "git+https://github.com/polygon-io/mcp_polygon@master",
                "mcp_polygon"
            ],
            "env": {
                "POLYGON_API_KEY": "<your_api_key_here>",
                "HOME": "<your_home_directory>"
            }
        }
    }
}

Usage Examples

Once integrated, you can prompt Claude to access Polygon.io 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

Available Tools

This MCP server implements all Polygon.io API endpoints as tools, including:

  • get_aggs - Stock aggregates (OHLC) data for a specific ticker
  • list_trades - Historical trade data
  • get_last_trade - Latest trade for a symbol
  • list_ticker_news - Recent news articles for tickers
  • get_snapshot_ticker - Current market snapshot for a ticker
  • get_market_status - Current market status and trading hours
  • list_stock_financials - Fundamental financial data
  • And many more...

Each tool follows the Polygon.io SDK parameter structure while converting responses to standard JSON that LLMs can easily process.

Development

Running Locally

Check to ensure you have the Prerequisites installed.

# Sync dependencies
uv sync

# Run the server
POLYGON_API_KEY=your_api_key_here uv run mcp_polygon

Debugging

For debugging and testing, we recommend using the MCP Inspector:

npx @modelcontextprotocol/inspector uv --directory /path/to/mcp_polygon run mcp_polygon

This will launch a browser interface where you can interact with your MCP server directly and see input/output for each tool.

Links

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.

mcp_polygon FAQ

How do I authenticate the mcp_polygon server with Polygon.io?
You need to provide your Polygon.io API key in the server configuration to authenticate requests securely.
Can mcp_polygon provide both real-time and historical market data?
Yes, it supports access to both real-time and historical trades, quotes, and aggregates.
Is the mcp_polygon server compatible with multiple LLM providers?
Yes, it is designed to work with any MCP-compatible LLM host, including OpenAI, Anthropic Claude, and Google Gemini.
How does mcp_polygon handle rate limits imposed by Polygon.io?
The server includes mechanisms to respect Polygon.io API rate limits and may queue or throttle requests accordingly.
Can I access multiple asset classes like stocks, forex, and crypto through mcp_polygon?
Yes, it supports a wide range of asset classes including stocks, options, forex, and cryptocurrencies.
Is the mcp_polygon server suitable for production use?
The project is experimental and may have breaking changes; use caution in production environments.
How do I extend mcp_polygon to support additional Polygon.io endpoints?
The server is modular and can be extended by adding new MCP tools mapping to Polygon.io API endpoints.
Does mcp_polygon provide aggregated market data?
Yes, it offers access to aggregate bars and summaries for various financial instruments.