Skip to main content
Glama
gtc-fx-mcp

gtc-fx-mcp

by DevDengChao

gtc-fx-mcp

GTC Go 的 MCP 服务。通过本地 stdio 查询账户和交易数据,也可以准备资金及交易表单,由用户在 GTC 网页确认。项目由社区维护。

运行

需要 Node.js 22 或更新版本。发布前可从源码构建,或使用已打包的 tarball。

npm ci
npm run build
node dist/cli.js --version

通用 MCP 客户端配置示例。将路径替换为实际的构建文件路径。

{
  "mcpServers": {
    "gtc-go": {
      "command": "node",
      "args": ["/absolute/path/to/gtc-fx-mcp/dist/cli.js"],
      "env": { "GTC_AUTH_MODE": "browser" }
    }
  }
}

安装发行包后,命令可以直接使用 gtc-fx-mcp。npm 正式发布后,也可将 command 设置为 npx 并把 args 设置为 ["-y", "@devdengchao/gtc-fx-mcp@0.1.0"]。

Related MCP server: MarketSage

授权模式

模式

配置

能力

session

在 MCP 进程环境中注入 GTC_GO_ACCESS_TOKEN

gtc_list_accounts 和 gtc_get_wallet。Windows 与 ECS 已实测,可独立于 Chrome 发请求。

browser

Chrome 144+。在 Chrome 打开 chrome://inspect/#remote-debugging 并开启调试,连接时选择 Allow,在 GTC 页面登录。

全部已实现查询以及浏览器预填、提交状态与回执。

GTC_AUTH_MODE 可显式选择模式。默认在提供访问令牌时启用 session,否则启用 browser。

获取并提供 session 令牌

  1. 在 GTC Go 仪表盘 登录自己的账户。

  2. 打开 Chrome 开发者工具,在 Network(网络) 中选择 Fetch/XHR,然后刷新仪表盘。

  3. 在请求列表中选择 POST /api/exchange/opt_my_account 或 POST /api/report/my_wallet_report。打开 Headers(标头) 下的 Request Headers(请求标头),复制 Authorization 值中 Bearer 后面的令牌。

  4. 将上面的 MCP 配置示例中的 GTC_AUTH_MODE 改为 session,并让 MCP 子进程收到环境变量 GTC_GO_ACCESS_TOKEN。如果客户端提供受保护的密钥注入功能,可以在那里设置实际令牌。

如需从终端启动客户端,可用以下命令隐藏令牌输入。设置后从同一终端启动客户端。如果客户端限制 stdio 子进程继承的环境变量,在客户端配置中显式转发 GTC_GO_ACCESS_TOKEN。

Bash

read -rsp 'GTC Go access token ' GTC_GO_ACCESS_TOKEN
printf '\n'
export GTC_GO_ACCESS_TOKEN
export GTC_AUTH_MODE=session

PowerShell

$gtcTokenInput = Read-Host 'GTC Go access token' -AsSecureString
$env:GTC_GO_ACCESS_TOKEN = [System.Net.NetworkCredential]::new('', $gtcTokenInput).Password
Remove-Variable gtcTokenInput
$env:GTC_AUTH_MODE = 'session'

收到 AUTH_REQUIRED 时,在 GTC Go 重新登录并复制新令牌,更新环境变量后重启 MCP 服务。

浏览器模式

浏览器模式使用当前 Chrome 配置。GTC_CHROME_USER_DATA_DIR 可指定 Chrome 数据目录。GTC_CHROME_CDP_URL 可配置通过本机回环访问的调试 WebSocket,适用于自管的私有隧道。GTC_APP_LANG 默认为 GTC Go 的 zhCn,浏览器模式优先使用实际会话中的语言。

工具

  • 账户和资料使用 gtc_list_accounts、gtc_list_external_accounts、gtc_get_profile、gtc_get_kyc_status。

  • 钱包、资金和报表使用 gtc_get_wallet、gtc_list_fund_movements、gtc_get_funds_summary、gtc_get_trade_funds_report、gtc_get_trade_statistics。

  • 行情和交易查询使用 gtc_get_symbol、gtc_get_candles、gtc_list_positions、gtc_list_closed_trades。

  • 其他查询覆盖入出金渠道、工单、通知、活动、课程、跟单和 PAMM 信号。

