Logo Stock Analyzer MCP

Stock Analyzer MCP

Cộng đồng
kevinlin49361128-stack

📡 MCP server bundled with Stock Analyzer (macOS) — 81 tools, deep Taiwan + US stock coverage, local SQLite, BYOK LLM. First MCP with TWSE/TPEx + institutional flow + chip data.

Nhà phát hànhkevinlin49361128-stack
Kho mãstock-analyzer-mcp
Ngôn ngữJavaScript
Bản fork
3
Sao
10
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Stock Analyzer MCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    10 sao và 3 bản fork từ kho mã được liên kết.

Stock Analyzer MCP

📡 The Model Context Protocol server bundled with Stock Analyzer — a macOS desktop app for Taiwan + US stock market analysis.

An MCP server with deep Taiwan stock coverage (TWSE / TPEx + three major institutional flows + chip data + monthly revenue). 95 tools across 15 categories + 6 resources. Local-first — runs in-process inside the Electron app, no API costs, no cloud dependency.

Current version: MCP server 1.3.0 · Stock Analyzer app 0.48.0-beta · Updated 2026-06-30


⚠️ How this MCP server actually works

This repo contains the MCP shim source (mcp-server.js + lib/ai-tools + Dockerfile). The shim is a thin HTTP-to-stdio bridge — when an MCP client invokes a tool, the shim proxies the call to http://localhost:3000/api/*, where the Stock Analyzer desktop app's embedded Express backend does the actual work (DB query, computation, analysis).

The MCP server in this repo, run standalone (e.g. via docker run), can advertise its 95 tools through introspection but cannot execute them. You need Stock Analyzer running on the same machine for tools to actually return data.

This split is intentional — the analysis engine + market data + license-gated features live in the closed-source desktop app; the MCP shim is open-source (MIT) so the integration surface is fully transparent.


Why this repo exists

The Stock Analyzer desktop app itself is a commercial product (Lite tier free, Standard NT$1,499, Premium NT$2,999 — all one-time purchases, no subscription). This repo exists to:

  • Open-source the MCP shim layer under MIT so marketplaces (awesome-mcp-servers, mcpservers.org, PulseMCP, Glama) can build & verify a working image
  • Provide a public canonical link for MCP discovery
  • Host the integration guide separately from the closed app source
  • Make Claude Desktop / Claude Code / agentic frameworks easy to configure against the bundled MCP server

Build (Docker, for Glama / marketplaces)

bash
docker build -t stock-analyzer-mcp .
docker run -i --rm stock-analyzer-mcp   # stdio JSON-RPC on stdin/stdout

Image is ~258 MB (node:20-alpine + 2 npm deps). The build skips better-sqlite3, Electron, and other backend-only dependencies because the shim itself never imports them — all data calls go via HTTP to the locally-running Stock Analyzer app's /api/* endpoints.


What's in this MCP server

95 tools across 15 categories

CategoryToolsExamples
market (14)Quotes, history, heatmap, sector ranking, news, FX, seasonality, ETF holdings, trading-day statusget_stock_price, get_market_heatmap, get_seasonality
chips (6)Three major institutional flows, fund flow Sankey, insider alerts, abnormal blocks, margin rankingget_institutional_flow, get_fund_flow_sankey
fundamentals (6)Financial statements, monthly revenue, dividends, EPS, DCF valuationget_financial_statements, calculate_dcf
technical (5)RSI / MACD / KD / Bollinger / Beta / correlation / candlestick patternsget_technical_indicators, detect_kline_patterns
macro (8)FED policy, yield curve, inflation, employment, earnings calendarget_macro_snapshot, get_fed_policy_stance
sentiment (6)News sentiment, market sentiment, per-stock sentiment, forecasts, entry strategies, TAIFEX put/call ratioget_stock_sentiment_v2, get_sentiment_forecasts
portfolio (11)Holdings, P&L, performance, concentration, signals, trade CRUDget_portfolio, get_portfolio_concentration
backtest (5)Single-stock, multi-strategy, grid search, MC factor mining, random portfoliobacktest_strategy, monte_carlo_factor_mining
risk (6)VaR, systemic risk, portfolio optimization, marginal/component VaR contribution, stress test, scenario stress propagationget_systemic_risk, get_risk_contribution, run_scenario
ai workflow (7)Full-stock analysis, screener, workflows, notes, + deep-dive debate + daily briefing + candidate comparison + post-trade reviewresearch_stock_deep_dive, portfolio_daily_briefing
thesis (7)Investment hypothesis CRUD + quality evaluationupsert_thesis, evaluate_thesis_quality
watchlist (4)Watchlist CRUDadd_watchlist
alert (3)Price alertsset_price_alert
backfill (2)Admin data backfilltrigger_backfill
forecast (5)Price probability cone (GBM Monte Carlo), un-gameable forecast-calibration track-record, TW pre-open cross-market context, as-of knowability replay (multi-method calibration), per-stock pre-open US leadget_price_forecast, get_asof_replay, get_stock_preopen_lead

Every tool carries:

  • annotations.readOnlyHint — whether the tool modifies state (clients auto-confirm before destructive ops)
  • annotations.destructiveHint — delete_* / cancel_* flagged true
  • annotations.idempotentHint — upsert_* / update_* flagged true
  • _meta.tw.stockanalyzer/estimated_cost_usd — worst-case LLM cost (most tools $0; deep-dive ~$0.16)

6 resources (Claude Desktop @-mentionable)

Inject context into your conversation without burning tool calls:

ResourceContent
saa://portfolioFull holdings (TW + US, USD/TWD unified pricing, unrealized P&L)
saa://watchlistAll watchlist entries with live quotes + alert states
saa://thesisActive investment theses (hypothesis, key levels, next review dates)
saa://market/todayThree major institutional flows / sector winners / systemic risk / FX
saa://reports/recentLatest portfolio briefing (free; doesn't auto-trigger LLM)
saa://system/infoServer introspection (version, schema version, active profile, tool count)

Profiles (filter what gets exposed)

Set SAA_MCP_PROFILE env var to gate which tools are visible to the LLM client:

ProfileTools exposedUse case
default (omit)All 95Your personal Claude Desktop
safe_readonly80 read-only toolsShared / untrusted LLM clients — blocks add_trade / delete_* / upsert_thesis / set_price_alert / etc.

