TWSE MCP Server
🚀 TWStockMCPServer
一個全面的模型上下文協議 (MCP) 伺服器,專為台灣證券交易所 (TWSE) 數據分析設計,提供即時股票資訊、財務報表、ESG 數據和趨勢分析功能。
🌏 語言版本
English | 繁體中文
Related MCP server: Taiwan Stock Agent
🎬 示範影片
VSCode Copilot demo

Gemini CLI demo

觀看 TWStockMCPServer 功能展示
✨ 五大投資分析情境
📊 個股趨勢研判
短中長期技術面、基本面、籌碼面綜合分析
"分析台積電(2330)最近的走勢" / "鴻海(2317)適合長期投資嗎?"
💰 外資投資解讀
外資持股、產業流向、個股進出追蹤
"外資最近在買什麼股票?" / "半導體業外資投資趨勢如何?"
🔥 市場熱點捕捉
重大訊息、異常成交、權證活躍度監控
"今天有什麼重大消息?" / "哪些股票交易量異常活躍?"
💎 股利投資規劃
高殖利率篩選、除權息行事曆、配息穩定性分析
"推薦一些高殖利率股票" / "下個月有哪些公司要除權息?"
🎯 投資標的篩選
價值股/成長股篩選、ESG風險評估
"幫我找一些被低估的價值股" / "ESG表現好的公司有哪些?"
🧮 進階功能
期貨籌碼與選擇權分析
Put/Call Ratio、大額交易人未沖銷部位、三大法人期貨/選擇權部位
"台指期籌碼現在偏多還是偏空?" / "選擇權大額交易人在哪個價位布局?"
三大法人籌碼流向
上市/上櫃三大法人買賣超、外資產業配置
"三大法人今天買超哪些股票?" / "外資在哪個產業加碼?"
個股財報體檢
獲利能力、成長性、財務結構、配息政策、公司治理五面向分析
"幫我做台積電的財報體檢" / "這家公司的財務體質健不健康?"
買前風險掃描
處置股、注意股、當沖限制、停資停券名單比對
"這檔股票買進前有沒有被列處置或注意?"
期貨/三大法人歷史回溯查詢
openapi.taifex.com.tw 僅提供最新一個交易日,本專案改用期交所網站下載頁面
(www.taifex.com.tw):預設查最新交易日,也可回溯查詢期貨/選擇權每日行情、三大法人部位、大額交易人部位;
股票代號可直接查對應的股票期貨;最近 30 個交易日的期貨盤中走勢(由每筆成交彙總成分鐘 K 線,含夜盤)
"幫我拉台指期最近一個月的每日OHLC" / "外資期貨部位過去三個月怎麼變化?" / "上週五台指期盤中是怎麼走的?"
財報/營收/股利多期歷史
財報、月營收、股利改由公開資訊觀測站(MOPS)提供(上市、上櫃、興櫃、公發公司皆可):預設最新一期, 也可查任意過去季度的綜合損益表、資產負債表、現金流量表,多個月份的月營收,多年度股利分派,以及法說會行事曆; 另有重大訊息全文、董監持股與設質、內部人每月持股異動、庫藏股買回、背書保證與資金貸與
"比較台積電過去四季的毛利率和自由現金流" / "鴻海近五年配息穩定嗎?" / "這個月有哪些公司開法說會?" / "最近有哪些公司在買庫藏股?"
籌碼集中度與上櫃歷史
集保戶股權分散表(千張大戶、散戶持股比例,可看最近 13 週的逐週趨勢),上櫃個股日K、三大法人、融資融券可回溯任意過去日期; 上市當沖統計、除權息結果、類股指數歷史
"環球晶的大戶持股比例是多少?" / "半導體類指數上個月表現如何?"
ETF
所有投信、上市與上櫃(含債券 ETF、主動式 ETF):基本資料(經理公司、追蹤指數、配息頻率、經理人、上櫃 ETF 管理費)、每日已發行單位數增減與預估淨值/折溢價排行、每月規模/受益人數/申購買回/定期定額趨勢(2007 年起),以及成分股:每月前十大持股(2021-08 起)與每季占淨值 1% 以上的持股(2021-09 起)
"0050 現在溢價多少?" / "哪些 ETF 今天被大量買回?" / "00981A 這半年受益人數怎麼變化?" / "00878 前十大持股是哪些?"
總體經濟
國發會景氣對策信號(景氣燈號)與領先/同時/落後指標、臺灣 PMI/NMI、中央銀行每日匯率
"現在景氣燈號是什麼顏色?" / "新台幣最近一個月升還是貶?"
⚙️ 快速開始
🚀 線上使用(由 Prefect Horizon 提供支援)
本專案由 Prefect Horizon 提供支援,免費託管線上 remote MCP Server:
{
"twstockmcpserver": {
"transport": "streamable_http",
"url": "https://TW-Stock-MCP-Server.fastmcp.app/mcp"
}
}⚠️ 使用限制:為維持服務永續,此線上服務設有合理使用量上限(非無限制)。若需商業使用或較高呼叫量,強烈建議改用下方 Docker/本機方式自行架設伺服器,或使用 Prefect Horizon 的付費方案。
🙏 感謝 Prefect Horizon 支援本開源專案,讓社群能免費輕鬆試用。
🐳 Docker 使用(stdio)
{
"twstockmcpserver": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--pull=always",
"-e",
"MCP_STDIO=1",
"ghcr.io/twjackysu/twsemcpserver:latest"
]
}
}🎛️ 只開部分資料來源
工具很多,用不到的來源可以關掉,減少 client 要讀的工具清單。來源代號:twse(證交所)、tpex(櫃買中心)、taifex(期交所)、mops(公開資訊觀測站)、tdcc(集保)、sitca(投信投顧公會)、ndc(國發會)、cbc(央行)。
TWSE_INCLUDE_SOURCES=twse,tpex:只開這些來源(不設=全部)TWSE_EXCLUDE_SOURCES=taifex:關掉這些來源
工具只要用到一個沒開的來源就不會出現(例如 ETF 基本資料同時查投信投顧公會、證交所、櫃買中心)。Docker 用 -e TWSE_EXCLUDE_SOURCES=taifex 傳入。
🔧 本地安裝
git clone https://github.com/twjackysu/TWStockMCPServer.git
cd TWStockMCPServer
uv sync && uv run fastmcp dev inspector server.py📡 資料來源
來源 | 說明 | Tools |
台灣證交所官方 API — 公司治理、ESG、財務比率、公告名單、權證、券商等 | 105 個 | |
證交所網頁 API(皆預設最新交易日,可查任意過去日期)— 個股日K、月均價、估值、融資融券、上市三大法人買賣超(金額/股數)、全市場收盤行情、加權指數歷史、外資持股歷史、個股月/年成交彙總、鉅額交易明細、融券借券餘額/成交、除權除息計算結果、當日沖銷交易標的與統計、全部指數(含類股指數)收盤(皆可查最新或任意過去日期) | 19 個 | |
盤中即時多股報價(上市+上櫃)、ETF 已發行單位數與預估淨值/折溢價揭露 | 2 個 | |
櫃買中心 — 上櫃日收盤(最新一日;指定日期改用網站資料)、注意/處置股、零股、指數 | 5 個 | |
期交所 — 選擇權分析(Delta/未平倉增減)、保證金、年月統計 | 6 個 | |
期交所網站資料下載頁面 — 期貨/選擇權每日行情、三大法人(期貨/選擇權分計、總表、各契約、買賣權分計)、期貨與選擇權大額交易人部位、Put/Call Ratio(預設最新交易日,可回溯查詢;openapi.taifex.com.tw 僅提供最新一日)、期貨盤中分鐘 K 線(最近 30 個交易日的每筆成交) | 11 個 | |
綜合損益表/資產負債表/現金流量表、月營收、股利分派(皆預設最新一期,可查任意過去期間;上市櫃、興櫃、公發公司皆可)、重大訊息(含全文)、董監持股與設質、內部人持股異動、庫藏股、背書保證與資金貸與、法人說明會 | 11 個 | |
櫃買中心網站 API — 上櫃個股日K、三大法人買賣超(可依外資/投信/自營商排行)、三大法人買賣金額彙總(日/週/月)、融資融券、本益比/殖利率/淨值比、外資持股排行、除權除息計算結果(預設最新交易日,可回溯任意過去日期) | 7 個 | |
所有投信的 ETF 基本資料(另合併證交所基金基本資料、櫃買中心 ETF 商品規格)、每月規模/淨值/受益人數/申購買回/定期定額(2007 年起)、基金投資明細(每月前十大、每季占淨值 1% 以上持股) | 3 個 | |
集保戶股權分散表(最新一週完整級距,或最近 13 週逐週趨勢與週變化;後者走集保查詢頁) | 1 個 | |
景氣對策信號與景氣指標(1982 起)、臺灣採購經理人指數 PMI/NMI | 2 個 | |
新台幣及主要貿易對手通貨對美元每日匯率(1993 起) | 1 個 | |
衍生分析(由上述資料計算) | 還原權息日K、技術指標(MA、KD、RSI、MACD、布林通道)、估值選股 screener、同業比較(上市+上櫃) | 4 個 |
🤝 參與貢獻
歡迎PR!
📄 授權 & 免責聲明
MIT授權 | 僅供參考,不構成投資建議
Available Tools
128 toolsget_abnormal_accumulated_notice_stocksB
Get stocks with abnormal accumulated notice counts.
Returns information including:
Number: Record number (0 means no data)
Code: Stock code
Name: Stock name
RecentlyMetAttentionSecuritiesCriteria: Recently met attention securities criteria
Inputs: no named parameters.
get_after_hours_tradingB
Get after-hours fixed-price trading in the centralized market.
Inputs: no named parameters. Returns: result
get_block_trades_dailyB
Get daily block trade volume and value statistics.
Inputs: no named parameters. Returns: result
get_block_trades_monthlyB
Get monthly block trade volume and value statistics.
Inputs: no named parameters. Returns: result
get_block_trades_yearlyB
Get yearly block trade volume and value statistics.
Inputs: no named parameters. Returns: result
get_broker_basic_infoC
Get basic information for brokers.
Inputs: no named parameters.
get_broker_branch_infoB
Get broker branch office basic information.
Inputs: no named parameters.
get_broker_electronic_trading_statisticsC
Get electronic trading statistics.
Inputs: no named parameters.
get_broker_gender_statisticsB
Get broker personnel gender statistics.
Inputs: no named parameters.
get_broker_headquarters_infoC
Get basic information of broker headquarters.
Inputs: no named parameters.
get_broker_income_expenditureC
Get income and expenditure overview for brokers.
Inputs: no named parameters.
get_broker_monthly_statementsB
Get monthly statements for brokers.
Inputs: no named parameters.
get_broker_service_personnelB
Get personnel numbers by service type for brokers.
Inputs: no named parameters.
get_brokers_offering_regular_investmentB
Get list of brokers offering regular investment services.
Inputs: no named parameters.
get_central_depository_bond_redemptionC
Get central depository bond redemption data.
Inputs: no named parameters.
get_companies_cumulative_votingB
Get companies that use cumulative voting, full roll-call voting, or nominee nomination systems for electing directors and supervisors.
Inputs: no named parameters. Returns: result
get_companies_ownership_changes_business_scopeB
Get companies with ownership changes that also have major business scope changes and were suspended from trading.
Inputs: no named parameters. Returns: result
get_companies_ownership_changes_business_scope_tradingB
Get companies with ownership changes and major business scope changes that were changed to trading method.
Inputs: no named parameters. Returns: result
get_companies_with_anticompetitive_lossesB
Get all listed companies that have reported monetary losses from anti-competitive litigation (excluding zero or N/A values).
Inputs: no named parameters. Returns: result
get_companies_with_business_scope_changesB
Get companies with major changes in business scope.
Inputs: no named parameters. Returns: result
get_companies_with_csr_reports_103B
Get all companies required to prepare and submit CSR reports in 2014 (103 year).
Inputs: no named parameters. Returns: result
get_companies_with_inclusive_finance_dataB
Get all listed companies that have reported inclusive finance activities (excluding zero or N/A values).
Inputs: no named parameters. Returns: result
get_companies_with_independent_directorsB
Get all listed companies with information about independent directors.
Inputs: no named parameters. Returns: result
get_companies_with_ownership_changesB
Get companies with changes in ownership structure.
Inputs: no named parameters. Returns: result
get_companies_with_refineries_in_populated_areasB
Get all listed companies that have reported refineries in populated areas (excluding zero or N/A values).
Inputs: no named parameters. Returns: result
get_company_anticompetitive_litigationC
Obtain anti-competitive litigation losses information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_balance_sheetB
Obtain balance sheet for a listed company based on its stock code. Automatically detects company industry and uses appropriate financial statement format:
General industry (一般業)
Financial services (金融業)
Securities & futures (證券期貨業)
Financial holding companies (金控業)
Insurance (保險業)
Other industries (異業)
Inputs: code (required). Returns: result
get_company_board_infoB
Obtain board information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_ceo_dual_roleB
Get information about whether company chairmen also serve as CEOs.
Inputs: no named parameters. Returns: result
get_company_climate_managementB
Obtain climate-related management information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_community_relationsB
Obtain community relations information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_consolidated_director_compensationB
Obtain consolidated director compensation information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_consolidated_supervisor_compensationB
Obtain consolidated supervisor compensation information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_daily_insider_trades_preannouncedB
Obtain daily insider share transfer pre-announcements for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_daily_insider_trades_untransferredB
Obtain daily insider share transfers that have not yet been executed for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_director_compensationB
Obtain director compensation information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_dividendB
Obtain the dividend distribution information of a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_energy_managementB
Obtain energy management information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_eps_statisticsB
Obtain EPS statistics by industry for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_financial_reports_supervisor_acknowledgmentB
Obtain financial report acknowledgment by supervisors for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_food_safetyB
Obtain food safety information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_fuel_managementB
Obtain fuel management information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_governance_infoB
Obtain corporate governance information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_governance_regulationsB
Obtain corporate governance regulations and rules for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_greenhouse_gas_emissionsC
Obtain greenhouse gas emissions information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_human_developmentB
Obtain human development information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_inclusive_financeB
Obtain inclusive finance information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_income_statementA
Obtain comprehensive income statement for a listed company based on its stock code. Automatically detects company industry and uses appropriate financial statement format:
General industry (一般業)
Financial services (金融業)
Securities & futures (證券期貨業)
Financial holding companies (金控業)
Insurance (保險業)
Other industries (異業)
Inputs: code (required). Returns: result
get_company_information_disclosure_violationsC
Obtain information disclosure and shareholder meeting regulation violations for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_info_securityB
Obtain information security data for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_investor_communicationsB
Obtain investor communications information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_major_newsA
Get daily major announcements from listed companies.
Retrieves important company announcements and material information disclosures that may impact stock prices and investor decisions. Can filter by company code or get all announcements.
Args: code: Company stock code (optional). If provided, filters results for specific company. If empty, returns all major announcements.
Returns: Formatted string containing major announcements including: - Report date (出表日期) - Announcement date (發言日期) - Announcement time (發言時間) - Company code (公司代號) - Company name (公司名稱) - Subject/Title (主旨 ) - Applicable regulations (符合條款) - Event occurrence date (事實發生日) - Description/Details (說明)
Note: This API provides basic announcement information without speaker/contact details. For complete contact information, refer to company's official announcements.
Inputs: code. Returns: result
get_company_monthly_revenueB
Obtain monthly revenue information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_ownership_and_controlB
Obtain ownership and control information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_product_lifecycleB
Obtain product lifecycle information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_product_quality_safetyB
Obtain product quality and safety information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_profileB
Obtain the basic information of a listed company as a JSON string object based on its stock code.
Inputs: code (required). Returns: result
get_company_profitability_analysisC
Get profitability analysis for a specific listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_profitability_analysis_summaryA
Get profitability analysis query summary table (all companies aggregate report).
Args: page_size: Number of records per page (default: 20, max: 100) page_number: Page number to retrieve (default: 1, starts from 1) order_by: Field name to sort by. Available fields: - "公司代號" (Company Code) - "公司名稱" (Company Name) - "營業收入(百萬元)" (Revenue in millions) - "毛利率(%)(營業毛利)/(營業收入)" (Gross Margin %) - "營業利益率(%)(營業利益)/(營業收入)" (Operating Margin %) - "稅前純益率(%)(稅前純益)/(營業收入)" (Pre-tax Margin %) - "稅後純益率(%)(稅後純益)/(營業收入)" (Net Margin %) - "年度" (Year) - "季別" (Quarter) order_direction: Sort direction, "asc" for ascending or "desc" for descending (default: "asc")
Inputs: page_size, page_number, order_by, order_direction. Returns: result
get_company_quarterly_audit_varianceB
Obtain quarterly comprehensive income audited/reviewed figures that differ from forecast by more than 10% for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_quarterly_earnings_forecast_achievementC
Obtain quarterly earnings forecast achievement (simplified) for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_risk_managementB
Obtain risk management policy information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_sec_regulatory_penaltiesB
Obtain SEC regulatory penalty information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_supervisor_compensationB
Obtain supervisor compensation information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_supply_chain_managementB
Obtain supply chain management information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_waste_managementC
Obtain waste management information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_company_water_managementB
Obtain water resource management information for a listed company based on its stock code.
Inputs: code (required). Returns: result
get_cross_market_trading_infoB
Get daily cross-market trading information for listed and OTC stocks.
Inputs: no named parameters. Returns: result
get_daily_day_trading_targetsC
Get daily day trading targets and statistics.
Inputs: no named parameters. Returns: result
get_daily_market_trading_infoB
Get daily market trading information in the centralized market.
Inputs: no named parameters.
get_daily_securities_lending_volumeB
Get daily available volume for securities lending (margin trading).
Inputs: no named parameters.
get_dividend_rights_scheduleA
Get ex-dividend and ex-rights schedule for listed stocks.
Retrieves upcoming and historical ex-dividend/ex-rights dates along with detailed information about stock dividends, cash dividends, rights offerings, and other corporate actions. Essential for dividend investment strategies.
Args: code: Stock code (optional). If provided, filters results for specific company. If empty, returns all upcoming dividend/rights schedules.
Returns: Formatted string containing dividend/rights schedule including: - Ex-dividend/rights date (除權息日期) - Stock code (股票代號) - Company name (名稱) - Ex-dividend/rights type (除權息) - Stock dividend ratio (無償配股率) - Rights offering ratio (現金增資配股率) - Rights offering price per share (現金增資認購價) - Cash dividend (現金股利) - Number of shares offered (配股張數) - And other corporate action details
Inputs: code. Returns: result
get_etf_regular_investment_rankingA
Get top 10 securities by number of regular investment accounts (定期定額).
Retrieves ranking statistics for both individual stocks and ETFs based on the number of trading accounts using regular investment plans. This data helps identify the most popular securities for systematic investment strategies.
Returns: Formatted string containing top 10 regular investment rankings including: - Ranking number (排序) - Stock code (股票代號) - Stock name (股票名稱) - Number of stock trading accounts (股票交易戶數) - ETF code (ETF代號) - ETF name (ETF名稱) - Number of ETF trading accounts (ETF交易戶數)
Inputs: no named parameters. Returns: result
get_financial_program_abnormal_recommendationsB
Get stocks abnormally recommended in financial programs.
Inputs: no named parameters. Returns: result
get_first_listed_foreign_stocks_dailyB
Get daily trading volume and value of first-listed foreign stocks.
Inputs: no named parameters. Returns: result
get_foreign_companies_applying_for_listingB
Get foreign companies applying for first listing on TWSE.
Inputs: no named parameters. Returns: result
get_foreign_investment_by_industryA
Get foreign and mainland China investment holding ratios by industry category.
Returns comprehensive statistics of foreign investment holdings across different industry sectors in the Taiwan stock market, including the number of companies, total issued shares, foreign holdings, and holding percentages by industry.
Returns: Formatted string containing foreign investment statistics by industry including: - Industry category (產業別) - Number of companies (家數) - Total issued shares (總發行股數) - Foreign and mainland China total holdings (僑外資及陸資持有總股數) - Foreign and mainland China holding percentage (僑外資及陸資持股比率)
Inputs: no named parameters.
get_fund_basic_infoB
Get basic information summary for all funds.
Inputs: no named parameters.
get_local_companies_applying_for_listingB
Get local companies applying for listing.
Inputs: no named parameters. Returns: result
get_margin_loan_restrictions_announcementB
Get announcement of margin loan and short sale restrictions.
Inputs: no named parameters. Returns: result
get_margin_trading_infoB
Obtain margin trading and short selling balance information for the market.
Inputs: no named parameters.
get_market_disposal_stocksB
Get stocks that have been disposed by the market.
Inputs: no named parameters. Returns: result
get_market_gain_loss_statisticsB
Get market statistics of rising and falling securities.
Returns statistics including:
出表日期: Report date (ROC calendar format)
類型: Type (整體市場/股票/etc.)
上漲: Number of rising securities
漲停: Number of securities at upper limit
下跌: Number of falling securities
跌停: Number of securities at lower limit
持平: Number of unchanged securities
未成交: Number of non-traded securities
無比價: Number of securities without comparison
Inputs: no named parameters.
get_market_historical_indexB
Obtain historical TAIEX (Taiwan Capitalization Weighted Stock Index) data for long-term trend analysis.
Inputs: no named parameters.
get_market_holiday_scheduleB
Get holiday schedule for securities centralized trading market.
Inputs: no named parameters.
get_market_index_infoA
Obtain daily market closing information and overall market statistics.
Args: category: Index category to filter by: - "major": Major market indices (主要市場指數: 加權、台50、中型100等) - "sector": Industry sector indices (產業類指數: 電子類、金融類等) - "esg": ESG and sustainability indices (ESG永續相關指數) - "leverage": Leveraged and inverse indices (槓桿及反向指數) - "return": Total return indices (報酬指數: 含股息再投資) - "thematic": Thematic indices (主題指數: AI、5G、電動車等) - "dividend": High dividend indices (高股息相關指數) - "all": All indices (所有指數) count: Maximum number of indices to return (default: 20, max: 50 for non-all categories) format: Output format: - "detailed": Full details with all fields (詳細格式) - "summary": Compact summary with key info only (摘要格式: 指數名稱、收盤價、漲跌%) - "simple": Just index name and change percentage (簡單格式: 僅名稱和漲跌%)
Inputs: category, count, format.
get_odd_lot_trading_quotesB
Get odd-lot trading quotes in the centralized market.
Inputs: no named parameters. Returns: result
get_public_company_balance_sheetA
Obtain balance sheet for a public company based on its stock code. Automatically detects company industry and uses appropriate financial statement format.
Inputs: code (required). Returns: result
get_public_company_income_statementB
Obtain comprehensive income statement for a public company based on its stock code. Automatically detects company industry and uses appropriate financial statement format.
Inputs: code (required). Returns: result
get_public_company_monthly_revenueB
Obtain monthly revenue summary for a public company based on its stock code.
Inputs: code (required). Returns: result
get_public_company_profileB
Obtain basic information for a public company based on its stock code.
Inputs: code (required). Returns: result
get_real_time_trading_statsB
Obtain real-time 5-second trading statistics including order volumes and transaction counts.
Returns the latest 5-second interval trading statistics including:
Time: Trading time (HHMMSS format)
AccBidOrders: Accumulated bid orders count
AccBidVolume: Accumulated bid volume (in shares)
AccAskOrders: Accumulated ask orders count
AccAskVolume: Accumulated ask volume (in shares)
AccTransaction: Accumulated transaction count
AccTradeVolume: Accumulated trade volume (in shares)
AccTradeValue: Accumulated trade value (in million TWD)
Inputs: no named parameters.
get_recently_listed_companiesB
Get recently listed companies.
Inputs: no named parameters. Returns: result
get_securities_trading_changesB
Get securities trading method changes in the centralized market.
Inputs: no named parameters. Returns: result
get_stock_daily_tradingA
Obtain daily trading information for a listed company stock based on its stock code.
Returns information including:
Date: Trading date (ROC calendar YYYMMDD)
Code: Stock code
Name: Stock name
TradeVolume: Trade volume (in shares)
TradeValue: Trade value (in TWD)
OpeningPrice: Opening price
HighestPrice: Highest price
LowestPrice: Lowest price
ClosingPrice: Closing price
Change: Price change
Transaction: Transaction count
Inputs: code (required). Returns: result
get_stock_monthly_averageC
Obtain daily closing price and monthly average price for a listed company stock based on its stock code.
Inputs: code (required). Returns: result
get_stock_monthly_tradingA
Obtain monthly trading information for a listed company stock based on its stock code.
Returns information including:
Month: Trading month (ROC calendar YYMM)
Code: Stock code
Name: Stock name
HighestPrice: Highest price in the month
LowestPrice: Lowest price in the month
WeightedAvgPriceAB: Weighted average price
Transaction: Transaction count
TradeValueA: Trade value (in TWD)
TradeVolumeB: Trade volume (in shares)
TurnoverRatio: Turnover ratio (%)
Inputs: code (required). Returns: result
get_stock_price_changesC
Get stock price increase/decrease range.
Inputs: no named parameters.
get_stocks_no_price_change_first_five_daysA
Get stocks with no price change in the first five trading days.
Inputs: no named parameters. Returns: result
get_stock_valuation_ratiosA
Obtain P/E ratio, dividend yield, and P/B ratio for a listed company stock based on its stock code.
Returns information including:
Date: Data date (ROC calendar YYYMMDD)
Code: Stock code
Name: Stock name
PEratio: Price-to-Earnings ratio
DividendYield: Dividend yield (%)
PBratio: Price-to-Book ratio
Inputs: code (required). Returns: result
get_stock_yearly_tradingA
Obtain yearly trading information for a listed company stock based on its stock code.
Returns information including:
Year: Trading year (ROC calendar YYY)
Code: Stock code
Name: Stock name
TradeVolume: Total trade volume (in shares)
TradeValue: Total trade value (in TWD)
Transaction: Total transaction count
HighestPrice: Highest price in the year
HDate: Date of highest price
LowestPrice: Lowest price in the year
LDate: Date of lowest price
AvgClosingPrice: Average closing price
Inputs: code (required). Returns: result
get_suspended_day_trading_announcementC
Get announcement of suspended buy-sell-same-day trading targets.
Inputs: no named parameters. Returns: result
get_suspended_day_trading_historyB
Get historical query of suspended buy-sell-same-day trading.
Inputs: no named parameters. Returns: result
get_suspended_listed_companiesB
Get companies whose listing has been suspended.
Inputs: no named parameters. Returns: result
get_suspended_trading_stocksB
Get stocks suspended from trading in the centralized market.
Inputs: no named parameters. Returns: result
get_taiwan_50_index_historyB
Obtain historical data for Taiwan 50 Index.
Inputs: no named parameters.
get_taiwan_island_index_historyB
Obtain historical data for Taiwan Island Stock Price Index.
Inputs: no named parameters.
get_taiwan_total_return_indexB
Obtain Taiwan Capitalization Weighted Stock Price Return Index.
Inputs: no named parameters.
get_today_notice_stocksA
Get stocks announced as notice stocks today.
Returns information including:
Number: Record number (0 means no data)
Code: Stock code
Name: Stock name
NumberOfAnnouncement: Number of announcements
TradingInfoForAttention: Trading information for attention
Date: Announcement date
ClosingPrice: Closing price
PE: P/E ratio
Inputs: no named parameters.
get_top_20_volume_stocksB
Get top 20 stocks by trading volume in the centralized market.
Returns information including:
Date: Trading date
Rank: Volume ranking
Code: Stock code
Name: Stock name
TradeVolume: Trading volume
Transaction: Transaction count
OpeningPrice: Opening price
HighestPrice: Highest price
LowestPrice: Lowest price
ClosingPrice: Closing price
Dir: Direction (+/-)
Change: Price change
Inputs: no named parameters. Returns: result
get_top_foreign_holdingsA
Get top 20 companies by foreign and mainland China investment holdings.
Returns the ranking of companies with highest foreign investment holdings, including detailed information about investment limits, current holdings, and available investment capacity for each company.
Returns: Formatted string containing top 20 foreign holdings including: - Ranking (排行) - Stock code (證券代號) - Stock name (證券名稱) - Issued shares (發行股數) - Available investment shares (外資及陸資尚可投資股數) - Current foreign holdings (全體外資及陸資持有股數) - Available investment ratio (全體外資及陸資尚可投資比率) - Current holding ratio (全體外資及陸資持股比率) - Investment upper limit (投資上限)
Inputs: no named parameters.
get_twse_eventsA
Get Taiwan Stock Exchange event announcements and activities.
Retrieves information about TWSE organized events, seminars, training sessions, and other activities that may be of interest to market participants and investors.
Args: top: Number of top events to return (default: 10). If empty or 0, returns all events.
Returns: Formatted string containing TWSE events including: - Event number (No) - Event title/subject (活動主題) - Event details (詳細內容)
Inputs: top. Returns: result
get_twse_newsA
Get latest news from Taiwan Stock Exchange with optional date filtering.
Retrieves official news announcements from TWSE including market updates, regulatory changes, system maintenance notices, and other important information for market participants.
Args: start_date: Start date for filtering news (format: YYYYMMDD, e.g., "20250101") If empty, defaults to current month's first day end_date: End date for filtering news (format: YYYYMMDD, e.g., "20250131") If empty, defaults to current month's last day
Note: - If both dates are empty, returns current month's news - Date format must be YYYYMMDD (e.g., "20250822" for August 22, 2025) - API returns news in Chinese with dates in format YYYMMDD (民國年)
Returns: Formatted string containing TWSE news including: - Title (標題) - URL/Link (連結) - Date (日期) - in format YYYMMDD (民國年)
Inputs: start_date, end_date. Returns: result
get_valuation_ratios_by_dateB
Get stock P/E ratio, dividend yield and P/B ratio by date query.
Inputs: no named parameters.
get_warrant_basic_infoA
Get basic information of listed warrants.
Retrieves comprehensive basic data for all listed warrants including warrant codes, types, exercise periods, underlying assets, and other key parameters. Can filter by specific warrant code if provided.
Args: code: Warrant code (optional). If provided, filters results for specific warrant. If empty, returns all warrant basic information.
Returns: Formatted string containing warrant basic information including: - Report date (出表日期) - Warrant code (權證代號) - Warrant name (權證簡稱) - Warrant type (權證類型) - Category (類別) - Market maker quoting method (流動量提供者報價方式) - Exercise start date (履約開始日) - Last trading date (最後交易日) - Exercise deadline (履約截止日) - Issue size in thousand units (發行單位數量(仟單位)) - Settlement method (結算方式(詳附註編號說明)) - Underlying securities/index (標的證券/指數) - Latest exercise allocation per thousand units (最新標的履約配發數量(每仟單位權證)) - Original/latest exercise prices and price limits (原始/最新履約價格及上下限價格) - Notes (備註)
Inputs: code. Returns: result
get_warrant_daily_tradingA
Get daily trading data for listed call/put warrants.
Retrieves daily trading volume and value statistics for warrants, including transaction amounts and number of contracts traded.
Args: code: Warrant code (optional). If provided, filters results for specific warrant. If empty, returns all warrant trading data.
Returns: Formatted string containing warrant daily trading data including: - Report date (出表日期) - Warrant code (權證代號) - Warrant name (權證名稱) - Trading volume in lots (成交張數) - Trading value (成交金額)
Note: This API may return empty data when there are no warrant trades for the day. Check warrant basic info to see available warrants before querying trading data.
Inputs: code. Returns: result
get_warrant_trader_countA
Get daily number of warrant traders.
Retrieves statistics on the number of individual traders participating in warrant trading on each trading day, providing insights into warrant market participation levels.
Returns: Formatted string containing warrant trader count data including: - Report date (出表日期) - Trading date (日期) - Number of traders (人數)
Inputs: no named parameters. Returns: result
get_warrant_yearly_issuance_statisticsB
Get yearly issuance volume statistics for listed call/put warrants.
Retrieves annual statistics on warrant issuance volumes by type and period.
Returns: Formatted string containing warrant yearly issuance statistics including: - Year (年度) - Warrant type (權證類型) - Issuance volume (發行量) - And other issuance-related statistics
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 128 tools
Most tools are clearly distinct, targeting specific data categories like company financials, market statistics, or broker information. However, there is some overlap between company-specific tools (e.g., get_company_balance_sheet vs. get_public_company_balance_sheet) and between similar time-period tools (e.g., get_block_trades_daily/monthly/yearly), which could cause minor confusion. The descriptions help differentiate, but the sheer volume increases the risk of misselection.
Tool names follow a highly consistent verb_noun pattern throughout, all using snake_case with 'get_' as the prefix. The naming is predictable and systematic, making it easy to understand the purpose of each tool at a glance. There are no deviations in naming conventions across the 128 tools.
With 128 tools, the count is excessive for a single server, even for a comprehensive financial data provider. This creates a heavy and overwhelming surface that will be difficult for agents to navigate efficiently. A more modular approach with focused servers (e.g., company data, market stats, broker info) would be more appropriate.
The tool set provides exceptionally complete coverage of the TWSE domain, including company profiles, financials, governance, market indices, trading statistics, broker data, and regulatory information. There are no obvious gaps; it supports extensive querying across all relevant aspects of the Taiwan stock exchange, enabling comprehensive agent workflows without dead ends.
Maintenance
Related MCP Connectors
MCP server for real-time China A-share stock quotes, indices and market data.
Financial data MCP server for global quotes, news, financials, funds, bonds, IPOs and macro data.
MCP server for stocksense-ai documentation, generated by doc2mcp.
Related MCP Servers
FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that provides AI assistants with access to Shioaji trading API for the Taiwanese financial market.9-- AlicenseCqualityDmaintenanceProvides comprehensive Taiwan stock market data and analysis through MCP tools. Enables querying real-time stock prices, historical data, company information, technical analysis, and market overviews for TWSE and TPEx listed companies.816MIT
- ISC
- AlicenseAqualityDmaintenanceMCP server for TDCC OpenData, enabling natural language query of Taiwan securities custody data, including shareholding distribution, stock custody changes, offshore fund NAVs, and e-voting information.83MIT