Taiwan Stock Exchange
台灣證交所OpenAPI 的 MCP Server 同時整合部分即時報價和櫃檯買賣中心TPEx OpenAPI, 臺灣期貨交易所TAIFEX OpenAPI
What is Taiwan Stock Exchange?
Taiwan Stock Exchange is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 台灣證交所openapi 的 mcp server 同時整合部分即時報價和櫃檯買賣中心tpex openapi, 臺灣期貨交易所taifex openapi
台灣證交所OpenAPI 的 MCP Server 同時整合部分即時報價和櫃檯買賣中心TPEx OpenAPI, 臺灣期貨交易所TAIFEX OpenAPI
This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- 台灣證交所OpenAPI 的 MCP Server 同時整合部分即時報價和櫃檯買賣中心TPEx OpenAPI, 臺灣期
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx twsemcpserverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Taiwan Stock Exchange
TWSEMCPServer is a Model Context Protocol server that exposes over 153 tools covering the Taiwan Stock Exchange (TWSE), OTC market (TPEx), and Taiwan Futures Exchange (TAIFEX) APIs. It provides real-time intraday quotes, daily K-lines, corporate governance data, ESG reports, financial statements, institutional investor flows, futures and options positions, and margin trading statistics. Investors and analysts use it to let AI assistants perform deep market research and stock screening on Taiwan's securities markets without manual API calls.
Prerequisites
- Python 3.13+ installed (for local development)
- Docker installed (for containerized deployment, recommended)
- An MCP-compatible client such as Claude Desktop, Cursor, or any client supporting streamable HTTP transport
- No API keys required — all data comes from free public TWSE/TPEx/TAIFEX OpenAPIs
Choose your deployment method
TWSEMCPServer can be used as a hosted remote server (no setup needed), via Docker, or by cloning and running locally. The hosted streamable HTTP endpoint is the fastest way to get started.
Option A: Use the hosted remote server
Configure your MCP client to connect directly to the publicly hosted streamable HTTP endpoint. No installation required.
{
"mcpServers": {
"twsemcpserver": {
"transport": "streamable_http",
"url": "https://TW-Stock-MCP-Server.fastmcp.app/mcp"
}
}
}Option B: Run via Docker (stdio mode)
Pull and run the latest Docker image in stdio mode for use with MCP clients that communicate over standard input/output.
docker run -i --rm --pull=always -e MCP_STDIO=1 \
ghcr.io/twjackysu/twsemcpserver:latestOption C: Run locally with uv
Clone the repository, install dependencies with uv, and start the FastMCP development server for local testing and customization.
git clone https://github.com/twjackysu/TWStockMCPServer.git
cd TWStockMCPServer
uv sync
uv run fastmcp dev server.pyVerify tools are available
Ask your MCP client to list the available tools. You should see 153 tools spanning TWSE, TPEx, and TAIFEX data sources covering equities, futures, and options.
Taiwan Stock Exchange Examples
Client configuration (Docker stdio)
Add TWSEMCPServer to Claude Desktop using Docker in stdio mode. The MCP_STDIO=1 env var switches the server to stdin/stdout transport.
{
"mcpServers": {
"twsemcpserver": {
"command": "docker",
"args": ["run", "-i", "--rm", "--pull=always",
"-e", "MCP_STDIO=1",
"ghcr.io/twjackysu/twsemcpserver:latest"]
}
}
}Prompts to try
Use natural language to query Taiwan stock market data, screen stocks, and analyze market trends.
- "What are the top 10 stocks with the highest foreign investor net buy volume today on TWSE?"
- "Show me the daily K-line data for Taiwan Semiconductor (2330) for the past 30 days"
- "Which OTC stocks have the highest margin trading balance this week?"
- "List today's most active futures contracts on TAIFEX and their open interest"
- "Find dividend yield stocks on TWSE with P/E under 15 and stable earnings growth"Troubleshooting Taiwan Stock Exchange
Docker container exits immediately in stdio mode
Ensure you include the -i flag (interactive) when running Docker. Without it, stdin closes immediately and the server exits. The correct command is: docker run -i --rm -e MCP_STDIO=1 ghcr.io/twjackysu/twsemcpserver:latest
Streamable HTTP transport is not supported by your MCP client
Use the Docker stdio deployment instead, which uses standard stdio transport compatible with all MCP clients including Claude Desktop.
Tool returns empty results or API errors
TWSE APIs have rate limits and may be unavailable outside Taiwan Stock Exchange business hours (weekdays 9:00–13:30 CST). Wait for market hours or check the TWSE API status page.
Frequently Asked Questions about Taiwan Stock Exchange
What is Taiwan Stock Exchange?
Taiwan Stock Exchange is a Model Context Protocol (MCP) server that 台灣證交所openapi 的 mcp server 同時整合部分即時報價和櫃檯買賣中心tpex openapi, 臺灣期貨交易所taifex openapi It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Taiwan Stock Exchange?
Follow the installation instructions on the Taiwan Stock Exchange GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Taiwan Stock Exchange?
Taiwan Stock Exchange works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Taiwan Stock Exchange free to use?
Yes, Taiwan Stock Exchange is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Taiwan Stock Exchange Alternatives — Similar Finance & Fintech Servers
Looking for alternatives to Taiwan Stock Exchange? Here are other popular finance & fintech servers you can use with Claude, Cursor, and VS Code.
ValueCell
★ 10.7kValueCell is a community-driven, multi-agent platform for financial applications.
Vibe Trading
★ 8.1k'Vibe-Trading: Your Personal Trading Agent'
Quantdinger
★ 6.2kAI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
TradingView
★ 2.8kReal-time crypto & stock screening, advanced technical indicators, Bollinger Bands intelligence, candlestick patterns + native Claude Desktop integration. Multi-exchange (Binance, KuCoin, Bybit+). Open-source AI trading infrastructure.
Financial Datasets
★ 2.1kProvides access to comprehensive financial data including income statements, balance sheets, cash flow statements, stock prices, company news, SEC filings, and cryptocurrency information with built-in financial ratio analysis.
Stripe
★ 1.6kThe Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.
Browse More Finance & Fintech MCP Servers
Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Taiwan Stock Exchange in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Taiwan Stock Exchange?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.