Taiwan Stock Exchange

v1.0.0Finance & Fintechstable

台灣證交所OpenAPI 的 MCP Server 同時整合部分即時報價和櫃檯買賣中心TPEx OpenAPI, 臺灣期貨交易所TAIFEX OpenAPI

analysismcpmcp-serverquestions-and-answerstrading
Share:
92
Stars
0
Downloads
0
Weekly
0/5

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

Retrieve real-time stock quotes from Taiwan's securities exchanges.
Access trading and futures data from Taiwan exchanges.
Analyze market data and trading information.
twjackysu

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx twsemcpserver

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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.

2

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"
    }
  }
}
3

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:latest
4

Option 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.py
5

Verify 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.

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.

Quick Config Preview

{ "mcpServers": { "twsemcpserver": { "command": "npx", "args": ["-y", "twsemcpserver"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides