Stock Analyzer MCP
81 tools for Taiwan + US stock market analysis. First MCP server with deep TWSE/TPEx coverage (institutional flows, chip data, monthly revenue). Local-first SQLite, BYOK LLM.
Stock Analyzer MCP
π‘ The Model Context Protocol server bundled with Stock Analyzer β a macOS desktop app for Taiwan + US stock market analysis.
First MCP server with deep Taiwan stock coverage (TWSE / TPEx + three major institutional flows + chip data + monthly revenue). 85 tools across 14 categories + 6 resources. Local-first β runs in-process inside the Electron app, no API costs, no cloud dependency.
Current version: MCP server 1.2.0 Β· Stock Analyzer app 0.47.2-beta Β· Updated 2026-05-18
Why this exists
This is the public documentation repo for the MCP server that ships inside the Stock Analyzer desktop app.
The app itself is a commercial product (Lite tier free, Standard NT$1,499, Premium NT$2,999 β all one-time purchases, no subscription). This docs repo exists to:
- Provide a public canonical link for MCP marketplaces (awesome-mcp-servers, mcpservers.org, PulseMCP)
- Host the MCP integration guide separately from the closed app source
- Make Claude Desktop / Claude Code / agentic frameworks easy to configure against the bundled MCP server
What's in this MCP server
85 tools across 14 categories
| Category | Tools | Examples |
|---|---|---|
| market (13) | Quotes, history, heatmap, sector ranking, news, FX, seasonality, ETF holdings | get_stock_price, get_market_heatmap, get_seasonality |
| chips (6) | Three major institutional flows, fund flow Sankey, insider alerts, abnormal blocks, margin ranking | get_institutional_flow, get_fund_flow_sankey |
| fundamentals (6) | Financial statements, monthly revenue, dividends, EPS, DCF valuation | get_financial_statements, calculate_dcf |
| technical (5) | RSI / MACD / KD / Bollinger / Beta / correlation / candlestick patterns | get_technical_indicators, detect_kline_patterns |
| macro (8) | FED policy, yield curve, inflation, employment, earnings calendar | get_macro_snapshot, get_fed_policy_stance |
| sentiment (5) | News sentiment, market sentiment, per-stock sentiment, forecasts, entry strategies | get_stock_sentiment_v2, get_sentiment_forecasts |
| portfolio (11) | Holdings, P&L, performance, concentration, signals, trade CRUD | get_portfolio, get_portfolio_concentration |
| backtest (5) | Single-stock, multi-strategy, grid search, MC factor mining, random portfolio | backtest_strategy, monte_carlo_factor_mining |
| risk (3) | VaR, systemic risk, portfolio optimization | calculate_portfolio_var, get_systemic_risk |
| ai workflow (6) | Full-stock analysis, screener, workflows, notes, + deep-dive debate + daily briefing + candidate comparison + post-trade review | research_stock_deep_dive, portfolio_daily_briefing |
| thesis (6) | Investment hypothesis CRUD | upsert_thesis |
| watchlist (4) | Watchlist CRUD | add_watchlist |
| alert (3) | Price alerts | set_price_alert |
| backfill (2) | Admin data backfill | trigger_backfill |
Every tool carries:
annotations.readOnlyHintβ whether the tool modifies state (clients auto-confirm before destructive ops)annotations.destructiveHintβdelete_*/cancel_*flagged trueannotations.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:
| Resource | Content |
|---|---|
saa://portfolio | Full holdings (TW + US, USD/TWD unified pricing, unrealized P&L) |
saa://watchlist | All watchlist entries with live quotes + alert states |
saa://thesis | Active investment theses (hypothesis, key levels, next review dates) |
saa://market/today | Three major institutional flows / sector winners / systemic risk / FX |
saa://reports/recent | Latest portfolio briefing (free; doesn't auto-trigger LLM) |
saa://system/info | Server 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:
| Profile | Tools exposed | Use case |
|---|---|---|
default (omit) | All 85 | Your personal Claude Desktop |
safe_readonly | 70 read-only tools | Shared / 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
| Server | TW coverage | US coverage | Local | License model |
|---|---|---|---|---|
| Alpha Vantage MCP | β οΈ Delayed quotes only | β Full | β Cloud API | Pay per call |
| Financial Datasets MCP | β None | β Full | β Cloud API | Subscription |
| EODHD MCP | β οΈ EOD only | β Full | β Cloud API | Subscription |
| Lambda Finance | β None | β Full + options | β Cloud | Subscription |
| Stockflow (Yahoo) | β οΈ Spotty TW data | β Full | β Cloud | Free (rate-limited) |
| Stock Analyzer MCP | β Deep TWSE + TPEx + institutional + chip | β Full | β Local SQLite | One-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 currently the only viable option.
Quickstart: Claude Desktop
1. Install Stock Analyzer
Get the free Lite tier from stockanalyzer.tw. Version 0.47.2-beta or later ships MCP server v1.2.0.
2. Configure Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"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.jsdirectly hits abetter-sqlite3ABI mismatch (the binding is compiled for Electron's Node, not the system's). Thebin/saa-mcpwrapper auto-finds the SAA Electron runtime and runs the MCP server withELECTRON_RUN_AS_NODE=1. Older configs that point tonodewill need updating.
3. (Optional) Restrict to read-only mode
If the LLM client isn't fully trusted (shared Claude project, third-party agent), add:
"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 85 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 problemover_trading(avg hold < 5 days) β fees eating returnslopsided_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 85 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.htmlinside 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:
| Field | Meaning | Bump on |
|---|---|---|
server_version | SAA MCP binary version (shown at initialize) | Each SAA app release |
tools_schema_version (in saa://system/info) | Tool/resource shape version | Tool added/removed/renamed/required-changed |
Rules:
- patch β additive (new tool, new resource)
- minor β new required param, new enum restriction,
readOnlyHintchange - 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
- Website: stockanalyzer.tw
- Email: [email protected]
- Issues: Use GitHub Issues on this repo for MCP integration questions
- For app feature requests or bug reports: email above
Related Servers
Topaz Labs Enhance
AI image enhancement (upscaling, denoising, sharpening) via the Topaz Labs cloud API.
Arithmetic MCP Server
Performs basic arithmetic operations such as addition, subtraction, multiplication, and division.
RustChain MCP
MCP server for RustChain Proof-of-Antiquity blockchain and BoTTube AI video platform β 14 tools for wallet management, mining stats, video operations, and agent-to-agent job marketplace.
alphavantage stock mcp
stock data, stock analytics
ForgingBlock
The infrastructure for AI-driven payments
Hardcover MCP
Talk to your Hardcover library from any AI assistant.
NIS2 Germany Registration MCP
NIS2 compliance for German Mittelstand β BSI registration workflows, NIS2UmsuCG gap analysis, incident reporting templates, and BetroffenheitsprΓΌfung (impact assessment) automation. Deadline: Oct 2026.
SuricataMCP
A server that allows MCP clients to use Suricata for network traffic analysis.
Fibrous MCP Server
A server for Fibrous Finance, a DeFi aggregation platform.
Upstox MCP Server
A Model Context Protocol (MCP) server that integrates with the Upstox Trading API, enabling AI agents like Claude to securely access Indian stock market data, perform technical analysis, and view account information in read-only mode.