TWSE MCP Server
The TWSE MCP Server provides comprehensive tools for analyzing Taiwan Stock Exchange data, including company fundamentals, trading statistics, market intelligence, and ESG metrics.
• Company Analysis: Access detailed profiles, financial statements (income statements, balance sheets), dividend data, monthly revenue reports, and major announcements. Financial data automatically adapts to industry types (general, financial, insurance).
• Trading & Valuation: Retrieve daily, monthly, and yearly trading data, real-time 5-second statistics, closing prices, and key valuation metrics (P/E ratio, dividend yield, P/B ratio). Track ex-dividend/ex-rights schedules.
• Market Intelligence: Monitor TAIEX historical data, market indices, margin trading balances, foreign investment holdings by industry, and identify top 20 companies with highest foreign investment.
• ESG & Governance: Obtain climate management, risk policies, supply chain transparency, information security indicators, and corporate governance data for sustainability analysis.
• Derivatives & ETFs: Access warrant trading data, daily trader participation counts, and ETF rankings based on regular investment accounts.
• News & Events: Retrieve official TWSE announcements, company material disclosures, and market events for timely market context.
Enables configuration of the server using environment variables stored in a .env file for setting workspace paths and other parameters.
Provides tools for contributing to the TWStockMCPServer project through GitHub Issues, Discussions, and Pull Requests for bug reporting and feature suggestions.
Runs on Python 3.8+ with support for Python packages and libraries for implementing stock data analysis tools.
Displays status badges in the README for license, Python version, and MCP compatibility information.
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 Server分析台積電最近的走勢"
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.
🚀 TWStockMCPServer
A comprehensive Model Context Protocol (MCP) server designed for Taiwan Stock Exchange (TWSE) data analysis, providing real-time stock information, financial reports, ESG data, and trend analysis features.
🌏 Language Versions
English | 繁體中文
Related MCP server: Taiwan Stock Agent
🎬 Demo Videos
VSCode Copilot demo

Gemini CLI demo

Watch the TWStockMCPServer feature showcase
✨ Five Major Investment Analysis Scenarios
📊 Individual Stock Trend Analysis
Comprehensive analysis of short, medium, and long-term technical, fundamental, and chip-distribution aspects.
"Analyze the recent trend of TSMC (2330)" / "Is Foxconn (2317) suitable for long-term investment?"
💰 Foreign Institutional Investor Interpretation
Tracking foreign shareholding, industry capital flows, and individual stock entry/exit.
"What stocks have foreign investors been buying recently?" / "What is the foreign investment trend in the semiconductor industry?"
🔥 Market Hotspot Capture
Monitoring major news, abnormal trading volume, and warrant activity.
"What is the major news today?" / "Which stocks have abnormally high trading volume?"
💎 Dividend Investment Planning
High dividend yield screening, ex-dividend calendar, and payout stability analysis.
"Recommend some high dividend yield stocks" / "Which companies are going ex-dividend next month?"
🎯 Investment Target Screening
Value/growth stock screening and ESG risk assessment.
"Help me find some undervalued value stocks" / "Which companies have good ESG performance?"
⚙️ Quick Start
🚀 Online Usage (Recommended)
{
"twstockmcpserver": {
"transport": "streamable_http",
"url": "https://TW-Stock-MCP-Server.fastmcp.app/mcp"
}
}🐳 Docker Usage (stdio, no server setup required)
{
"twstockmcpserver": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--pull=always",
"-e",
"MCP_STDIO=1",
"ghcr.io/twjackysu/twsemcpserver:latest"
]
}
}🐳 Docker Usage (HTTP, self-hosted server)
docker run -d -p 8000:8000 -e PORT=8000 ghcr.io/twjackysu/twsemcpserver:latest{
"twstockmcpserver": {
"transport": "streamable_http",
"url": "http://localhost:8000/mcp"
}
}🔧 Local Installation
git clone https://github.com/twjackysu/TWStockMCPServer.git
cd TWStockMCPServer
uv sync && uv run fastmcp dev server.py📡 Data Sources
Source | Description | Tools |
Official TWSE API — Corporate Governance, ESG, Financial Reports, Trading, Indices, etc. | 143 | |
TWSE Web API — Daily K-line, Monthly Average Price, Valuation, Margin Trading, Institutional Investor Net Buy/Sell | 6 | |
Real-time multi-stock quotes during trading hours (Listed + OTC) | 1 | |
Taipei Exchange — OTC Daily Closing, Institutional Investors, P/E Ratio | 3 | |
Taiwan Futures Exchange — Institutional Investor Series, Large Trader Positions, Daily Market Data, Options Analysis, Margins, Monthly/Yearly Statistics | 16 |
🤝 Contribution
PRs are welcome!
📄 License & Disclaimer
MIT License | For reference only, does not constitute investment advice
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
Flicense-qualityDmaintenanceA 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.815MIT
- 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.82MIT
Related MCP Connectors
Taiwan Stock Exchange (TWSE) open data as MCP tools: stock quotes, ETF data, 140+ public datasets.
MCP server for fcc-ecfs
Taiwan Government Procurement MCP — 政府電子採購網 (PCC) tenders (keyless).
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/twjackysu/TWSEMCPServer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server