Fugle Masterlink (Taiwan Stock Market) MCP server

Provides a bridge between AI systems and the Masterlink SDK for Taiwan stock market trading, enabling account management, market data retrieval, and trade execution for financial analysis and automated trading strategies.
Back to servers
Provider
Kevin Fan
Release date
Mar 22, 2025
Language
TypeScript
Stats
2 stars

Fugle MCP Server is a specialized server that enables interaction with Fugle trading systems, providing stock market data queries and trading capabilities. Currently, it only supports securities functionality and is compatible with the Model Context Protocol.

Prerequisites

Install Node.js

Visit the Node.js official website to download the appropriate version for your operating system.

Certificate Application

MasterLink Securities

Either use the online certificate application or download the Certificate Manager. ⚠️ For online certificate applications, the default password is your national ID number.

Fubon Securities

Download the TCEM Certificate Management Tool. ⚠️ This tool only supports Windows. If you use Mac or Linux, apply for the certificate on Windows first, then transfer the file to your system.

Installation

Using NPM

npx @fugle/mcp-server

Using Docker

docker pull fugle/mcp-server

Configuration

Environment Variables

The server requires the following environment variables:

  • SDK_TYPE: MCP Server SDK type (options: "masterlink" or "fubon", default is "masterlink")
  • NATIONAL_ID: Your national ID number
  • ACCOUNT_PASS: Your account password
  • CERT_PASS: Your certificate password
  • CERT_PATH: Path to your certificate file
  • ENABLE_ORDER: Enable order functionality (optional, default is false)
  • ACCOUNT: Specify login account if you have multiple accounts (optional, default is the first account)

ℹ️ MasterLink account example: 592a12345678 (includes branch code)
ℹ️ Fubon account example: 1234456 (branch code not required)

Docker Configuration

Add the following to your .mcp-config.json:

{
  "mcpServers": {
    "@fugle/mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "--platform=linux/amd64",
        "-i",
        "--rm",
        "-e",
        "SDK_TYPE",
        "-e",
        "NATIONAL_ID",
        "-e",
        "ACCOUNT_PASS",
        "-e",
        "CERT_PASS",
        "-e",
        "ENABLE_ORDER",
        "-e",
        "ACCOUNT",
        "--mount", "type=bind,src=</path/to/cert.p12>,dst=/app/cert.p12",
        "fugle/mcp-server"
      ],
      "env": {
        "SDK_TYPE": "masterlink|fubon",
        "NATIONAL_ID": "your-national-id",
        "ACCOUNT_PASS": "your-account-password",
        "CERT_PASS": "your-certificate-password",
        "ENABLE_ORDER": "false",
        "ACCOUNT": "specific-account-number"
      }
    }
  }
}

NPM Configuration

Add the following to your .mcp-config.json:

{
  "mcpServers": {
    "@fugle/mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@fugle/mcp-server"
      ],
      "env": {
        "SDK_TYPE": "masterlink|fubon",
        "NATIONAL_ID": "your-national-id",
        "ACCOUNT_PASS": "your-account-password",
        "CERT_PASS": "your-certificate-password",
        "CERT_PATH": "/path/to/your/cert.p12",
        "ENABLE_ORDER": "false",
        "ACCOUNT": "specific-account-number"
      }
    }
  }
}

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later