Quickstart
1. 获取 API 密钥
在 api.tradeflags.com/account 登录,并按下 获取 API 密钥。免费级别每月允许 1,000 次调用,无需信用卡;付费级别载于 速率限制 页面。请妥善保管密钥 — 它是您的智能体所需的唯一凭证。
2. 连接您的智能体
TradeFlags MCP 服务器是一个远程端点。连接一次,即可使用全部 35 个工具。这些工具按数据包(波动率曲面、累计期权、网络、广度、…)分组以便探索,但单一连接即可使用整个目录 — 无需按数据包单独安装。
Claude Code
在您的项目根目录,通过 CLI 加入服务器:
claude mcp add tradeflags --transport http \
--url https://api.tradeflags.com/mcp \
--header "Authorization: Bearer ***"
…或在项目根目录创建 .mcp.json:
{
"mcpServers": {
"tradeflags": {
"type": "http",
"url": "https://api.tradeflags.com/mcp",
"headers": { "Authorization": "Bearer tf_live_YOUR_KEY" }
}
}
}
Hermes
在 ~/.hermes/config.yaml 的 mcp_servers 之下加入服务器:
mcp_servers:
tradeflags:
url: "https://api.tradeflags.com/mcp"
headers:
Authorization: "Bearer tf_live_YOUR_KEY"
重新启动智能体。其工具会以 mcp_tradeflags_* 形式出现。
3. 实操示例
为累计期权定价
要求您的智能体以一只股票及一个变体调用 accumulator__price:
Price a ko_fixed accumulator on 0700 at 2.0x leverage.
该工具会将结构求解至净零 NPV,并返回现货价、累计水平、敲出障碍、NPV 及希腊值。当您想自行设定行使价、障碍及基础水平,而非让求解器代为挑选时,请使用 otc_pricing__price。
请求数据序列
要求 ads__index 以获取最新的 Aruoba-Diebold-Scotti 商业状况读数及其状态。每个工具都会说明其单位及所描述的时段,因此智能体无需查阅 schema 即可知道所取得的内容。
评估投资决策
智能体会组合多个工具。若要衡量是否进军香港股票,它可以取得 ads__index(美国商业周期)、moirai__forecast(香港分布预测)及 network__valuation(同业相对估值),并综合三者。以下提示即为可使用的格式。
4. 示例提示
I am considering adding Hong Kong equities to a portfolio this month.
Using the TradeFlags MCP tools, walk me through the current picture:
1. ads__index — what is the US business-cycle regime right now?
2. moirai__forecast — what is the P10 / median / P90 HK outlook over the next 30 days?
3. network__valuation — which sectors look cheapest relative to their peers?
Then give me a one-paragraph, clearly-caveated read on whether the risk/reward
favours waiting, and cite the numbers you used for each conclusion.
5. 查看您的收费
每次调用都会按您的级别计量收费,而您的用量可在账户页面查看。请参阅 速率限制 了解各级别及计费规则。