Skip to main content
Glama

TWSE MCP Server

MIT License
18
  • Apple
  • Linux

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Schema

Prompts

Interactive templates invoked by user choice

NameDescription
stock_trend_analysis_promptPrompt for Taiwan stock trend analysis using TWSE OpenAPI endpoints.
foreign_investment_analysisPrompt for foreign investment analysis using TWSE OpenAPI endpoints.
market_hotspot_monitoringPrompt for market hotspot monitoring using TWSE OpenAPI endpoints.
dividend_investment_strategyPrompt for dividend investment strategy using TWSE OpenAPI endpoints.
investment_screeningPrompt for investment screening using TWSE OpenAPI endpoints.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
get_company_profile

Obtain the basic information of a listed company as a JSON string object based on its stock code.

get_company_dividend

Obtain the dividend distribution information of a listed company based on its stock code.

get_company_monthly_revenue

Obtain monthly revenue information for a listed company based on its stock code.

get_public_company_monthly_revenue

Obtain monthly revenue summary for a public company based on its stock code.

get_company_major_shareholders

Obtain major shareholders (over 10% ownership) information for a listed company based on its stock code.

get_company_eps_statistics

Obtain EPS statistics by industry for a listed company based on its stock code.

get_company_board_insufficient_shares

Get all listed companies where board members hold insufficient shares as required by law.

get_company_board_shareholdings

Obtain board members' shareholding details for a listed company based on its stock code.

get_company_daily_insider_trades_preannounced

Obtain daily insider share transfer pre-announcements for a listed company based on its stock code.

get_company_daily_insider_trades_untransferred

Obtain daily insider share transfers that have not yet been executed for a listed company based on its stock code.

get_company_sec_regulatory_penalties

Obtain SEC regulatory penalty information for a listed company based on its stock code.

get_companies_with_independent_directors

Get all listed companies with information about independent directors.

get_company_director_compensation

Obtain director compensation information for a listed company based on its stock code.

get_company_supervisor_compensation

Obtain supervisor compensation information for a listed company based on its stock code.

get_company_consolidated_director_compensation

Obtain consolidated director compensation information for a listed company based on its stock code.

get_company_consolidated_supervisor_compensation

Obtain consolidated supervisor compensation information for a listed company based on its stock code.

get_company_information_disclosure_violations

Obtain information disclosure and shareholder meeting regulation violations for a listed company based on its stock code.

get_companies_with_csr_reports_103

Get all companies required to prepare and submit CSR reports in 2014 (103 year).

get_public_company_profile

Obtain basic information for a public company based on its stock code.

get_market_disposal_stocks

Get stocks that have been disposed by the market.

get_company_board_insufficient_shares_consecutive

Get companies where board members have held insufficient shares for 3 consecutive months or more.

get_company_shareholder_meeting_announcements

Get comprehensive shareholder meeting announcements with all available information (since 2008).

get_company_shareholder_meeting_announcements_by_code

Get comprehensive shareholder meeting announcements for a specific company by stock code.

get_companies_with_ownership_changes

Get companies with changes in ownership structure.

get_company_shareholder_meeting_dates

Get shareholder meeting dates, locations and electronic voting information.

get_companies_with_business_scope_changes

Get companies with major changes in business scope.

get_companies_ownership_changes_business_scope

Get companies with ownership changes that also have major business scope changes and were suspended from trading.

get_companies_ownership_changes_business_scope_trading

Get companies with ownership changes and major business scope changes that were changed to trading method.

get_company_governance_regulations

Obtain corporate governance regulations and rules for a listed company based on its stock code.

get_company_ceo_dual_role

Get information about whether company chairmen also serve as CEOs.

get_company_board_pledged_shares

Get board members' pledged shares as a percentage of their actual holdings.

get_companies_cumulative_voting

Get companies that use cumulative voting, full roll-call voting, or nominee nomination systems for electing directors and supervisors.

get_company_shareholder_proposal_exercise

Get information about shareholder exercise of proposal rights.

get_company_income_statement

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 (異業)

get_company_balance_sheet

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 (異業)

get_company_quarterly_earnings_forecast_achievement

Obtain quarterly earnings forecast achievement (simplified) for a listed company based on its stock code.

get_company_quarterly_audit_variance

Obtain quarterly comprehensive income audited/reviewed figures that differ from forecast by more than 10% for a listed company based on its stock code.

get_company_profitability_analysis

Get profitability analysis for a specific listed company based on its stock code.

get_company_profitability_analysis_summary

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")

get_company_financial_reports_supervisor_acknowledgment

Obtain financial report acknowledgment by supervisors for a listed company based on its stock code.

get_public_company_balance_sheet

Obtain balance sheet for a public company based on its stock code. Automatically detects company industry and uses appropriate financial statement format.

