Get the FREE Ultimate OpenClaw Setup Guide →

fubon-api

MCP server from Mofesto/fubon-api-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mofesto-fubon-api-mcp-server python -m fubon_api_mcp_server.server

How to use

This MCP server wraps the Fubon API MCP (Model Context Protocol) for accessing 富邦證券的市場數據與交易功能. The server exposes a set of Python-based MCP tools under the fubon_api_mcp_server.server module that align with the Fubon Neo SDK capabilities, including placing orders, managing orders, querying market data, and retrieving account information. Typical usage examples show how to call functions such as place_daytrade_condition_order, get_daytrade_condition_by_id, place_daytrade_multi_condition_order, place_trail_profit, and get_trail_order. These tools enable non-blocking, asynchronous or synchronous operations for trading workflows, price lookups, and position management. To interact with the server, you import the functions from fubon_api_mcp_server.server and invoke them with properly structured dictionaries that specify account details, symbol information, order parameters, stop-loss/take-profit settings, and day-trade constraints. The MCP server will handle validation, communication with the official API, and return structured responses including status and data payloads such as a generated guid for new conditional orders.

How to install

Prerequisites:

  • Python 3.10+ installed
  • Network access to install Python packages

Step-by-step installation:

  1. Create and activate a Python virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate  # on Windows use: venv\Scripts\activate.bat
  1. Install the MCP server package from PyPI:
pip install fubon-api-mcp-server
  1. Verify installation (example import):
python -c "import fubon_api_mcp_server.server as s; print('ok', hasattr(s, 'place_daytrade_condition_order'))"
  1. Run the MCP server:
python -m fubon_api_mcp_server.server

Optional alternatives:

  • If you prefer an isolated environment per project, you can install via pipx and run the module in a isolated context. Ensure pipx is installed, then:
pipx install fubon-api-mcp-server
pipx run fubon-api-mcp-server

Additional notes

Tips and notes:

  • This server relies on the official Fubon Neo SDK and provides Python wrappers for MCP endpoints such as place_daytrade_condition_order, get_daytrade_condition_by_id, place_daytrade_multi_condition_order, place_trail_profit, and get_trail_order.
  • Ensure your environment has network access to Fubon APIs and that any required API keys or authentication details are configured as needed by the underlying SDK (not all details are in the MCP README).
  • The library examples show that many operations are non-blocking; you can use synchronous or asynchronous calling patterns depending on how you implement your MCP client logic.
  • The examples in the README illustrate complex day-trade condition orders with nested payloads (conditions, tpsl, daytrade, etc.). When constructing payloads, validate required fields such as account, symbol, market_type, and order specs to avoid API errors.
  • If you encounter issues with Python version compatibility, confirm you are using Python 3.10+ and that the MCP server package version matches your Python runtime.
  • For debugging, consult the returned status and data fields; a successful response typically contains a guid for new conditional orders and detailed data records for queries.

Related MCP Servers

Sponsor this space

Reach thousands of developers