MCP Stock Analyst

Servidor MCP sem chave para cotações em tempo real, busca de ações e linhas K históricas em ações da China A, Hong Kong, EUA e Taiwan.

Documentação

MCP Stock Analyst (neeenja/mcp-stock-analyst) Actor

Remote MCP server for stock data: real-time quotes, fuzzy search (Chinese / pinyin / code) and historical K-lines for China A-shares, Hong Kong, Taiwan and US markets. Free upstream data source, no API key required. Love it? Support on Ko-fi ☕ ko-fi.com/panstories

Pricing

from $20.00 / 1,000 market data calls

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes. In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours, and optionally produces a well-defined JSON output, datasets with results, or files in key-value store. In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects. You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the API section below.

Each client library has reference documentation the quickstart does not restate: JavaScript/TypeScript (npm install apify-client) and Python (pip install apify-client).

README

MCP Stock Analyst 📈

English | 简体中文 | 繁體中文 | 🌍 Local Guides


MCP Stock Analyst (English)

A Model Context Protocol (MCP) server delivering stock market data across 13 markets — China A-shares, Hong Kong, US, Taiwan, Japan, India, Canada, South Korea, UK, France, Singapore, Germany and Malaysia — live quotes, smart symbol search and historical K-lines.

  • Zero-cost data: powered by free public market-data APIs (Tencent for A-share/HK/US, Yahoo Finance for Taiwan), no API key, no quota
  • 3 practical tools: real-time quotes (batch up to 10), fuzzy search (Chinese name / pinyin / ticker code), historical candlesticks
  • Dual transport: stdio (local desktop clients) + Streamable HTTP (remote hosting on Apify Standby)
  • Live on Apify Store: https://apify.com/neeenja/mcp-stock-analyst — pay-per-call, no subscription
  • Project page: https://panstories.github.io/mcp-stock-analyst — hosted GitHub Pages overview
  • Sartbot Featured — listed in the Sartbot MCP directory

Tools

  • get_quote — Real-time quote for one or many symbols (all 13 markets, up to 10 per call). Example: 600519,00700,AAPL,2330.TW,7203.T,RELIANCE.NS,005930.KS,HSBA.L,MC.PA,SAP.DE,RY.TO,D05.SI,1295.KL
  • search_stock — Fuzzy lookup by Chinese name, pinyin initials, partial code or English name. Example: 茅台 / GZMT / NVIDIA / 台积电 / TSMC
  • get_kline — Historical candlesticks (day / week / month, 20–640 bars). Example: 600519 or 2330.TW, period=day

All three tools work across every supported market — no separate tool per exchange.

Supported markets

MarketExampleYahoo suffix
China A-shares600519— (Tencent)
Hong Kong00700— (Tencent)
United StatesAAPL— (Tencent)
Taiwan2330.TW.TW / .TWO
Japan7203.T.T
IndiaRELIANCE.NS.NS / .BO
CanadaRY.TO.TO / .V
South Korea005930.KS.KS / .KQ
United KingdomHSBA.L.L
FranceMC.PA.PA
SingaporeD05.SI.SI
GermanySAP.DE.DE / .F
Malaysia1295.KL.KL

Global stock codes (Yahoo Finance)

Everything outside mainland China / Hong Kong / US — Taiwan plus Japan, India, Canada, South Korea, UK, France, Singapore, Germany and Malaysia — is served by Yahoo Finance (free, no key). Use the exchange suffix shown above:

  • 7203.T — Tokyo (explicit)
  • RELIANCE.NS / TCS.NS — NSE India (.BO = BSE)
  • RY.TO / TD.TO — Toronto (.V = TSX Venture)
  • 005930.KS — Korea KOSPI (.KQ = KOSDAQ)
  • HSBA.L — London
  • MC.PA — Paris (Euronext)
  • D05.SI — Singapore
  • SAP.DE — Xetra Germany (.F = Frankfurt)
  • 1295.KL — Malaysia
  • ^TWII, ^N225, ^FTSE, ^NSEI, ^GDAXI … — market indices (any Yahoo index symbol works)

Connect (recommended: hosted endpoint)

Use the hosted MCP endpoint with any MCP client via mcp-remote:

