Connect Claude to Financial APIs: Full Guide
Learn how to connect Claude to financial APIs like FMP, Alpha Vantage, Finnhub, SEC EDGAR, and Alpaca, with setup steps, free tiers, and MCP options.
Most people use Claude to talk about stocks. They ask what it thinks of Nvidia, ask it to explain a P/E ratio, or paste in an article and ask for a summary. That is a 2023 way of using it.
The real jump happens when you give the model direct access to data. Not screenshots, and not copy-paste from Yahoo Finance. A real connection through an API to prices, financial statements, news, insider trades, and even a simulated trading account. Once that happens, Claude stops being a chatbot that guesses and starts working like an analyst with live data.
In short: You connect Claude to financial APIs so it pulls real prices, filings, news, and market data instead of guessing. Most of these data sources have free tiers, and several have official MCP servers that connect to Claude in minutes. This guide covers eight data APIs, how to connect each one, how to handle APIs with no MCP server, and the safety limits to keep in mind.
Key takeaways
- Financial Modeling Prep (FMP) gives 250 free calls per day and covers financial statements, ratios, analyst estimates, and screeners.
- Alpha Vantage has an official MCP server that is already in Claude's Connectors directory, and its free key gives 25 calls per day.
- Finnhub's free tier gives 60 calls per minute with no credit card, and its WebSocket is free for up to 50 symbols.
- SEC EDGAR is free, needs no API key or sign-up, and requires a User-Agent header with a name and email.
- Alpaca's official MCP server defaults to Paper Trading, and its free paper account starts with $100,000 in simulated money.
- Give your AI one job at a time: separate the model's reasoning from the APIs that supply the facts.
Why do you need financial APIs for Claude?
You need them because a language model does not know what a stock costs right now. Its knowledge stops at its training date, and it will fill gaps with full confidence even when it is wrong. In finance, that is not a cosmetic problem. It can cost you money.
The fix is to split the work into two roles. The model handles reasoning, analysis, and cross-checking. The APIs handle the facts. When you connect both through MCP (a protocol that lets Claude call external tools), you get a system that can think and also check itself against reality.
Which financial APIs should you connect to Claude?
There are eight data APIs in this stack, and each one has a clear job. You do not need all eight on day one. If you install only one, start with FMP.
1. Financial Modeling Prep (FMP): fundamentals
FMP provides stock prices, full financial statements (income statement, balance sheet, and cash flow), valuation multiples and financial ratios, analyst estimates, an earnings calendar, news, and screeners for filtering stocks by criteria.
The free tier gives 250 calls per day, which is plenty for personal research. There are several good community MCP servers. One of them exposes more than 250 tools and supports direct connection to Claude Desktop and Claude.ai.
Its role in the stack: any question that starts with "how much does this company earn," "what is the multiple," or "what do analysts think."
Documentation: site.financialmodelingprep.com/developer/docs
2. Alpha Vantage: technical analysis, with an official MCP server
This is the veteran of the group, and the easiest to connect. It offers historical prices, more than 50 technical indicators (RSI, MACD, moving averages), forex, crypto, commodities, macro data, and news with sentiment scores.
The key point is that Alpha Vantage has an official MCP server from the company itself, and it already appears in Claude's official Connectors directory. You can connect it in a few clicks without touching a terminal. The free key gives 25 calls per day, and educational or open source projects can get extended access.
Its role in the stack: technical analysis, historical data, and macro.
3. Finnhub: news and sentiment
Finnhub has the most generous free tier in terms of rate. You get 60 calls per minute with no credit card required. It provides real-time quotes for US stocks, company news, basic fundamentals, an earnings calendar, insider transactions, and alternative data such as trades by members of Congress and lobbying data. It also offers a WebSocket for live streaming, which is free for up to 50 symbols.
Its role in the stack: what is happening now. News, sentiment, and who inside the company is buying or selling.
4. Twelve Data: time series
Twelve Data does one thing well: clean, reliable time series. It covers stocks, ETFs, forex, and crypto at every resolution, and its documentation is among the best in the field. The free tier gives 800 credits per day, which is more than enough for research and building charts.
Its role in the stack: when you need organized price history for analysis or a simple backtest, this is the tool.
5. Massive (formerly Polygon): deep data
In late October 2025, Polygon.io changed its name to Massive. The old address, api.polygon.io, still works alongside the new address, api.massive.com, so older guides are still relevant.
This is where data gets much deeper. It offers tick-level trades and quotes, options chains with more than 1.5 million contracts, indices, real-time WebSockets, and history going back to 2003 with hundreds of billions of rows. Since its partnership with Benzinga, it also has a built-in news layer, analyst ratings, and company forecasts.
The free tier is fairly limited. It mainly offers end-of-day data and a short history. When you move to serious research, this is the infrastructure.
Its role in the stack: options, deep intraday data, and anything that needs tick-level resolution.
API: api.massive.com
6. Nasdaq Data Link: research datasets
If you remember Quandl, you know this one. It is a platform of full datasets, some free and some paid, that fit quantitative research and backtesting. It includes commodities data, interest rates, economic indicators, and more. It is less about "what is the price now" and more about "give me twenty years of data to test a strategy."
Its role in the stack: quantitative research and working with large datasets.
7. SEC EDGAR: the original source, free, no sign-up
This is my favorite on the list, for three reasons.
First, it is the original source. Every 10-K, 10-Q, 8-K, and Insider filing reaches EDGAR before any financial website in the world processes it.
Second, it is completely free. There is no API key and no sign-up.
Third, the API is well structured. The address data.sec.gov exposes endpoints such as companyfacts, which returns all of a company's financial data as structured JSON from XBRL, and submissions, which returns the full filing history.
There are only two rules. You must send a User-Agent header with your name and email, which the SEC requires. And you must not make more than 10 requests per second.
Its role in the stack: when you want the AI to read what the company itself filed with the regulator, not a third-party website's interpretation.
API: data.sec.gov
8. Alpaca: where analysis becomes action
Everything above is reading. Alpaca is writing. It is a broker with an API that lets you open a free Paper Trading account with $100,000 in simulated money, receive market data, and let an agent test strategies in an environment that works exactly like the real one, without risking real money.
Alpaca has an official MCP server (version 2 was rebuilt on FastMCP) with 65 tools. These cover opening positions, multi-leg options strategies, portfolio management, watchlists, and market data. Its default mode is Paper, which is how it should be. Real trading requires an explicit change in the settings. I would not rush to that step.
Its role in the stack: closing the loop. Research, analysis, and then a test in the field with simulated money.
Documentation: alpaca.markets
How do the APIs fit together?
Each layer has one main tool. The table shows how the work divides in a full system.
| Layer | Tool | What it provides |
|---|---|---|
| Fundamentals | FMP | Statements, multiples, analysts |
| Technical and history | Alpha Vantage / Twelve Data | Indicators, time series |
| News and sentiment | Finnhub | What is happening now and who is buying |
| Deep data | Massive | Ticks, options, WebSockets |
| Regulatory source | SEC EDGAR | The original filings |
| Quantitative research | Nasdaq Data Link | Datasets for backtesting |
| Execution | Alpaca | Paper Trading through the API |
A typical question for a system like this: "Check NVDA. Pull the latest filing from EDGAR, compare its growth to analyst estimates from FMP, check Finnhub for insider transactions in the last month, run RSI and MACD from Alpha Vantage, and tell me whether my thesis holds up." The model moves between the tools on its own and returns an answer based on data. That is the difference between a chat and a research system.
How do you connect financial APIs to Claude?
There are three levels of difficulty. Choose the one that fits how you work.
Level 1: The Connectors directory (no terminal needed)
This is the easiest route, and it works even if you have never written a line of code.
- In Claude (in the browser or the Desktop app), open Settings, then Connectors.
- Click Browse connectors and search for the tool you want. Alpha Vantage is already listed there officially.
- Add it, enter your API key on the authentication page that opens, and you are done.
From that point on, you can ask Claude about prices and indicators, and it will pull the data by itself.
Level 2: Claude Desktop with a configuration file
For MCP servers that run locally, you edit the file claude_desktop_config.json. On a Mac, it is in Library/Application Support/Claude. On Windows, it is in AppData/Roaming/Claude.
Here is how a connection to Alpha Vantage and Alpaca looks together:
{
"mcpServers": {
"alphavantage": {
"command": "uvx",
"args": ["alphavantage-mcp"],
"env": {
"ALPHAVANTAGE_API_KEY": "your-key"
}
},
"alpaca": {
"command": "uvx",
"args": ["alpaca-mcp-server"],
"env": {
"ALPACA_API_KEY": "your-key",
"ALPACA_SECRET_KEY": "your-secret",
"ALPACA_PAPER_TRADE": "True"
}
}
}
}
- Save the file.
- Restart Claude Desktop.
- Check that the new tools appear in your chat.
The only requirement beforehand is that uv is installed on your computer. uv is a modern Python package manager, and installing it takes one command.
Level 3: Claude Code (for people who work in the terminal)
In Claude Code, you add an MCP server with one command:
claude mcp add alphavantage -e ALPHAVANTAGE_API_KEY=your-key -- uvx alphavantage-mcp
The advantage of Claude Code is that the servers live alongside your code. You can ask it to pull data through MCP, write a Python analysis script based on that data, run the script, draw a chart, and save everything in the project. At that point, it is not just a conversation. It is a research environment.
How do you connect an API that has no MCP server?
You wrap the REST API yourself. SEC EDGAR has no official MCP server, and neither does Nasdaq Data Link. Most guides skip this part, but in practice it is the most useful. There are three ways to do it.
Option 1: Do not wrap it at all (the Claude Code approach)
This is the least known trick in the space. In Claude Code, you do not need an MCP server. Claude can write and run code, so you only need to give it the key and the documentation.
In your project folder, create a CLAUDE.md file with something like this:
## Available APIs
- FMP: key in environment variable FMP_API_KEY. Docs: site.financialmodelingprep.com/developer/docs
- SEC EDGAR: no key. Base: data.sec.gov. User-Agent header with name and email is required. Max 10 requests per second.
From then on, when you ask "pull Apple's balance sheet," Claude Code will write a small Python script by itself, run it, and return the data. There is no server, no configuration, and no maintenance. For personal research, this is often the fastest route.
Option 2: Write your own MCP server in about 20 lines
When you want the tool to be available in Claude Desktop and in every conversation, write a thin MCP server with the FastMCP library. Here is a working wrapper for SEC EDGAR:
from fastmcp import FastMCP
import httpx
mcp = FastMCP("sec-edgar")
HEADERS = {"User-Agent": "Your Name your@email.com"}
@mcp.tool()
def company_facts(cik: str) -> dict:
"""All reported financial data for a company by CIK number."""
url = f"https://data.sec.gov/api/xbrl/companyfacts/CIK{cik.zfill(10)}.json"
return httpx.get(url, headers=HEADERS).json()
@mcp.tool()
def recent_filings(cik: str) -> dict:
"""Recent filing history for a company."""
url = f"https://data.sec.gov/submissions/CIK{cik.zfill(10)}.json"
return httpx.get(url, headers=HEADERS).json()
if __name__ == "__main__":
mcp.run()
- Save the file as edgar_server.py.
- Add it to the configuration of Claude Desktop.
- You now have a permanent tool that reads SEC filings.
The same pattern wraps any REST API in the world: a function, an HTTP call, and a JSON return. You can even ask Claude to write the wrapper for you. Paste in the API documentation and ask, "Build me a FastMCP server for this."
Option 3: n8n as a wrapper (no code required)
If you already use n8n, you can build a workflow that calls any API, processes the response, and exposes it to the outside as an MCP server using the built-in MCP Server Trigger. You connect the address you get to Claude as a Custom Connector.
The big advantage is that you can chain logic along the way. For example, one workflow can pull a price from Twelve Data, news from Finnhub, and a filing from FMP, then return one organized package to Claude in a single call. This also saves calls against your
Questions people ask
Which financial API should I start with for Claude?
Start with Alpha Vantage. It has an official MCP server that is already in Claude's Connectors directory, so you can connect it in a few clicks without a terminal. Financial Modeling Prep (FMP) is the next best choice for financial statements and ratios.
How much of this stack is free?
Most of it. FMP gives 250 calls per day, Finnhub gives 60 calls per minute with no credit card, Twelve Data gives 800 credits per day, and Alpha Vantage gives 25 calls per day. SEC EDGAR and FRED are free, and Alpaca Paper Trading is free with $100,000 in simulated money.
What do I do if an API has no MCP server?
There are three options. In Claude Code, you can put the API key and documentation in a CLAUDE.md file and let Claude write the script. You can also write a thin FastMCP server in about 20 lines, or wrap the API in n8n with the MCP Server Trigger.
Why use SEC EDGAR if I already have FMP?
EDGAR is the original source. Every 10-K, 10-Q, 8-K, and Insider filing reaches it before financial websites process it. It is free and needs no API key, but you must send a User-Agent header with a name and email and stay under 10 requests per second.
Can I let AI trade with real money?
The technical setup allows it, but this guide does not recommend it. Alpaca's MCP server defaults to Paper Trading, and real trading requires an explicit setting change. Run a strategy on simulated money for a long time first.
