Formosa MCP — Taiwan data

v0.2.0
io.github.ycsmiley/formosa-mcp Checked 2 days ago Published 29 days ago

Taiwan data for AI agents: THSR/TRA timetables, TWSE/TPEx stocks, invoice lottery, garbage, outages

Values you need

VariableWhat it is
TDX_CLIENT_IDoptional Only needed for the rail toolset.
TDX_CLIENT_SECREToptional secret Only needed for the rail toolset.

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add formosa-mcp -- npx -y formosa-mcp@0.2.0 --toolsets invoice,stock,garbage,outage
Add to claude_desktop_config.json
{
  "mcpServers": {
    "formosa-mcp": {
      "args": [
        "-y",
        "formosa-mcp@0.2.0",
        "--toolsets",
        "invoice,stock,garbage,outage"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "formosa-mcp": {
      "args": [
        "-y",
        "formosa-mcp@0.2.0",
        "--toolsets",
        "invoice,stock,garbage,outage"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "formosa-mcp": {
      "args": [
        "-y",
        "formosa-mcp@0.2.0",
        "--toolsets",
        "invoice,stock,garbage,outage"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.formosa-mcp]
command = "npx"
args = ["-y", "formosa-mcp@0.2.0", "--toolsets", "invoice,stock,garbage,outage"]

Remote (hosted)

Run in a terminal
claude mcp add --transport http formosa-mcp https://formosa-mcp.ycsmiley.workers.dev/mcp --header 'X-TDX-Client-Id: <X-TDX-Client-Id>' --header 'X-TDX-Client-Secret: <X-TDX-Client-Secret>'
Add to Settings → Connectors → Add custom connector (or claude_desktop_config.json via mcp-remote)
{
  "mcpServers": {
    "formosa-mcp": {
      "args": [
        "-y",
        "mcp-remote",
        "https://formosa-mcp.ycsmiley.workers.dev/mcp",
        "--header",
        "X-TDX-Client-Id: <X-TDX-Client-Id>",
        "--header",
        "X-TDX-Client-Secret: <X-TDX-Client-Secret>"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "formosa-mcp": {
      "headers": {
        "X-TDX-Client-Id": "<X-TDX-Client-Id>",
        "X-TDX-Client-Secret": "<X-TDX-Client-Secret>"
      },
      "url": "https://formosa-mcp.ycsmiley.workers.dev/mcp"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "formosa-mcp": {
      "headers": {
        "X-TDX-Client-Id": "<X-TDX-Client-Id>",
        "X-TDX-Client-Secret": "<X-TDX-Client-Secret>"
      },
      "type": "http",
      "url": "https://formosa-mcp.ycsmiley.workers.dev/mcp"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.formosa-mcp]
command = "npx"
args = ["-y", "mcp-remote", "https://formosa-mcp.ycsmiley.workers.dev/mcp", "--header", "X-TDX-Client-Id: <X-TDX-Client-Id>", "--header", "X-TDX-Client-Secret: <X-TDX-Client-Secret>"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: invoice_get_winning_numbers, invoice_check, stock_quote, stock_dividends, garbage_schedule, outage_schedule.
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json