{
  "mcpServers": {
    "stock-analyst": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://neeenja--mcp-stock-analyst.apify.actor/mcp",
        "--header", "Authorization: Bearer ${APIFY_TOKEN}"
      ],
      "env": { "APIFY_TOKEN": "<your-apify-api-token>" }
    }
  }
}

Get your token from Apify Console → Settings → API & Integrations.

Or run locally (stdio)

git clone https://github.com/PanStories/mcp-stock-analyst
cd mcp-stock-analyst
npm install && npm run build
{
  "mcpServers": {
    "stock-analyst": {
      "command": "node",
      "args": ["C:\\path\\to\\mcp-stock-analyst\\build\\index.js"]
    }
  }
}

Debug locally

npx @modelcontextprotocol/inspector node build/index.js   # interactive inspector
node e2e-test.mjs        # stdio protocol end-to-end test
node http-e2e-test.mjs   # local HTTP end-to-end test

Pricing (pay-per-event)

No subscription, no monthly fee — you pay per tool call:

EventCharged whenPrice
tool-call (primary)each get_quote / get_kline call$0.02
search-calleach search_stock call$0.005

Always free: the MCP handshake (initialize) and tools/list. Discovery costs nothing.

Every Apify account includes $5 of free platform credit monthly (~250 quote calls), so light users effectively pay nothing.

HTTP endpoints (remote mode)

MethodPathPurpose
POST/mcpMCP protocol endpoint (stateless Streamable HTTP)
GET/healthhealth check
GET/service info; answers the Apify container readiness probe

Deploying your own instance

npm install -g apify-cli
apify login
cd mcp-stock-analyst
apify push             # builds the Docker image on Apify's infrastructure

The Actor definition (.actor/actor.json) already enables Standby mode with MCP path /mcp. Your endpoint will be https://<username>--mcp-stock-analyst.apify.actor/mcp (verify in Console → Endpoints, or read data.standbyUrl from GET https://api.apify.com/v2/acts/<actorId>?token=<token>).

Tech stack

  • Node.js ≥ 18, TypeScript, official @modelcontextprotocol/sdk
  • Data source: Tencent public market APIs (A-share/HK/US, free, no key) + Yahoo Finance chart API (Taiwan + Japan/India/Canada/Korea/UK/France/Singapore/Germany/Malaysia, free, no key)
  • Multi-stage Docker build (node:20-alpine)

Roadmap

  • [x] Pay-per-event billing
  • [x] Taiwan market support (TWSE / TPEx / TAIEX via Yahoo Finance)
  • [x] Global markets: Japan, India, Canada, South Korea, UK, France, Singapore, Germany, Malaysia (via Yahoo Finance)
  • [ ] Money flow / dragon-tiger list data
  • [ ] Financial report summaries
  • [ ] API-key auth layer (self-hosting)

License

MIT


MCP Stock Analyst(简体中文)

一个覆盖 13 个市场 的 MCP (Model Context Protocol) 服务器——A股/港股/美股/台股/日本/印度/加拿大/韩国/英国/法国/新加坡/德国/马来西亚——实时报价、智能搜索、历史K线。

  • 零成本数据源:A股/港股/美股用腾讯免费公开行情接口,台湾股用 Yahoo Finance,均无需 API key,无配额限制
  • 三个实用工具:实时报价(单次最多 10 个标的)、智能搜索(中文名/拼音/代码)、历史K线
  • 双传输模式:stdio(本地桌面客户端)+ Streamable HTTP(Apify Standby 远程托管)
  • 已上架 Apify Store:https://apify.com/neeenja/mcp-stock-analyst —— 按次付费,无订阅
  • 项目主页:https://panstories.github.io/mcp-stock-analyst —— GitHub Pages 概览页
  • Sartbot 精选 —— 收录于 Sartbot MCP 目录

工具列表

  • get_quote —— 实时报价,支持批量(13 个市场通用,单次最多 10 个)。示例:600519,00700,AAPL,2330.TW,7203.T,RELIANCE.NS,005930.KS,HSBA.L,MC.PA,SAP.DE,RY.TO,D05.SI,1295.KL
  • search_stock —— 智能搜索:中文名/拼音首字母/部分代码/英文名。示例:茅台 / GZMT / NVIDIA / 台积电 / TSMC
  • get_kline —— 历史K线(日/周/月,20–640 根)。示例:600519 或 2330.TW,period=day

