MCP and HTTP · one key
Two doors, one key.
AI tools talk to the MCP endpoint. Everything else can use plain HTTP. The same key opens both, and both share the same limits.
For AI tools
MCP endpoint
Cursor, ChatGPT, and any client that speaks MCP.
http://127.0.0.1:8000/mcpFor programs
HTTP API
Scripts, notebooks, spreadsheets, and dashboards.
http://127.0.0.1:8000/v1The headerOne line on every call.
Every call sends one header. The value is the word Bearer, one space, then your key.
Authorization: Bearer YOUR_KEYReplace YOUR_KEY with the key from your account page. New here? Read the full steps first.
Call it from an AI toolMCP tools by name.
curl -X POST "http://127.0.0.1:8000/mcp" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_stock","arguments":{"symbol":"SYS"}}}'Tools you can ask for by name:
| Tool | What it returns |
|---|---|
| get_stock | Profile, last saved session, fundamentals, and payouts for one symbol. Add include “quote” or “technicals” for a live figure. |
| get_stock_history | Daily prices for a symbol, up to 2,000 rows and 3,650 days back. |
| get_stock_dividends | Every saved payout for a symbol, newest first. |
| list_stocks | The saved symbol list with name, sector, and Shariah flag. |
| list_indices / get_index | The 10 saved indices and their price history. |
| list_fundamental_metrics | The 42 metric codes with plain names, units, and definitions. |
| describe_archive | Counts of what is saved: symbols, prices, actions, fundamentals, indices. |
| get_market_overview | Live gainers, losers, sectors, forex, and gold rates. |
| get_news / get_stock_announcements | Live market news and company announcements. |
| get_market_sentiment / get_stock_score | Live trending discussion and score rankings. |
| list_mutual_funds / get_mutual_fund / list_etfs | Live fund and ETF data. These are not in the archive. |
| get_forex / get_crypto / get_commodities | Live currency, crypto, and commodity figures. |
Call it over plain HTTPSaved files only, never live.
curl -H "Authorization: Bearer YOUR_KEY" \
"http://127.0.0.1:8000/v1/symbols/SYS/history?days=30"/v1 reads the saved files only. It never fetches a live figure, so history answers stay fast and steady.
| Path | What it returns |
|---|---|
| GET /v1/symbols | Pages of the symbol list. offset, limit up to 500. |
| GET /v1/symbols/{SYMBOL} | Profile and row counts for one symbol. |
| GET /v1/symbols/{SYMBOL}/history | Price rows. days 1–3650, limit up to 1000 (default 250), before=YYYY-MM-DD to page back. |
| GET /v1/symbols/{SYMBOL}/corporate-actions | All saved payouts for the symbol. |
| GET /v1/symbols/{SYMBOL}/fundamentals | All saved fundamental rows for the symbol. |
| GET /v1/indices | The saved indices and their last session. |
| GET /v1/indices/{SYMBOL}/history | Saved index prices, same paging as stock history. |
| GET /v1/metrics | The 42 fundamental codes with units and definitions. |
| GET /v1/archive | Counts of everything saved. |
What every answer looks likeOne envelope everywhere.
{
"ok": true,
"partial": false,
"origin": "archive",
"asOf": "2026-11-14T12:00:00+00:00",
"disclaimer": "Market data is provided as-is and is not investment advice.",
"data": {}
}origin is archive, live, or mixed. partial is true when a live figure failed and the saved figures still came back. asOf is when the server built the answer; the trading session is the date inside a price row.
Errors you can getWhy, and what to do.
| Code | Why, and what to do |
|---|---|
| 400 | The query was bad — a symbol with a dot or space, or days out of range. Fix the query. |
| 401 | The key is missing, revoked, or not yet known to the data server. Check the header format first. |
| 404 | The symbol is not in the archive. Check the spelling against GET /v1/symbols. |
| 429 | Over 5 calls in a minute, 100 in a day, or 1,000 in a month. Wait for the next minute, day, or month; the call did not read any data. |
| 500 | Something failed on the server. Try again; if it keeps failing, the saved files are unaffected. |
Free keys allow 5 calls a minute, 100 calls a day, and 1,000 calls a month across both doors. Symbols are 1–20 letters or digits, and lowercase works. See what is inside the archive and the disclaimer.
Ask your first question in the next five minutes.
Free to start. Upgrade only when you need more calls.