
Polygon.io is Now Massive
Polygon.io is now Massive.com. The rebrand reflects our focus on scale, reliability, and continued innovation. Your APIs, accounts, and integrations continue to work without interruption.
editor

Introducing
Aug 1, 2025
What if you could simply ask a question in plain English, like "How is APPL performing right now compared to AMZN?", and get a structured, reliable answer based on the most up to date information?
Thanks to the convergence of high-fidelity data, powerful AI models, and modern development frameworks, this is now possible. This tutorial will walk you through building a simple but powerful AI financial analyst. We'll use a stack that combines Massive.com's real time market data (via the Massive.com MCP server) with the reasoning capabilities of Anthropic's Claude 4, all tied together with the Pydantic AI agent framework.
This is all the code any AI agent needs to query real time stock market data.

We'll be using these key components to create our AI financial analyst:
Before we start, make sure you have the following:
You can find the code for this tutorial in our Massive.com community space. Head over there and run the following in a terminal. Then, cd into the market parser directory.
git clone https://github.com/massive-com/community.git cd community/examples/rest/market-parser-massive-mcp
Run the following command to copy the example .env file.
cp .env_example .env
Open the file and paste in your API keys for Massive.com and Anthropic. Make sure to save the file.
open -e .env
Run the following command to run the cli interface.
uv run market_parser_demo.py
At this point, you should see the following - where it asks you to enter in a query.

Enter in the following as just an example:
You should see a response similar to the below, showing the latest price of Tesla.

Now, while this query was simple - you can also give it other more advanced questions. As always, be specific in your prompting. The better the prompt - the better the response.
If you want to quit, type the word
For reference, here are some other examples of things you can ask and responses you could expect to get back.


And you can even go further, asking it to do deep analysis and reporting on multiple tickers. Keep in mind this is not me giving you financial advice.



The code is pretty simple. All of it is in one file in the code repository called
To add in the Massive.com MCP server to an agentic workflow, you simply need to point it to the repository.
def create_polygon_mcp_server(): ... return MCPServerStdio( command="uvx", args=[ "--from", "git+https://github.com/massive-com/mcp_polygon@v0.4.0", "mcp_polygon" ], env=env )
Configuring the agent couldn't be more simple for this use case. You pass in a model, which in this case is Claude 4 sonnet, the MCP server we created, and a system prompt. This gives the LLM access to any and all tools the MCP server has access to.
Within the agent configuration below, there is a
agent = Agent( model="anthropic:claude-4-sonnet-20250514", mcp_servers=[server], system_prompt=( "You are an expert financial analyst. " "Note that when using Massive tools, " "prices are already stock split adjusted. " "`Use` the latest data available. " "Always double check your math. " "For any questions about the current date, " "use the 'get_today_date' tool. " "For long or complex queries, " "break the query into logical subtasks and " "process each subtask in order." ) )
Additionally, the solution is configured to send over the entire message history of the conversation to the LLM in order to provide additional context.
response = await agent.run( user_input, message_history=message_history )
While this demo allows you to utilize most of the Massive.com endpoints in a simple CLI chat interface, there are some feature enhancements that could be done to the repository to make it better.
Accessing real time and historical stock market data shouldn't be hard. Massive.com's MCP server, alongside Anthopic's Claude 4 and Pydantic AI's agent framework, make it super easy.
Again, you can find the GitHub repository for this demo here, and Massive.com has a generous free tier that is super easy to sign up for.
So what are you waiting for?
Clone the repo. Run the CLI. Talk to the market.
The examples, demos, and outputs produced with this project are generated by artificial intelligence and large language models. You acknowledge that this project and any outputs are provided "AS IS", may not always be accurate and may contain material inaccuracies even if they appear accurate because of their level of detail or specificity, outputs may not be error free, accurate, current, complete, or operate as you intended, you should not rely on any outputs or actions without independently confirming their accuracy, and any outputs should not be treated as financial or legal advice. You remain responsible for verifying the accuracy, suitability, and legality of any output before relying on it.

Alex Novotny
alexnovotny
See what's happening at massive.com

Polygon.io is now Massive.com. The rebrand reflects our focus on scale, reliability, and continued innovation. Your APIs, accounts, and integrations continue to work without interruption.
editor

There are four new fundamentals endpoints, one daily-refreshed ratios feed, and a developer experience designed for screens, research, and automated reporting.

alexnovotny

Learn how to use Massive.com's MCP server inside of a Pydantic AI agentic workflow, alongside Anthropic's Claude 4 and the Rich Python library.

alexnovotny