# How to give an AI assistant market data

Claude Desktop, Cursor and Claude Code take one JSON block per MCP server. What breaks — the model spends your quota, reads your errors and misses stale data.

*https://stockmarketstack.com/how-to/give-an-ai-assistant-market-data · next to Financial MCP Servers & AI Agents*

**Answer:** Add a market-data MCP server to the assistant's configuration, either as a local command in a JSON block or as a remote URL you authorise over OAuth, then restart it. Claude Desktop, Cursor and Claude Code all read the same mcpServers shape. The connection is the easy part. A failed call is reported to the model rather than to you, the model decides how much of your rate limit to spend, and delayed data arrives without saying so.

## The tools that do this

*In the order this page recommends trying them. Paid placement does not affect this order.*

1. [Alpha Vantage](https://stockmarketstack.com/tools/alpha-vantage.md) — Remote at mcp.alphavantage.co over OAuth, one tool per API endpoint, listed in Claude's connector directory. A free key is 25 requests a day.
2. [Massive](https://stockmarketstack.com/tools/massive.md) — Four tools — search the docs, read one, call the API, query with SQL. Free is end-of-day at 5 calls a minute; paid plans from $29 are 15 minutes delayed.
3. [Financial Datasets](https://stockmarketstack.com/tools/financial-datasets.md) — A hosted server with 27 named tools over US fundamentals, filings and prices, signed in over OAuth. No free tier; redistribution only on the $2,000 plan.
4. [SEC EDGAR MCP](https://stockmarketstack.com/tools/sec-edgar-mcp.md) — Twenty-one tools over EDGAR, run locally, returning XBRL values as filed with the filing URL attached. Free data, AGPL code, and no prices at all.
5. [OpenBB](https://stockmarketstack.com/tools/openbb.md) — One server over thirty-odd providers with your own keys, tool categories switched on per session. AGPL, and the company behind it is winding down.
6. [Equibles](https://stockmarketstack.com/tools/equibles.md) — Scrapes public sources into your own Postgres first and serves 62 tools from that, so the model's calls never touch an upstream rate limit.

## The short way

A server runs in one of two places, and the configuration says which. A local server is a
command the assistant starts on your machine. This is the quick-start entry from the README of
[SEC EDGAR MCP](https://stockmarketstack.com/tools/sec-edgar-mcp), which for Claude Desktop goes in
`~/Library/Application Support/Claude/claude_desktop_config.json` on a Mac:

```json
{
  "mcpServers": {
    "sec-edgar-mcp": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "SEC_EDGAR_USER_AGENT=Your Name (your@email.com)",
        "stefanoamorelli/sec-edgar-mcp:latest"
      ]
    }
  }
}
```

Quit Claude Desktop completely and start it again; the file is read once, at launch. Cursor reads
the same `mcpServers` shape from `.cursor/mcp.json` in a project or `~/.cursor/mcp.json` for every
project, and Claude Code keeps its own copy per project or per user.

A remote server is a URL the vendor runs, and you sign in to it rather than pasting a key. In
Claude Code, [Alpha Vantage](https://stockmarketstack.com/tools/alpha-vantage)'s is one line, then an OAuth step in the
browser:

```bash
claude mcp add --transport http alphavantage https://mcp.alphavantage.co/mcp
# then, inside a session:
/mcp
```

In Claude Desktop or in the browser, the same URL goes in Settings, Connectors, Add custom
connector. Once connected, the client lists the server's tools, and the model decides when to
call them. The protocol's own specification says a person should be able to deny any call, and
Cursor asks before using an MCP tool by default. Leave that on until you have watched a few
questions go through.

## What the options are

**A vendor's own remote server.** [Alpha Vantage](https://stockmarketstack.com/tools/alpha-vantage) runs one at
`mcp.alphavantage.co/mcp`, authorised over OAuth, with one tool per API endpoint across the same
eleven groups as its REST documentation; it is listed in Claude's connector directory. The free key
is 25 requests a day, and realtime US data starts at $99.99 a month.
[Financial Datasets](https://stockmarketstack.com/tools/financial-datasets) makes its hosted server the flagship: the docs
advertise "30+ tools" and name 27, over SEC-sourced US fundamentals, filings and end-of-day prices,
with sign-in over OAuth for Claude, Cursor and Codex. There is no free tier, and only the $2,000 a
month Scale plan carries redistribution rights.

**Few tools instead of many.** [Massive](https://stockmarketstack.com/tools/massive)'s first-party server, rebuilt in March
2026, exposes four tools where others expose one per endpoint: one searches its API docs, one reads
a page of them, one makes the call, and one runs SQL over the result. That keeps the tool list short enough for a model to
choose from. The data behind it is the plan's: the free Basic plan is end-of-day at five calls a
minute, and the $29 Starter and $79 Developer plans both run 15 minutes behind.

**Public filings, on your own machine.** [SEC EDGAR MCP](https://stockmarketstack.com/tools/sec-edgar-mcp) is the config
above: twenty-one tools, run locally, with XBRL figures returned as the values filed rather than
numbers a model read off a page, and the filing URL on every response. EDGAR is free, the code is
AGPL-3.0, and there are no prices of any kind.

**Many providers behind one server.** [OpenBB](https://stockmarketstack.com/tools/openbb)'s `openbb-mcp-server` package installs a
command called `openbb-mcp`, not one named after the package, and wraps thirty-odd providers you
bring your own keys for. A session can load a few tool categories rather than the whole platform. It is
AGPL, and the company announced on 25 August 2026 that it is winding down.

**Data held locally first.** [Equibles](https://stockmarketstack.com/tools/equibles) scrapes EDGAR, CFTC, FRED and other
public sources into a local Postgres with `docker compose up`, then serves that database through
62 MCP tools. The model's questions hit your database, not somebody's rate limit. The rest of the
shelf is in [MCP servers and AI agents](https://stockmarketstack.com/categories/mcp-ai-agents).

## Where this breaks

**A failed call is reported to the model, not to you.** The MCP specification sorts failures into
two kinds. An upstream API failure, a bad date or a business-logic refusal is a tool execution
error: it comes back as an ordinary result marked `isError: true`, and clients should hand it to
the model "to enable self-correction". Nothing in the protocol makes the model stop and say so.
Some failures are not even marked. Asked on 27 September 2026 for a premium intraday series without a
paid key, Alpha Vantage's REST API answered HTTP 200 with a one-line `Information`
field suggesting a subscription — a successful response containing a sentence where the prices
should be. A premium bulk-quote call made the same day went further: HTTP 200 and a
list of quotes stamped October 2024, under a message saying the sample schema is "artificial and
for illustration purposes only". A server that relays either faithfully hands the model a success. Whatever the assistant
writes next looks exactly as confident as a real figure.

**The model spends your rate limit, not you.** One question — "compare these five companies over
three years" — can become dozens of calls, and it is the model that chooses how many. The
specification puts rate limiting on the server, but the upstream quota is still yours: 25 requests
a day on Alpha Vantage's free key, five a minute on Massive's free plan. A quota exhausted halfway
through an answer produces the failure above, in the middle of a table.

**Delayed data does not announce itself.** Massive's Starter and Developer plans are 15 minutes
delayed, Alpha Vantage's $49.99 plan likewise, and Massive's free plan is end-of-day. Ask for
"the current price" and the model will call whatever it gets current. The timestamp is usually in
the response: Alpha Vantage's quote carries a `latest trading day` field, which on a Sunday reads
the previous Friday. Ask the assistant to print the as-of time with every figure, and treat a
figure without one as unverified.

**Big answers get cut.** Claude Code warns when one tool's output passes 10,000 tokens and, by
default, caps it at 25,000; above that it writes the result to a file and gives the model a
reference to it instead. A long daily history or a full filing section can land there, and the
model then works from whatever it chooses to read back. Ask for a narrower range rather than
raising `MAX_MCP_OUTPUT_TOKENS` by reflex.

**The key sits in a plain file.** A local server's key goes in the `env` block of a JSON config.
In Claude Code a project-scoped server lives in `.mcp.json` at the repository root, which is meant
to be shared through version control, so a key typed there is a key committed. Keep keys in
user-scoped configuration, or reference an environment variable so the file holds a name rather
than a value — `${VAR}` in Claude Code's `.mcp.json`, `${env:NAME}` in Cursor's `mcp.json`. Remote servers signed in over OAuth avoid the file altogether.

**The licence did not change because the reader did.** A model reading your data feed is still a
use of your data feed, and sending its output to someone else can be redistribution.
[Financial MCP servers, and the licence behind them](https://stockmarketstack.com/guides/mcp-and-financial-data) goes through
what the exchanges have published about this; the short version is to read your agreement before
connecting anything you pay for.

## If you outgrow this

**When the numbers have to be right**, stop reading figures out of the chat. Have the assistant
write the request or the script, run it yourself, and keep the file it produces, so every number
has a response behind it that you can open again. The
[MCP server](https://stockmarketstack.com/glossary/mcp-server) entry sets out what the protocol does and does not carry.

**When the rate limit is the problem**, the fix is a local copy rather than a bigger quota. Pull
the history once with a script — [How to download historical prices in Python](https://stockmarketstack.com/how-to/download-historical-prices-in-python)
covers the providers — and point the assistant at your own store, the way
[Equibles](https://stockmarketstack.com/tools/equibles) does for public sources.

**When the question is filings rather than prices**, the free route is already the good one:
[How to get SEC filings as data](https://stockmarketstack.com/how-to/get-sec-filings-as-data) covers EDGAR directly, and
[SEC EDGAR MCP](https://stockmarketstack.com/tools/sec-edgar-mcp) is the same source handed to an assistant.

**When you need realtime**, that is a paid plan and an exchange agreement before it is a server.
[Why real-time stock data is so expensive](https://stockmarketstack.com/guides/real-time-market-data-fees) explains why the
price changes with who is looking at the screen.

## FAQ

### Which AI assistants can use an MCP server for market data?

Any MCP client. Claude Desktop reads local servers from claude_desktop_config.json and takes remote ones as custom connectors under Settings, Connectors. Cursor reads the same mcpServers block from .cursor/mcp.json or ~/.cursor/mcp.json. Claude Code adds servers with claude mcp add, for one project or for every project. The server is the same in each case; only the file it is declared in changes.

### Do I need an API key to connect a market data MCP server?

Usually the vendor's, in one of two forms. A local server takes the key as an environment variable in its configuration. A remote server run by the vendor, such as Alpha Vantage's or Financial Datasets', signs you in over OAuth in the browser instead. Servers over public sources, like SEC EDGAR MCP, need no key at all, only the identifying user agent the SEC asks for.

### Why did the assistant give me a price when the tool call failed?

Because the protocol sends the failure to the model. An API error is returned as a tool result marked as an error so the model can correct itself, and some APIs signal a refused request inside a normal successful response. Neither forces the model to stop. Ask it to name the tool and the as-of time for every figure, and look at the tool call itself in the client before using the number.

## Sources

1. [Tools — Model Context Protocol specification (revision 2026-07-28)](https://modelcontextprotocol.io/specification/2026-07-28/server/tools) — Model Context Protocol, read 2026-09-27
2. [Connect to local MCP servers](https://modelcontextprotocol.io/docs/develop/connect-local-servers) — Model Context Protocol, read 2026-09-27
3. [Model Context Protocol (MCP)](https://cursor.com/docs/context/mcp) — Cursor, read 2026-09-27
4. [Connect to remote MCP servers](https://modelcontextprotocol.io/docs/develop/connect-remote-servers) — Model Context Protocol, read 2026-09-27
5. [Connect Claude Code to tools via MCP](https://code.claude.com/docs/en/mcp) — Anthropic, read 2026-09-27

*Last updated 2026-09-27. A reference page, corrected in place — not a dated post.*
