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.
Visit the Node.js official website to download the appropriate version for your operating system.
Either use the online certificate application or download the Certificate Manager. ⚠️ For online certificate applications, the default password is your national ID number.
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.
npx @fugle/mcp-server
docker pull fugle/mcp-server
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 numberACCOUNT_PASS
: Your account passwordCERT_PASS
: Your certificate passwordCERT_PATH
: Path to your certificate fileENABLE_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)
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"
}
}
}
}
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"
}
}
}
}
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.
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"
]
}
}
}
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.
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.