Tell Claude, ChatGPT, or any MCP-capable agent what you bought and it lands in a portfolio only your account can see. Or upload the CSV / Excel export your broker already gives you. Read it back from the website or from any assistant holding your key. Never connects to a broker, never places orders.
https://www.stashgamma.com/api/dataapi/mcp
Sign in, open Profile → Developer API and click Get free key. The key is issued to your account, which is what keeps your portfolio separate from everyone else's — an assistant holding it can only see and change your positions.
Claude Code:
claude mcp add --transport http stashgamma https://www.stashgamma.com/api/dataapi/mcp --header "X-Api-Key: sg_live_..."
Claude.ai / Claude Desktop (Settings → Connectors → Add custom connector), or any client that only takes a URL:
https://www.stashgamma.com/api/dataapi/mcp/sg_live_...
OpenAI Responses API:
{ "type": "mcp", "server_label": "stashgamma", "server_url": "https://www.stashgamma.com/api/dataapi/mcp",
"headers": { "X-Api-Key": "sg_live_..." }, "require_approval": "never" }Full click-by-click setup on the Claude & ChatGPT guide.
The last prompt combines the portfolio tools with get_latest_quote from the same server — the assistant reads your positions, fetches each close, and does the arithmetic.
On Profile → Portfolio choose a .csv, .xlsx or .xls file. Columns are matched by header name, so most broker exports work unchanged. A headerless file is read as symbol, quantity, avgCost, side.
symbol,quantity,avgCost,side,notes NVDA,100,120.50,Long,core AAPL,50,230.00,Long, QQQ,3,690.00,Short,hedge
| Tool | Input | Returns |
|---|---|---|
| get_portfolio_positions | portfolio? (named list, default "default") | symbol, side, quantity, average cost, cost basis, notes — plus the total cost basis |
| add_portfolio_positionwrite | symbol, quantity, avg_cost?, side? (Long|Short), notes?, mode? (replace | add) | the saved position; "add" merges into an existing lot with a quantity-weighted average cost |
| import_portfolio_csvwrite | csv text, mode? (merge | replace) | counts added / updated / removed and any per-row errors |
| remove_portfolio_positionwrite | symbol, side? | the removed position |
| clear_portfoliowrite | confirm: true, portfolio? | number of positions removed |
Write tools are annotated destructiveHint, so assistants ask before running them; clear_portfolio also requires confirm: true. Each call counts as one request against the same hour/day/week quota as the EOD data tools. Errors come back as isError tool results, so the agent can read the reason and fix its input.
Get a free key, connect your assistant, or just upload the file. Not investment advice — a tracker, not a broker.
Free Stock Data API
Start here — the free tier, no card required, 300 requests/hour.
EOD Data API Quickstart Guide
Get a key and pull your first end-of-day bars in under 5 minutes.
Historical Stock Data API
15 years of daily OHLCV across U.S.-listed tickers, for backtesting & research.
Free Stock Market APIs Compared
How the free tier stacks up against Alpha Vantage, IEX, and others.
OHLCV Data API
What OHLCV data is and exactly how the response is shaped.
MCP Server for Stock Data
Connect Claude, OpenAI, ChatGPT, or another MCP-capable agent directly to the data.
Options Analyzer MCP (no key)
Let Claude, OpenAI, or any MCP agent analyze a QQQ options trade — no API key needed.
Claude & ChatGPT Setup Guide
Click-by-click connector setup for Claude and ChatGPT, with your own key filled in.
Full API Documentation
Auth, endpoint reference, rate-limit headers, and error codes.
Ready to try it? Get your free API key — no card required.