三个工具在 13 个市场通用,不需要按交易所分别调用。

支持的市场

市场示例Yahoo 后缀
A股600519—(腾讯)
港股00700—(腾讯)
美股AAPL—(腾讯)
台湾2330.TW.TW / .TWO
日本7203.T.T
印度RELIANCE.NS.NS / .BO
加拿大RY.TO.TO / .V
韩国005930.KS.KS / .KQ
英国HSBA.L.L
法国MC.PA.PA
新加坡D05.SI.SI
德国SAP.DE.DE / .F
马来西亚1295.KL.KL

全球股票代码格式(Yahoo Finance)

除 A股/港股/美股外的所有市场——台湾以及日本、印度、加拿大、韩国、英国、法国、新加坡、德国、马来西亚——均由 Yahoo Finance 提供(免费、无 key)。请使用上表对应的交易所后缀:

  • 7203.T —— 东京(显式指定)
  • RELIANCE.NS / TCS.NS —— 印度 NSE(.BO = BSE)
  • RY.TO / TD.TO —— 多伦多(.V = TSX Venture)
  • 005930.KS —— 韩国 KOSPI(.KQ = KOSDAQ)
  • HSBA.L —— 伦敦
  • MC.PA —— 巴黎(泛欧交易所)
  • D05.SI —— 新加坡
  • SAP.DE —— 德国 Xetra(.F = 法兰克福)
  • 1295.KL —— 马来西亚
  • ^TWII、^N225、^FTSE、^NSEI、^GDAXI … —— 市场指数(任意 Yahoo 指数符号均可)

接入方式(推荐:云端端点)

任意 MCP 客户端通过 mcp-remote 连接云端端点:

{
  "mcpServers": {
    "stock-analyst": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://neeenja--mcp-stock-analyst.apify.actor/mcp",
        "--header", "Authorization: Bearer ${APIFY_TOKEN}"
      ],
      "env": { "APIFY_TOKEN": "<你的-Apify-token>" }
    }
  }
}

token 在 Apify Console → Settings → API & Integrations 获取。

或本地运行(stdio 模式)

git clone https://github.com/PanStories/mcp-stock-analyst
cd mcp-stock-analyst
npm install && npm run build
{
  "mcpServers": {
    "stock-analyst": {
      "command": "node",
      "args": ["C:\\path\\to\\mcp-stock-analyst\\build\\index.js"]
    }
  }
}

本地调试

npx @modelcontextprotocol/inspector node build/index.js   # 交互式调试界面
node e2e-test.mjs        # stdio 协议端到端测试
node http-e2e-test.mjs   # 本地 HTTP 端到端测试

计费(按事件付费)

无订阅、无月费,按工具调用次数收费:

事件触发时机单价
tool-call(主事件)每次行情数据调用:get_quote / get_kline$0.02
search-call每次标的检索:search_stock$0.005

永远免费: MCP 握手(initialize)和 tools/list——发现类请求不计费。

每个 Apify 账号每月自带 $5 平台免费额度(按 $0.02/次约 250 次报价调用),轻度用户实际等于免费用。

HTTP 端点(远程模式)

方法路径说明
POST/mcpMCP 协议端点(无状态 Streamable HTTP)
GET/health健康检查
GET/服务信息;响应 Apify 容器就绪探针

部署你自己的实例

npm install -g apify-cli
apify login
cd mcp-stock-analyst
apify push             # 在 Apify 平台侧构建 Docker 镜像

Actor 定义(.actor/actor.json)已启用 Standby 模式,MCP 路径 /mcp。端点形如 https://<username>--mcp-stock-analyst.apify.actor/mcp(以 Console → Endpoints 页为准,或通过 GET https://api.apify.com/v2/acts/<actorId>?token=<token> 返回的 data.standbyUrl 字段获取准确地址)。