资金与交易确认

gtc_prepare_funding 支持入金、出金和站内转账。gtc_prepare_trade 支持市价单、挂单、改单、撤单和平仓。输入在 action 对象内,金额、价格和手数以十进制字符串传入。入金金额与原站表单一致,单位为 USD,currency 指支付渠道币种。

下面的合成参数演示站内转账表单准备。

{ "action": { "operation": "internal_transfer", "fromAccount": "1000001", "toAccount": "1000002", "currency": "USD", "amount": "14.25" } }

工具在独立 GTC 标签页预填能识别的字段。filled 和 needsInput 显示结果。可在原站选择支付渠道或打开订单编辑框,再用 gtc_fill_pending_action 继续预填。实际金额、账户、支付方式、密码和验证码在 GTC 页核对与处理,最终提交由用户操作。

用 gtc_action_status 按 actionId 查看匹配的回执。accepted 表示 GTC 接口已受理。对于外部支付渠道、参数变动、连接中断或无法关联的回执,使用 GTC 资金流水或订单核对。在网页取消操作或对账后,可用 gtc_release_action 释放当前准备。每个 MCP 进程保留一笔待处理操作。

验证与发行

npm test
npm pack --dry-run
npm pack

CI 在 Node.js 22 和 24 执行测试,并从 tarball 安装后验证两种模式的 MCP stdio 初始化和工具调用。资金写入使用本地模拟回执验收,真实资金通道和券商模拟账户交易验收单独记录。

建立目标 GitHub 仓库后推送 main,核对 CI、确认包名及发布权限,再将已验证的 tarball 发布到 npm。

Available Tools

26 tools
gtc_action_statusB
Read-onlyIdempotent

Read the prepared operation's current state and any correlated GTC Go receipt.

Inputs: actionId (required).

gtc_fill_pending_actionC

Continue prefilling the prepared operation after opening the corresponding form or selecting a payment channel in Chrome.

Inputs: actionId (required).

gtc_get_candlesC
Read-onlyIdempotent

Get chart candles using a GTC Go chart interval code.

Inputs: symbol (required), account (required), exchange (required), interval (required), +1 more.

gtc_get_deposit_channelsB
Read-onlyIdempotent

List GTC Go deposit channel configuration.

Inputs: no named parameters.

gtc_get_funds_summaryC
Read-onlyIdempotent

Get the GTC Go funds summary for a date range.

Inputs: to (required), from (required).

gtc_get_kyc_statusB
Read-onlyIdempotent

Get the current user's GTC Go verification record.

Inputs: no named parameters.

gtc_get_profileB
Read-onlyIdempotent

Get GTC Go membership and profile information.

Inputs: no named parameters.

gtc_get_symbolC
Read-onlyIdempotent

Get information for a trading symbol and account.

Inputs: symbol (required), account (required), exchange (required).

gtc_get_trade_funds_reportC
Read-onlyIdempotent

Get the MetaTrader funds report available in GTC Go.

Inputs: no named parameters.

gtc_get_trade_statisticsC
Read-onlyIdempotent

Get paginated GTC Go trade statistics for a date range.

Inputs: to (required), from (required), page, pageSize.

gtc_get_walletB
Read-onlyIdempotent

Get this user's GTC Go wallet summary.

Inputs: no named parameters.

gtc_get_withdrawal_channelsB
Read-onlyIdempotent

List GTC Go withdrawal channel configuration.

Inputs: no named parameters.

gtc_list_accountsC
Read-onlyIdempotent

List this user's GTC Go platform accounts.

Inputs: sort, type.

gtc_list_activitiesC
Read-onlyIdempotent

List GTC Go promotions using the site's activity type code.

Inputs: page, type, pageSize.

gtc_list_closed_tradesC
Read-onlyIdempotent

List closed trades for a GTC Go trading account.

