Content
# Fugle MCP Server (Currently only supports securities functions)
<!-- 


 -->
<!--  -->
Fugle MCP (Model Context Protocol) server for interacting with the Fugle trading system. This server supports stock quote and trading functions.
## Features
- Supports real-time stock quote queries
- Supports historical data queries
- Supports trading functions (optional)
- Supports both Docker and NPM deployment methods
- Fully compatible with the MCP protocol
## Prerequisites
### Install NPM
Go to the official Node.js website to [download](https://nodejs.org/en/download) the corresponding operating system platform
## Apply for a certificate
### Yuanta Securities, please use [Online Certificate Application](https://ml-fugle-api.masterlink.com.tw/FugleSDK/docs/key/) or download [Certificate e-Manager](https://www.masterlink.com.tw/certificate-eoperation) to apply for a certificate
⚠️ For users who apply for a certificate online, the default certificate password is your ID number
### Fubon Securities, please download [TCEM Certificate Management Tool](https://www.fbs.com.tw/Certificate/Management/) to apply for a certificate
⚠️ This tool only supports the Windows platform. If you are using Mac or Linux, please apply on Windows first, and then transfer the file to the Mac or Linux system.
## Installation
### Using NPM
```bash
npx @fugle/mcp-server
```
### Using Docker
```bash
docker pull fugle/mcp-server
```
## Usage
### Environment Variables
The server requires the following environment variables:
- `SDK_TYPE`: MCP Server uses SDK type (optional: "masterlink" or "fubon", default is "masterlink")
- `NATIONAL_ID`: National ID number
- `ACCOUNT_PASS`: Account password
- `CERT_PASS`: Certificate password
- `CERT_PATH`: Certificate file path
- `ENABLE_ORDER`: Whether to enable the ordering function (optional, default is false)
- `ACCOUNT`: If there are multiple accounts, you can use this parameter to specify the login account (optional, default is the first account)
- `FUBON_URL`: Fubon SDK connection URL (optional, only applicable to fubon, used to connect to the test server)
ℹ️ Yuanta account example: 592a12345678 (including branch code)
ℹ️ Fubon account example: 1234456 (no need to include branch code)
### Docker Configuration
Add the following to your `.mcp-config.json`:
```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",
"-e",
"FUBON_URL",
"--mount", "type=bind,src=</path/to/cert.p12>,dst=/app/cert.p12",
"fugle/mcp-server"
],
"env": {
"SDK_TYPE": "masterlink|fubon",
"NATIONAL_ID": "您的身分證字號",
"ACCOUNT_PASS": "您的帳戶密碼",
"CERT_PASS": "您的憑證密碼",
"ENABLE_ORDER": "false",
"ACCOUNT": "指定使用帳戶號碼"
}
}
}
}
```
### NPM Configuration
Add the following to your `.mcp-config.json`:
```json
{
"mcpServers": {
"@fugle/mcp-server": {
"command": "npx",
"args": [
"-y",
"@fugle/mcp-server"
],
"env": {
"SDK_TYPE": "masterlink|fubon",
"NATIONAL_ID": "您的身分證字號",
"ACCOUNT_PASS": "您的帳戶密碼",
"CERT_PASS": "您的憑證密碼",
"CERT_PATH": "/path/to/your/cert.p12",
"ENABLE_ORDER": "false",
"ACCOUNT": "指定使用帳戶號碼"
}
}
}
}
```
Connection Info
You Might Also Like
valuecell
Valuecell is a Python project for efficient data management.
hexstrike-ai
HexStrike AI is an AI-powered MCP cybersecurity automation platform with 150+ tools.
AP2
AP2 provides code samples and demos for the Agent Payments Protocol.
YC-Killer
YC-Killer is an AI agents library by Singularity Research, open-sourcing...
mcp-server
MCP Server provides access to stock market data and financial statements.
Vibe-Trading
Vibe-Trading: Your Personal Trading Agent