Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TWSE MCP Servershow me the latest revenue growth and stock price for TSMC"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TWSE MCP Server
A Model Context Protocol (MCP) server that provides real-time access to Taiwan Stock Exchange (TWSE) market data, financial reports, and trading analytics through Claude Desktop.
๐ Quick Start
No installation required! The server connects directly to TWSE's official API to provide comprehensive market data.
๐ Features
Market Data & Analytics
๐ Real-time Trading Data - Daily stock prices, volumes, and OHLC data
๐ Market Indices - TAIEX and sector indices with real-time updates
๐น Technical Indicators - P/E ratios, dividend yields, price-to-book values
๐ Trading Analytics - Top volume stocks, margin trading, 5-second bid/ask stats
Financial Intelligence
๐ฐ Financial Statements - Quarterly income statements and balance sheets
๐ Revenue Reports - Monthly revenue with YoY/MoM comparisons
๐ฏ Profitability Metrics - ROE, ROA, profit margins by company
๐ญ Industry Analysis - EPS statistics and comparisons by sector
Investment Insights
๐ Foreign Investment - Top foreign holdings and sector preferences
๐ ETF Rankings - Most popular ETFs by investor accounts
๐ข Corporate Actions - New IPOs and delisted companies
๐ Market Calendar - Trading holidays and market schedules
๐ ๏ธ Installation
Option 1: NPX (Recommended)
Option 2: Global Installation
Option 3: Local Development
๐ง Claude Desktop Configuration
macOS
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Windows
Add to %APPDATA%\Claude\claude_desktop_config.json:
๐ Available Tools
Market Data (6 tools)
Tool | Description | Example Query |
| Daily trading data for all stocks | "Show today's stock prices" |
| Valuation metrics | "Find undervalued stocks" |
| Market indices (TAIEX, etc.) | "How's the market today?" |
| Daily close vs monthly average | "Show price averages" |
| Monthly trading statistics | "Get monthly highs and lows" |
| Search specific stock | "Find TSMC stock data" |
Financial Reports (6 tools)
Tool | Description | Example Query |
| Monthly revenue reports | "Show revenue growth" |
| Quarterly P&L statements | "Get earnings data" |
| Quarterly balance sheets | "Check debt levels" |
| EPS by industry | "Compare sector earnings" |
| ROE, ROA, margins | "Find profitable companies" |
| Company-specific financials | "Get TSMC financial reports" |
Trading Analysis (3 tools)
Tool | Description | Example Query |
| Most traded stocks | "What's hot today?" |
| Margin/short data | "Show leverage levels" |
| Real-time bid/ask | "Get order flow" |
Investment Research (7 tools)
Tool | Description | Example Query |
| Top foreign holdings | "What are foreigners buying?" |
| Foreign investment by sector | "Foreign sector preferences" |
| Recent IPOs | "Show new stocks" |
| Delisted companies | "Which stocks were delisted?" |
| Popular ETFs | "Top ETF choices" |
| Historical index data | "TAIEX history" |
| Market calendar | "When is market closed?" |
๐ก Example Usage
Basic Market Check
Company Research
Investment Screening
๐ Search Functions
searchStock
Search for specific stock data:
searchFinancials
Search company financial reports:
๐ Data Sources
Official API: Taiwan Stock Exchange OpenAPI
Base URL: https://openapi.twse.com.tw/
Update Frequency:
Real-time: 5-second stats during market hours
Daily: After market close (~14:30 TST)
Monthly: Financial reports on 10th of each month
Quarterly: Financial statements 45 days after quarter end
๐ง Development
Prerequisites
Node.js >= 18.0.0
TypeScript 5.0+
Build from Source
Project Structure
๐ API Response Format
All tools return JSON data with Traditional Chinese field names:
โ ๏ธ Limitations
Rate Limits: TWSE API may have rate limiting
Data Delay: Some data has 15-20 minute delay
Language: Field names in Traditional Chinese
Market Hours: Real-time data only during TSE trading hours (09:00-13:30 TST)
Data Volume: Large queries return first 100 records
๐ค Contributing
Contributions are welcome! Please see our Contributing Guide for details.
Development Workflow
Fork the repository
Create feature branch (
git checkout -b feature/amazing-feature)Commit changes (
git commit -m 'Add amazing feature')Push to branch (
git push origin feature/amazing-feature)Open Pull Request
๐ License
MIT License - see LICENSE file for details
๐ Acknowledgments
Taiwan Stock Exchange for providing the OpenAPI
Anthropic for the MCP SDK
Contributors and users of this project