Inputs: to (required), from (required), account (required), serverId (required), +3 more.

gtc_list_copy_signalsC
Read-onlyIdempotent

Discover GTC Go copy trading signals.

Inputs: page, sort, keyword, pageSize.

gtc_list_coursesC
Read-onlyIdempotent

List GTC Go live courses.

Inputs: page, status, pageSize.

gtc_list_external_accountsC
Read-onlyIdempotent

List externally linked trading accounts.

Inputs: sort, type.

gtc_list_fund_movementsC
Read-onlyIdempotent

List GTC Go fund movements for the requested dates and account.

Inputs: to (required), from (required), account, pageSize, +2 more.

gtc_list_notificationsB
Read-onlyIdempotent

List GTC Go notifications by category and read status.

Inputs: page, category, pageSize, readStatus.

gtc_list_pamm_signalsC
Read-onlyIdempotent

Discover GTC Go PAMM signals.

Inputs: page, sort, keyword, pageSize.

gtc_list_positionsB
Read-onlyIdempotent

List open positions or pending orders for a trading account.

Inputs: account (required), exchange (required), kind, page, +1 more.

gtc_list_work_ordersB
Read-onlyIdempotent

List support tickets with the site's status and type filters.

Inputs: page, type, status, account, +2 more.

gtc_prepare_fundingA

Prepare an original GTC Go deposit, withdrawal, or internal-transfer form. Confirm the operation yourself in Chrome.

Inputs: action (required).

gtc_prepare_tradeC

Prepare an original GTC Go order form or locate the requested order. Confirm the operation yourself in Chrome.

Inputs: action (required).

gtc_release_actionC

Release an unsent preparation or an unknown outcome after you cancel or reconcile the action in GTC Go.

Inputs: actionId (required), portalReviewed (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 26 tools

    Disambiguation4/5

    Most tools target a clearly distinct resource (deposit channels vs withdrawal channels, positions vs closed trades, courses vs copy signals vs PAMM signals). The only fuzzy cluster is the reporting group — gtc_list_fund_movements, gtc_get_funds_summary, gtc_get_trade_funds_report, and gtc_get_trade_statistics overlap conceptually, though the descriptions do differentiate them by granularity and source. The prepare/fill/status/release quartet forms a coherent lifecycle rather than a redundant set.

    Naming Consistency4/5

    Nearly all tools follow a consistent gtc_verb_noun snake_case pattern with a uniform prefix, which is predictable and easy to scan. The one deviation is gtc_action_status, which drops the verb and reads as a noun phrase in an otherwise verb-first namespace, and gtc_fill_pending_action is slightly more verbose than its siblings.

    Tool Count3/5

    At 26 tools the surface is on the heavy side for what is essentially a read-oriented trading dashboard plus a four-step order-preparation workflow. The breadth is real (accounts, funding, trading, reports, signals, support), but several list-only tools for peripheral domains (courses, notifications, activities) pad the count beyond what earns its place.

    Completeness4/5

    Coverage of the trading domain is broad: accounts, wallet, symbol/candles, positions, closed trades, fund movements, reports, KYC, and a full prepare→fill→status→release order workflow. Gaps remain around mutating operations — no cancel order, no close position, no notification read-state update, and no detail-level fetch for a single trade or order — but these appear intentionally delegated to the Chrome-confirm step and are workable.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Enables interaction with WEEX exchange for market data, account details, and controlled trade execution through Model Context Protocol tools. Supports local stdio integration and a standalone HTTP service.
      21
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides LLM clients with market intelligence tools over stdio, including market snapshots, price history, sentiment scoring, evidence search, and research briefs, with saved-run resource access.
      AGPL 3.0
    • A
      license
      A
      quality
      D
      maintenance
      Enables agents to read Cluby markets, positions, and pre-trade quotes over stdio, using the same arithmetic as the interface while holding no keys and signing nothing.
      9
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI clients to read Charles Schwab account information over local stdio, including positions, transaction history, and option chains. It is unofficial and read-only, with credentials kept on the local machine.
      MIT