TWSE OpenAPI MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TWSE_MCP_TTL | No | 資料快取秒數 | 3600 |
| TWSE_MCP_CACHE | No | swagger 快取位置 | ~/.cache/twse-mcp |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| twse_search_datasetsA | 搜尋證交所 OpenAPI 有哪些資料集可用。取資料前先用這個找 dataset_id。 會比對資料集代號、中文說明與欄位名稱。 Args: query: 關鍵字,例如 "ETF"、"基金"、"融資"、"本益比"、"月營收"。留空列出全部。 tag: 依分類過濾,例如 "證券交易"、"公司治理"、"財務報表"、"指數"、"券商資料"。 limit: 最多回傳幾筆(預設 25)。 |
| twse_describe_datasetA | 查看某個資料集的完整欄位定義,取資料前用來確認要過濾/投影哪些欄位。 Args: dataset_id: 來自 twse_search_datasets 的代號,例如 "exchangeReport/STOCK_DAY_ALL"。 |
| twse_get_datasetA | 取得證交所資料集內容,支援伺服器端過濾、欄位投影與分頁。 證交所每個 endpoint 都是一次回整份資料(可能上千筆),所以務必用 code / match / fields 縮小範圍,不要無條件拉全部。 Args: dataset_id: 資料集代號,例如 "exchangeReport/STOCK_DAY_ALL"。 code: 證券/基金代號,例如 "0050"。會自動偵測該表的代號欄位名稱。 match: 其他欄位的子字串過濾,例如 {"基金類型": "ETF"}。 fields: 只回傳這些欄位,例如 ["Code", "Name", "ClosingPrice"]。 limit: 回傳筆數上限(硬上限 200)。 offset: 分頁位移。 |
| twse_realtime_quoteA | 取得盤中即時報價(約 5 秒更新一次)。 OpenAPI 只有前一交易日資料,要當下的價格得走基本市況報導站。 ETF 與上市股票用 market="tse",上櫃用 "otc"。 Args: codes: 代號清單,例如 ["0050", "0056", "2330"]。 market: "tse"(上市)或 "otc"(上櫃)。 |
| etf_snapshotA | 一次取得單一上市 ETF 的完整概況:基本資料 + 當日價量 + 定期定額熱度。 合併三張證交所的表並行查詢,比分別呼叫 twse_get_dataset 快也不易出錯。 任何一段查不到都會標成 null 並記在 caveats,不會整個失敗。 Args: code: ETF 代號,例如 "0056"、"0050"、"00878"。 include_realtime: 是否附上盤中即時報價(盤後或休市時可能為空)。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/taux-io/twse-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server