技术栈

  • Node.js ≥ 18、TypeScript、官方 @modelcontextprotocol/sdk
  • 数据源:腾讯公开行情接口(A股/港股/美股,免费无 key)+ Yahoo Finance chart 接口(台湾 + 日本/印度/加拿大/韩国/英国/法国/新加坡/德国/马来西亚,免费无 key)
  • 多阶段 Docker 构建(node:20-alpine)

路线图

  • [x] 按事件计费
  • [x] 台湾市场支持(TWSE / TPEx / 加权指数,Yahoo Finance 数据源)
  • [x] 全球市场:日本、印度、加拿大、韩国、英国、法国、新加坡、德国、马来西亚(Yahoo Finance 数据源)
  • [ ] 资金流向 / 龙虎榜
  • [ ] 财报摘要
  • [ ] 自定义 API key 鉴权层(自托管时用)

许可证

MIT


MCP Stock Analyst(繁體中文)

一個覆蓋 13 個市場 的 MCP (Model Context Protocol) 伺服器——A股/港股/美股/台股/日本/印度/加拿大/韓國/英國/法國/新加坡/德國/馬來西亞——即時報價、智慧搜尋、歷史K線。

  • 零成本資料源:A股/港股/美股使用騰訊免費公開行情介面,台股使用 Yahoo Finance,皆無需 API key,無配額限制
  • 三個實用工具:即時報價(單次最多 10 個標的)、智慧搜尋(中文名稱/拼音/代碼)、歷史K線
  • 雙傳輸模式:stdio(本機桌面用戶端)+ Streamable HTTP(Apify Standby 遠端託管)
  • 已上架 Apify Store:https://apify.com/neeenja/mcp-stock-analyst —— 按次計費,無訂閱
  • 專案首頁:https://panstories.github.io/mcp-stock-analyst —— GitHub Pages 概覽頁
  • Sartbot 精選 —— 收錄於 Sartbot MCP 目錄

工具列表

  • get_quote —— 即時報價,支援批量(13 個市場通用,單次最多 10 個)。範例:600519,00700,AAPL,2330.TW,7203.T,RELIANCE.NS,005930.KS,HSBA.L,MC.PA,SAP.DE,RY.TO,D05.SI,1295.KL
  • search_stock —— 智慧搜尋:中文名稱/拼音首字母/部分代碼/英文名稱。範例:茅台 / GZMT / NVIDIA / 台積電 / TSMC
  • get_kline —— 歷史K線(日/週/月,20–640 根)。範例:600519 或 2330.TW,period=day

三個工具在 13 個市場通用,不需要按交易所分別呼叫。

支援的市場

市場範例Yahoo 後綴
A股600519—(騰訊)
港股00700—(騰訊)
美股AAPL—(騰訊)
台灣2330.TW.TW / .TWO
日本7203.T.T
印度RELIANCE.NS.NS / .BO
加拿大RY.TO.TO / .V
韓國005930.KS.KS / .KQ
英國HSBA.L.L
法國MC.PA.PA
新加坡D05.SI.SI
德國SAP.DE.DE / .F
馬來西亞1295.KL.KL

全球股票代碼格式(Yahoo Finance)

除 A股/港股/美股外的所有市場——台灣以及日本、印度、加拿大、韓國、英國、法國、新加坡、德國、馬來西亞——均由 Yahoo Finance 提供(免費、無 key)。請使用上表對應的交易所後綴:

  • 7203.T —— 東京(顯式指定)
  • RELIANCE.NS / TCS.NS —— 印度 NSE(.BO = BSE)
  • RY.TO / TD.TO —— 多倫多(.V = TSX Venture)
  • 005930.KS —— 韓國 KOSPI(.KQ = KOSDAQ)
  • HSBA.L —— 倫敦
  • MC.PA —— 巴黎(泛歐交易所)
  • D05.SI —— 新加坡
  • SAP.DE —— 德國 Xetra(.F = 法蘭克福)
  • 1295.KL —— 馬來西亞
  • ^TWII、^N225、^FTSE、^NSEI、^GDAXI … —— 市場指數(任意 Yahoo 指數符號均可)

連接方式(推薦:雲端端點)

任意 MCP 用戶端透過 mcp-remote 連接雲端端點:

