> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tradingoctant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 连接行情 MCP

在支持 **Streamable HTTP** 和自定义请求头的 MCP 客户端添加远程服务。URL 填 `https://api.tradingoctant.com/mcp`，认证方式选择 Bearer，密钥取自[账户](https://dash.tradingoctant.com/account)。这是查询行情的服务。

## 在 VS Code 中连接

在用户级 MCP 配置中加入以下条目。启动服务时输入客户 Key，随后在工具列表选择 `discover`，查看可用标的。

```json theme={null}
{
  "inputs": [
    {
      "id": "octant-key",
      "type": "promptString",
      "description": "Trading Octant API key",
      "password": true
    }
  ],
  "servers": {
    "trading-octant": {
      "type": "http",
      "url": "https://api.tradingoctant.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:octant-key}"
      }
    }
  }
}
```

## 读取行情

1. 调用 `discover`，参数为 `{}`。
2. 如果工具列表包含 `get_gex`，用下方参数请求快照。结果在 `result.structuredContent`。每次行情请求与 REST 共用账户额度。

```json theme={null}
{"symbol": "SPX", "basis": "naive"}
```

自建客户端使用 JSON-RPC 2.0，通过 POST 发送请求。每次都带 Bearer 头，以及 `Content-Type: application/json` 和 `Accept: application/json, text/event-stream`。依次发送 `initialize`、`notifications/initialized`、`tools/list`、`tools/call`。后续请求在 `MCP-Protocol-Version` 中发送协商版本，支持 2025-11-25、2025-06-18、2025-03-26。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.