get_public_company_income_statement

Obtain comprehensive income statement for a public company based on its stock code. Automatically detects company industry and uses appropriate financial statement format.

get_public_company_board_shareholdings

Obtain board member shareholding details for a public company based on its stock code.

get_company_governance_info

Obtain corporate governance information for a listed company based on its stock code.

get_company_climate_management

Obtain climate-related management information for a listed company based on its stock code.

get_company_risk_management

Obtain risk management policy information for a listed company based on its stock code.

get_company_supply_chain_management

Obtain supply chain management information for a listed company based on its stock code.

get_company_info_security

Obtain information security data for a listed company based on its stock code.

get_company_anticompetitive_litigation

Obtain anti-competitive litigation losses information for a listed company based on its stock code.

get_companies_with_anticompetitive_losses

Get all listed companies that have reported monetary losses from anti-competitive litigation (excluding zero or N/A values).

get_company_inclusive_finance

Obtain inclusive finance information for a listed company based on its stock code.

get_companies_with_inclusive_finance_data

Get all listed companies that have reported inclusive finance activities (excluding zero or N/A values).

get_company_community_relations

Obtain community relations information for a listed company based on its stock code.

get_companies_with_refineries_in_populated_areas

Get all listed companies that have reported refineries in populated areas (excluding zero or N/A values).

get_company_ownership_and_control

Obtain ownership and control information for a listed company based on its stock code.

get_company_product_quality_safety

Obtain product quality and safety information for a listed company based on its stock code.

get_company_food_safety

Obtain food safety information for a listed company based on its stock code.

get_company_product_lifecycle

Obtain product lifecycle information for a listed company based on its stock code.

get_company_fuel_management

Obtain fuel management information for a listed company based on its stock code.

get_company_investor_communications

Obtain investor communications information for a listed company based on its stock code.

get_company_board_info

Obtain board information for a listed company based on its stock code.

get_company_human_development

Obtain human development information for a listed company based on its stock code.

get_company_waste_management

Obtain waste management information for a listed company based on its stock code.

get_company_water_management

Obtain water resource management information for a listed company based on its stock code.

get_company_energy_management

Obtain energy management information for a listed company based on its stock code.

get_company_greenhouse_gas_emissions

Obtain greenhouse gas emissions information for a listed company based on its stock code.

get_company_major_news

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.

get_twse_news

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 (民國年)

get_twse_events

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 (詳細內容)

get_foreign_companies_applying_for_listing

Get foreign companies applying for first listing on TWSE.

get_recently_listed_companies

Get recently listed companies.

get_suspended_listed_companies

Get companies whose listing has been suspended.

get_local_companies_applying_for_listing

Get local companies applying for listing.

get_stock_daily_trading

Obtain daily trading information for a listed company stock based on its stock code.

get_stock_monthly_average

Obtain daily closing price and monthly average price for a listed company stock based on its stock code.

get_stock_monthly_trading

Obtain monthly trading information for a listed company stock based on its stock code.

get_stock_yearly_trading

Obtain yearly trading information for a listed company stock based on its stock code.

get_stock_valuation_ratios

Obtain P/E ratio, dividend yield, and P/B ratio for a listed company stock based on its stock code.

get_etf_regular_investment_ranking

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交易戶數)

get_warrant_basic_info

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 (備註)

get_warrant_daily_trading

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.

get_warrant_trader_count

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 (人數)

get_warrant_yearly_issuance_statistics

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

get_dividend_rights_schedule

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

get_stocks_no_price_change_first_five_days

Get stocks with no price change in the first five trading days.

get_financial_program_abnormal_recommendations

Get stocks abnormally recommended in financial programs.

get_daily_day_trading_targets

Get daily day trading targets and statistics.

get_suspended_day_trading_announcement

Get announcement of suspended buy-sell-same-day trading targets.

get_suspended_day_trading_history

Get historical query of suspended buy-sell-same-day trading.

get_cross_market_trading_info

Get daily cross-market trading information for listed and OTC stocks.

get_top_20_volume_stocks

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

get_odd_lot_trading_quotes

Get odd-lot trading quotes in the centralized market.

get_suspended_trading_stocks

Get stocks suspended from trading in the centralized market.

get_after_hours_trading

Get after-hours fixed-price trading in the centralized market.

get_margin_loan_restrictions_announcement

Get announcement of margin loan and short sale restrictions.

get_block_trades_daily

Get daily block trade volume and value statistics.

get_block_trades_monthly

Get monthly block trade volume and value statistics.

get_block_trades_yearly

Get yearly block trade volume and value statistics.

get_first_listed_foreign_stocks_daily

Get daily trading volume and value of first-listed foreign stocks.

get_securities_trading_changes

Get securities trading method changes in the centralized market.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/twjackysu/TWSEMCPServer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server