TWSE Open Data (Taiwan Stock Exchange)
Server Details
Taiwan Stock Exchange (TWSE) open data as MCP tools: stock quotes, ETF data, 140+ public datasets.
- Status
- Healthy
- Last Tested
- Transport
- Streamable HTTP
- URL
- Repository
- taux-io/twse-mcp
- GitHub Stars
- 0
- Server Listing
- TWSE OpenAPI MCP Server
Glama MCP Gateway
Connect through Glama MCP Gateway for full control over tool access and complete visibility into every call.
Full call logging
Every tool call is logged with complete inputs and outputs, so you can debug issues and audit what your agents are doing.
Tool access control
Enable or disable individual tools per connector, so you decide what your agents can and cannot do.
Managed credentials
Glama handles OAuth flows, token storage, and automatic rotation, so credentials never expire on your clients.
Usage analytics
See which tools your agents call, how often, and when, so you can understand usage patterns and catch anomalies.
Tool Definition Quality
Average 4.4/5 across 5 of 5 tools scored. Lowest: 3.9/5.
Each tool serves a distinct purpose: searching datasets, describing schemas, fetching raw data, getting real-time quotes, and retrieving a pre-assembled ETF snapshot. Even though etf_snapshot overlaps somewhat with get_dataset and realtime_quote, the descriptions clearly delineate their roles.
All tools share the twse_ prefix, and most use a verb_noun pattern (describe_dataset, get_dataset, search_datasets). However, twse_realtime_quote and twse_etf_snapshot use noun-only names, lacking an explicit verb, which introduces a minor inconsistency.
With 5 tools, the server is well-scoped for its purpose of providing access to TWSE and Futures Exchange data. The tools cover the essential actions—discovery, schema inspection, data retrieval, and real-time quotes—without unnecessary bloat.
The toolset covers the complete workflow: search for datasets, describe their fields, fetch data with filtering and pagination, and obtain real-time quotes. The ETF snapshot is a nice convenience. Minor gaps like batch real-time quotes for multiple symbols are not critical for the core domain.
Available Tools
5 toolstwse_describe_datasetAInspect
查看某個資料集的完整欄位定義,取資料前用來確認要過濾/投影哪些欄位。
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_id | Yes | 來自 twse_search_datasets 的資料集代號,例如 "exchangeReport/STOCK_DAY_ALL"。 |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are not provided, so the description carries the full burden. It implies a read-only operation via '查看' (view) and places it 'before fetching data', which adequately communicates non-destructive behavior for a describe tool. However, it does not explicitly mention additional behavioral details like return format or potential errors, and there is no annotation context to supplement.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence in Chinese. It front-loads the core purpose and then adds usage context, with no redundant words or filler. It earns a perfect score for conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description should clarify what the agent receives as a response. It states the tool shows '完整欄位定義' (complete field definitions), which is a reasonable hint, but it does not specify the format or structure of the returned definitions. For a simple describe operation with one fully documented parameter, this is an adequate but not rich description, so a 3 is justified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 100% coverage for the one parameter, dataset_id, with a helpful description (e.g., '來自 twse_search_datasets 的資料集代號'). The tool description itself does not add parameter-level detail beyond what the schema provides, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: '查看某個資料集的完整欄位定義' (view the complete field definitions of a dataset). It uses a specific verb (view) and resource (field definitions), and the context '取資料前' (before fetching data) distinguishes it from the sibling tool twse_get_dataset that likely fetches data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear usage context: '取資料前用來確認要過濾/投影哪些欄位' (before fetching data, use it to confirm which fields to filter/project). It implies using this tool before twse_get_dataset, but does not explicitly name alternatives or state when not to use it, so it falls just short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
twse_etf_snapshotAInspect
一次取得單一上市 ETF 的完整概況:基本資料 + 前一交易日價量 + 定期定額熱度。價量為前一交易日,不是盤中即時;要當下價格請用 twse_realtime_quote。合併三個證交所資料集並行查詢。任何一段查不到都會標成 null 並記在 caveats,不會整個失敗。
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ETF 代號,例如 "0056"、"0050"、"00878"。 | |
| include_realtime | No | 是否附上盤中即時報價。預設 false,需要當下價格時才帶 true(多一次外呼)。 |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses that the tool merges three TWSE datasets and queries in parallel, and explains the failure behavior: '任何一段查不到都會標成 null 並記在 caveats,不會整個失敗' (any missing segment is marked as null and recorded in caveats, not causing overall failure). This adds significant behavioral context beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences long, front-loaded with the main purpose, then a key caveat, then behavioral details. Every sentence contributes distinct information without redundancy, making it appropriately concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema and annotations, the description covers essential context: the high-level output contents, data freshness disclaimer, parallel querying, and error handling with nulls and caveats. This is sufficient for an agent to understand what to expect and when to use the tool, making it complete for its complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides 100% coverage for both parameters: 'code' includes examples and 'include_realtime' explains its default and extra call. The tool description itself adds no additional parameter details, so the baseline of 3 applies as per the rubric.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: '一次取得單一上市 ETF 的完整概況' (obtain a complete overview of a single listed ETF), and lists the exact components (basic info, previous trading day price/volume, periodic investment popularity). It also distinguishes itself from a sibling tool by explicitly directing users to twse_realtime_quote for real-time prices.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit when-not-to-use guidance: '價量為前一交易日,不是盤中即時;要當下價格請用 twse_realtime_quote' (price/volume is from previous trading day, not real-time; use twse_realtime_quote for current price). This names the alternative tool and clarifies the scope, satisfying the requirement for explicit usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
twse_get_datasetAInspect
取得證交所或期交所資料集內容,支援伺服器端過濾、欄位投影與分頁。兩邊的每個資料集都是一次回整份(可能上萬筆),務必用 code/match/fields 縮小範圍。
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | 證券/基金/契約代號,例如 "0050"、"TX"。一律精確比對(不分大小寫),實際用了哪個欄位會回在 code_field_used。找不到完全相符的代號時回 0 筆,並在 code_candidates 給出拼法相近的代號——**那些是候選不是答案**,可能是不同商品(MXF 與 MXFFX 是不同契約),請確認後改用該代號重查,不要直接引用它們的數字。 | |
| limit | No | 回傳筆數上限(硬上限 200)。 | |
| match | No | 其他欄位的子字串過濾,例如 {"基金類型": "ETF"}。最多 20 個欄位。 | |
| fields | No | 只回傳這些欄位。 | |
| offset | No | 分頁位移。 | |
| dataset_id | Yes | 資料集代號,例如 "exchangeReport/STOCK_DAY_ALL"。 |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the transparency burden. It discloses a key behavioral trait: every dataset returns the whole batch at once, potentially tens of thousands of records, and advises filtering. This is significant context beyond the schema. It doesn't mention output ordering or the hard 200-row limit, but that lives in the parameter schema, and the description's disclosure is valuable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences. The first states purpose and features; the second delivers a critical usage warning. No fluff, front-loaded with the most important information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 6-parameter tool with no output schema and no annotations, the description covers the essential context: purpose, filtering capabilities, and a critical large-data behavior. The per-parameter schema descriptions handle the rest. It could mention return format or ordering, but the description is robust enough for agent use, especially with rich sibling tool names providing context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% with detailed parameter descriptions for each field. The tool description only collectively mentions code/match/fields as scope-reducing parameters, which adds a usage hint but does not add meaning beyond what the schema already provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves dataset content from TWSE/TPEx with server-side filtering, field projection, and pagination. The verb '取得' and resource '資料集內容' are specific, and the feature list distinguishes it from sibling tools like twse_describe_dataset or twse_search_datasets.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use the tool: when fetching dataset content, and includes a strong directive to use code/match/fields to narrow scope because datasets return in full (up to tens of thousands of rows). It doesn't explicitly contrast with alternatives, but it implies this is the data-fetching tool versus metadata/search tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
twse_realtime_quoteAInspect
取得盤中即時報價(約 5 秒更新一次)。OpenAPI 只有前一交易日資料,要當下的價格得走基本市況報導站。ETF 與上市股票用 market="tse",上櫃用 "otc"。
| Name | Required | Description | Default |
|---|---|---|---|
| codes | Yes | 代號清單,例如 ["0050", "0056", "2330"]。 | |
| market | No | "tse"(上市)或 "otc"(上櫃)。 | tse |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and discloses key behaviors: ~5-second update interval and the distinction between real-time and previous-day data. It doesn't mention return fields or errors, but for a simple read-only quote tool, this is adequate context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is exactly two sentences, front-loaded with the main purpose, and each sentence contributes distinct value: the first states function and update frequency, the second covers data source comparison and parameter guidance. No fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with only 2 parameters and no output schema, the description covers purpose, usage context, and parameter rules. It doesn't describe the response format, which is a minor omission but not critical for a quote-fetching tool with clear intent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema descriptions already cover both parameters at 100%. The description adds practical semantics beyond the schema by specifying that market should be 'tse' for ETFs and listed stocks, and 'otc' for OTC, enriching the enum's meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it obtains real-time intraday quotes with a ~5-second refresh, explicitly distinguishing from OpenAPI's previous-day data. This is unique among sibling tools, which focus on dataset access, not live quotes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives explicit when-to-use guidance: use this tool when you need current prices, since OpenAPI only has prior trading day data. It also provides concrete market-selection rules for ETFs/listed stocks (tse) vs OTC (otc), covering the main usage decision.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
twse_search_datasetsAInspect
搜尋臺灣證交所與期交所 OpenAPI 有哪些資料集可用。取資料前先用這個找 dataset_id。會比對資料集代號、中文說明與欄位名稱。期交所的資料集代號一律以 taifex/ 開頭,搜期貨與選擇權可用 tag="期貨與選擇權"。
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | 依分類過濾,例如 "證券交易"、"公司治理"、"財務報表"。 | |
| limit | No | 最多回傳幾筆(預設 25)。 | |
| query | No | 關鍵字,例如 "ETF"、"融資"、"本益比"。留空列出全部。 |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It explains the search matching behavior (against dataset codes, Chinese descriptions, and field names) and the taifex/ prefix convention for futures exchange datasets. This adds meaningful context beyond just 'search', though it doesn't mention return format or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three concise sentences in Chinese, front-loaded with the core purpose, followed by a usage instruction and a useful domain hint. Every sentence adds value and there is no redundant or filler wording.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 3 optional params, no annotations, and no output schema. The description establishes the tool's role in the workflow (finding dataset_id before fetching), its search scope, and a naming convention. It could mention the return structure, but the purpose implicitly promises dataset IDs in the results, making it sufficiently complete for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description enriches the parameter semantics by explaining that query matches dataset codes, Chinese descriptions, and field names, and by providing a specific tag example for futures/options. This goes beyond the schema's brief parameter descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: searching available datasets from Taiwan Stock Exchange and Futures Exchange OpenAPI, specifically to find dataset_id before retrieving data. It distinguishes itself from siblings like twse_get_dataset (which fetches data) and twse_describe_dataset (which describes a dataset).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit usage context: '取資料前先用這個找 dataset_id' (use this before fetching data to find dataset_id), and gives a concrete search hint for futures/options using tag='期貨與選擇權'. It does not explicitly name alternative tools or state when not to use it, but the workflow guidance is clear and actionable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Frequently Asked Questions
Claiming proves that you control a remote MCP connector. It does not move, proxy, or interrupt the server.
Open the connector listing, choose Claim ownership, and sign in to Glama.
Complete one verification method:
GitHub identity — fastest for official registry listings. For a namespace such as
io.github.alice/server, link the matching GitHub user or an account that owns the GitHub organization, then choose Claim with GitHub.HTTP challenge — works when you can deploy a public file. Generate a token, publish the exact JSON Glama shows at
/.well-known/glama.jsonon the same origin as the connector, then choose Check HTTP challenge.DNS challenge — works when you control DNS but cannot change the server. Generate a token, create the exact TXT record Glama shows, wait for it to propagate, then choose Check DNS challenge.
After verification, Glama sends a confirmation email and gives you access to listing details, thumbnails, health checks, and analytics. Keep the HTTP file or DNS record in place: Glama periodically checks it and ownership remains verified while the token is discoverable.
The HTTP ownership file has this structure:
{
"$schema": "https://glama.ai/mcp/schemas/connector.json",
"claim": "glama_claim_..."
}Claim tokens are opaque, stable, and bound to the signed-in Glama account. They contain no email address or other personal information. If Glama can no longer discover a verified HTTP or DNS token, it starts a seven-day grace period before removing claim-based access. Restore the same token during that period to keep ownership verified. Never publish an email address, Glama session token, GitHub token, or connector credential as ownership proof.
If verification fails, confirm that you copied the current token exactly. The HTTP file must be public, return valid JSON with a successful HTTP response, and stay on the connector's origin. DNS changes may need more time to propagate. A claim cannot transfer to a different origin or hostname: if the connector target changes, Glama starts the grace period and the new target must be claimed separately after the previous claim is released.
For a connector linked to the official MCP Registry, registry updates continue to replace its name, description, and URL by default. After claiming, open Manage connector and enable Use Glama listing details as the source of truth if edits made on Glama should be preserved. Categories and thumbnails are always managed on Glama; registry linkage and technical connection settings continue to sync.
Control your server's listing on Glama, including description and metadata
Access analytics and receive server usage reports
Get monitoring and health status updates for your server
Feature your server to boost visibility and reach more users
For users:
Full audit trail – every tool call is logged with inputs and outputs for compliance and debugging
Granular tool control – enable or disable individual tools per connector to limit what your AI agents can do
Centralized credential management – store and rotate API keys and OAuth tokens in one place
Change alerts – get notified when a connector changes its schema, adds or removes tools, or updates tool definitions, so nothing breaks silently
For server owners:
Proven adoption – public usage metrics on your listing show real-world traction and build trust with prospective users
Tool-level analytics – see which tools are being used most, helping you prioritize development and documentation
Direct user feedback – users can report issues and suggest improvements through the listing, giving you a channel you would not have otherwise
The connector status is unhealthy when Glama is unable to successfully connect to the server. This can happen for several reasons:
The server is experiencing an outage
The URL of the server is wrong
Credentials required to access the server are missing or invalid
If you are the owner of this MCP connector and would like to make modifications to the listing, including providing test credentials for accessing the server, please contact support@glama.ai.
Discussions
No comments yet. Be the first to start the discussion!
Related MCP Servers
- 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.815MIT
- AlicenseNot gradedqualityDmaintenanceAn open-source MCP server that aggregates Taiwan public data sources (data.gov.tw, TWSE, MOEA, CWA, etc.) and exposes them through the Model Context Protocol, enabling AI agents to query Taiwan data with a single configuration line.1Apache 2.0
- FlicenseNot gradedqualityBmaintenanceProvides Taiwan stock market data through FinMind v4 API, including daily OHLCV, monthly revenue, institutional investors, margin trading, dividends, and financial statements. Enables MCP clients like ChatGPT or Codex to query Taiwan financial datasets via simple tools.
- 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.82MIT
Your Connectors
Sign in to create a connector for this server.