Resources stay available in both profiles (they're read-only by definition).


How it compares

ServerTW coverageUS coverageLocalLicense model
Alpha Vantage MCP⚠️ Delayed quotes only✅ Full❌ Cloud APIPay per call
Financial Datasets MCP❌ None✅ Full❌ Cloud APISubscription
EODHD MCP⚠️ EOD only✅ Full❌ Cloud APISubscription
Lambda Finance❌ None✅ Full + options❌ CloudSubscription
Stockflow (Yahoo)⚠️ Spotty TW data✅ Full❌ CloudFree (rate-limited)
Stock Analyzer MCP✅ Deep TWSE + TPEx + institutional + chip✅ Full✅ Local SQLiteOne-time license (Lite free)

For non-Taiwan readers: Taiwan stock market has its own data ecosystem (TWSE, TPEx OpenAPI, three major institutional investors, monthly revenue reporting) that's nearly absent from English-speaking financial data platforms. If you want an AI agent that can answer "How are TSMC's institutional investors trading lately?" or "Find me TW small-caps with >30% YoY revenue growth", Stock Analyzer MCP is built for exactly this — deterministic TW chip/institutional/revenue tools that English-focused MCP servers generally lack.


Quickstart: Claude Desktop

1. Install Stock Analyzer

Get the free Lite tier from stockanalyzer.tw. Version 0.47.4-beta or later ships MCP server v1.2.0.

2. Configure Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

jsonc
{
  "mcpServers": {
    "stock-analyzer": {
      "command": "/Applications/Stock Analyzer.app/Contents/Resources/app.asar.unpacked/bin/saa-mcp",
      "env": { "PORT": "3000" }
    }
  }
}

Why the wrapper? Running node mcp-server.js directly hits a better-sqlite3 ABI mismatch (the binding is compiled for Electron's Node, not the system's). The bin/saa-mcp wrapper auto-finds the SAA Electron runtime and runs the MCP server with ELECTRON_RUN_AS_NODE=1. Older configs that point to node will need updating.

3. (Optional) Restrict to read-only mode

If the LLM client isn't fully trusted (shared Claude project, third-party agent), add:

jsonc
"env": { "PORT": "3000", "SAA_MCP_PROFILE": "safe_readonly" }

This blocks 15 write tools (add_trade, delete_trade, upsert_thesis, set_price_alert, etc.) but keeps all read tools + all 6 resources.

4. Fully restart Claude Desktop (cmd+Q then reopen)

5. Try it

"List all SAA stock-analyzer tools"

"Analyze 2330 — institutional flow last month + 3-month momentum + radar score + give me a buy/sell view"

"@saa://portfolio — what's my biggest concentration risk?"

"Compare 2330, 2454, and 3008 as candidates. Include their theses if they exist."

Claude will orchestrate multiple tool calls (or @-mentions for resources) and synthesize a research report.


Headline tools (2026-05-18)

🎭 research_stock_deep_dive — Premium tier

5 specialized AI agents debate in parallel:

  • 🐂 Bull (only sees evidence supporting an upside thesis)
  • 🐻 Bear (only sees evidence supporting a downside thesis)
  • 📰 Sentiment (news + social signals)
  • 🛡️ Risk (volatility, drawdown history, regime context)
  • 🎯 Synthesizer (sees all four; produces a 6-level action: strong_buy → avoid)

Each agent uses a distinct subset of the 95 tools. Output includes per-agent reasoning + final action + confidence score. ~$0.16/call LLM cost (Anthropic Sonnet / OpenAI).

🌅 portfolio_daily_briefing — Lite tier

Pre-market or post-market portfolio briefing. Aggregates current holdings, unrealized P&L, sector exposure, relevant macro / institutional flow into an actionable summary.

  • mode='get' → reads the latest cached briefing (free, instant)
  • mode='generate' → runs a fresh one (~10-20s, ~$0.04/call LLM cost)

🔍 compare_investment_candidates — Lite, cost $0

Side-by-side deep analysis of 2-5 candidate stocks. Parallel fan-out of get_full_stock_analysis (fundamentals + technical + chip + institutional + levels) per candidate, plus existing thesis status. Deterministic — the agent sees raw evidence rather than an LLM-synthesized opinion, which empirically produces better reasoning.

📓 post_trade_review — Lite, cost $0

Past-N-days reflection. Aggregates analyze_trade_performance (FIFO P&L, win rate, hold time) + get_trade_journal (recent trades) + get_portfolio_signals (current state). Auto-detects observable patterns:

  • low_win_rate (< 40%) → systematic selection or timing problem
  • over_trading (avg hold < 5 days) → fees eating returns
  • lopsided_pnl (avg loss > avg win) → poor stop-loss discipline

Hands the agent objective indicators to write narrative review against.


Documentation

  • Full MCP usage guide (zh-TW + en): MCP-USAGE-GUIDE.md — Claude Desktop setup, troubleshooting, conversation examples
  • Launch blog post (bilingual): docs/mcp-launch-2026-05.md — context on the 2026 MCP finance landscape + why TW coverage was the gap
  • Tool reference: bundled inside the app at Settings → 🔌 MCP / Agent

Design philosophy

  • Local-first: All data lives in ~/.twse-analyzer/stock_history.db (SQLite, single file). MCP server runs in-process inside the Electron app via stdio transport.
  • BYOK LLM: SAA itself has an AI Hub that consumes the same 95 tools. Bring your own keys (Claude / GPT / Gemini / Ollama). The MCP server itself isn't tied to any LLM — it just exposes deterministic data + a few LLM-backed aggregators.
  • Transparent methodology: 16 bilingual methodology pages (zh-TW + en) explain every analytical tool's formula, data source, and limitations. Available at /methodology.html inside the app.
  • No active trading signals: Research output only — not order execution. Regulatory + product positioning decision.
  • Cost honesty: Every tool surfaces its worst-case LLM cost upfront via _meta.tw.stockanalyzer/estimated_cost_usd. No hidden cloud-API spend.

Versioning

The MCP server uses two version numbers:

FieldMeaningBump on
server_versionSAA MCP binary version (shown at initialize)Each SAA app release
tools_schema_version (in saa://system/info)Tool/resource shape versionTool added/removed/renamed/required-changed

Rules:

  • patch — additive (new tool, new resource)
  • minor — new required param, new enum restriction, readOnlyHint change
  • major — rename, removal, required-keys change

Current: server 1.2.0, schema 1.2.0. Changelog inside mcp-server.js header.


License

This documentation repo is MIT licensed (see LICENSE). The Stock Analyzer app itself is closed-source commercial software.


Contact

Dùng MCP Stock Analyzer MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Stock Analyzer MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Stock Analyzer MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Stock Analyzer MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "stock-analyzer-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Stock Analyzer MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Stock Analyzer MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Stock Analyzer MCP giúp tôi làm việc này không?
Stock Analyzer MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Stock Analyzer MCP.

Câu hỏi thường gặp

Máy chủ MCP Stock Analyzer MCP dùng để làm gì?

Stock Analyzer MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Stock Analyzer MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Stock Analyzer MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Stock Analyzer MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Stock Analyzer MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Stock Analyzer MCP với TypingMind?

Stock Analyzer MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Stock Analyzer MCP cung cấp những công cụ nào trong TypingMind?

Stock Analyzer MCP cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Stock Analyzer MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Stock Analyzer MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