{
  "mcpServers": {
    "stock-analyst": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://neeenja--mcp-stock-analyst.apify.actor/mcp",
        "--header", "Authorization: Bearer ${APIFY_TOKEN}"
      ],
      "env": { "APIFY_TOKEN": "<你的-Apify-token>" }
    }
  }
}

token 在 Apify Console → Settings → API & Integrations 取得。

或本機執行(stdio 模式)

git clone https://github.com/PanStories/mcp-stock-analyst
cd mcp-stock-analyst
npm install && npm run build
{
  "mcpServers": {
    "stock-analyst": {
      "command": "node",
      "args": ["C:\\path\\to\\mcp-stock-analyst\\build\\index.js"]
    }
  }
}

本機除錯

npx @modelcontextprotocol/inspector node build/index.js   # 互動式除錯介面
node e2e-test.mjs        # stdio 協定端對端測試
node http-e2e-test.mjs   # 本機 HTTP 端對端測試

計費(按事件付費)

無訂閱、無月費,按工具呼叫次數收費:

事件觸發時機單價
tool-call(主事件)每次行情資料呼叫:get_quote / get_kline$0.02
search-call每次標的檢索:search_stock$0.005

永遠免費: MCP 握手(initialize)和 tools/list——探索類請求不計費。

每個 Apify 帳號每月自帶 $5 平台免費額度(按 $0.02/次約 250 次報價呼叫),輕度用戶實際等於免費用。

HTTP 端點(遠端模式)

方法路徑說明
POST/mcpMCP 協定端點(無狀態 Streamable HTTP)
GET/health健康檢查
GET/服務資訊;回應 Apify 容器就緒探測

部署你自己的實例

npm install -g apify-cli
apify login
cd mcp-stock-analyst
apify push             # 在 Apify 平台側建置 Docker 映像檔

Actor 定義(.actor/actor.json)已啟用 Standby 模式,MCP 路徑 /mcp。端點形如 https://<username>--mcp-stock-analyst.apify.actor/mcp(以 Console → Endpoints 頁為準)。

技術棧

  • Node.js ≥ 18、TypeScript、官方 @modelcontextprotocol/sdk
  • 資料源:騰訊公開行情介面(A股/港股/美股,免費無 key)+ Yahoo Finance chart 介面(台股 + 日本/印度/加拿大/韓國/英國/法國/新加坡/德國/馬來西亞,免費無 key)
  • 多階段 Docker 建置(node:20-alpine)

路線圖

  • [x] 按事件計費
  • [x] 台灣市場支援(TWSE / TPEx / 加權指數,Yahoo Finance 資料源)
  • [x] 全球市場:日本、印度、加拿大、韓國、英國、法國、新加坡、德國、馬來西亞(Yahoo Finance 資料源)
  • [ ] 資金流向 / 龍虎榜
  • [ ] 財報摘要
  • [ ] 自訂 API key 驗證層(自架時用)

授權條款

MIT


Local Market Guides · 本地市場指南

Native-language quick guides for the five newly-added markets, ordered by the size of each country's stock-market capitalization (source: WFE / World Bank 2025 totals):

Japan ($6.4T) → France ($3.4T) → Germany ($2.0T) → South Korea ($1.7T) → Malaysia (~$0.4T).

Every stock below is written as English name · native name, and every ticker is served free by Yahoo Finance (no API key).

日本語 — 日本市場 (Japan) · ≈ $6.4T

日本の株式は Yahoo Finance から無料で取得できます。東京証券取引所(JPX)の銘柄には .T を付けます(例:7203.T)。

SymbolName (English · 日本語)
7203.TToyota Motor · トヨタ自動車
6758.TSony Group · ソニーグループ
8306.TMitsubishi UFJ Financial Group · 三菱UFJフィナンシャル・グループ
6861.TKeyence · キーエンス
^N225Nikkei 225 · 日経平均株価

Français — Marché français (France) · ≈ $3.4T

Les actions françaises sont disponibles gratuitement via Yahoo Finance. Les titres d'Euronext Paris utilisent le suffixe .PA (ex. : MC.PA).

SymboleNom (anglais · français)
MC.PALVMH (Moët Hennessy Louis Vuitton) · LVMH
OR.PAL'Oréal · L'Oréal
TTE.PATotalEnergies · TotalEnergies
AIR.PAAirbus · Airbus
SAN.PASanofi · Sanofi
^FCHICAC 40 · CAC 40

Deutsch — Deutscher Markt (Germany) · ≈ $2.0T

Deutsche Aktien erhalten Sie kostenlos über Yahoo Finance. Werte an Xetra / Frankfurt verwenden die Endung .DE (bzw. .F für Frankfurt; z. B. SAP.DE).

SymbolName (englisch · deutsch)
SAP.DESAP SE · SAP SE
SIE.DESiemens · Siemens AG
ALV.DEAllianz · Allianz SE
DTE.DEDeutsche Telekom · Deutsche Telekom AG
BMW.DEBMW · Bayerische Motoren Werke AG
^GDAXIDAX 40 · DAX

한국어 — 한국 시장 (South Korea) · ≈ $1.7T

한국 주식은 Yahoo Finance에서 무료로 제공됩니다. 한국거래소(KRX) 종목은 .KS(유가증권시장) 또는 .KQ(코스닥) 접미사를 사용합니다 (예: 005930.KS).

심볼이름 (영어 · 한국어)
005930.KSSamsung Electronics · 삼성전자
000660.KSSK hynix · SK하이닉스
035420.KSNAVER · 네이버
005380.KSHyundai Motor · 현대자동차
051910.KSLG Chem · LG화학
^KS11KOSPI · 코스피

Bahasa Melayu — Pasaran Malaysia (Malaysia) · ≈ $0.4T

Saham Malaysia didapati secara percuma melalui Yahoo Finance. Saham Bursa Malaysia menggunakan akhiran .KL (cth: 1295.KL).

SimbolNama (Inggeris · Melayu)
1295.KLPublic Bank · Public Bank Berhad
1155.KLMaybank · Malayan Banking Berhad
1023.KLCIMB Group · CIMB Group Berhad
5347.KLTenaga Nasional · Tenaga Nasional Berhad
6012.KLMaxis · Maxis Berhad
^KLSEFTSE Bursa Malaysia KLCI · Indeks Komposit Kuala Lumpur

Support · 赞助 · 贊助

EN — MCP Stock Analyst is open source (MIT), ad-free, and delivers zero-API-key quotes across A-shares / Hong Kong / US / Taiwan / Japan / India / Canada / South Korea / UK / France / Singapore / Germany / Malaysia. It is funded by the community, not by ads. If it powers your research or agents, please support it:

简体中文 — MCP Stock Analyst 开源(MIT)、无广告,提供 A股/港股/美股/台湾股/日本/印度/加拿大/韩国/英国/法国/新加坡/德国/马来西亚零 API key 行情, 由社区资助而非广告。若它支撑了你的研究或智能体,欢迎赞助:点本仓库的 Sponsor 按钮,或前往 Ko-fi: https://ko-fi.com/panstories

繁體中文 — MCP Stock Analyst 開源(MIT)、無廣告,提供 A股/港股/美股/台股/日本/印度/加拿大/韓國/英國/法國/新加坡/德國/馬來西亞零 API key 行情, 由社群資助而非廣告。若它支撐了你的研究或智能體,歡迎贊助:點本倉庫的 Sponsor 按鈕,或前往 Ko-fi: https://ko-fi.com/panstories

Actor input Schema

Actor input object example

{}

Actor output Schema

mcpEndpoint (type: string):

Streamable HTTP MCP endpoint of this Actor run. Connect an MCP client here (Authorization: Bearer <APIFY_TOKEN>). POST JSON-RPC messages: initialize, tools/list, tools/call.

API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

JavaScript example

import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("neeenja/mcp-stock-analyst").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

Python example

from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("neeenja/mcp-stock-analyst").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

CLI example

echo '{}' |
apify call neeenja/mcp-stock-analyst --silent --output-dataset

MCP server setup

{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,neeenja/mcp-stock-analyst"
        }
    }
}

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an Authorization: Bearer <APIFY_API_TOKEN> header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/RfRL7Nj8f9uZtqmhc/builds/3gFHmPfjeFvlZ9Cfz/openapi.json