两种方式:MCP(推荐,Claude/Cursor/Cline 原生支持)或 Function Calling(Dify/Coze/ChatGPT)。
打开 https://zqapi.com.cn/k/你的KEY,里面就三个按钮:
下面是想深入配置时才需要看的内容。
地址:https://zqapi.com.cn/mcp 认证:Authorization: Bearer 你的KEY (也支持 https://zqapi.com.cn/mcp?key=你的KEY)
| Claude.ai 网页版 | 设置 → Connectors(连接器)→ Add custom connector → URL 填 https://zqapi.com.cn/mcp, 认证方式选 Header/Bearer,值填你的 Key |
| ChatGPT | 设置 → Connectors / Apps → 添加自定义 MCP 服务器 → URL + Header(需 Plus/Pro 且版本支持) |
| Cursor | Settings → MCP → Add new MCP server → Type 选 streamable-http,
URL 填 https://zqapi.com.cn/mcp,Header 加 Authorization: Bearer 你的KEY |
| 自建客户端 | 直接发 JSON-RPC:POST https://zqapi.com.cn/mcp,头带 Authorization,协议 2025-06-18 |
curl -s -X POST https://zqapi.com.cn/mcp -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -H "Authorization: Bearer 你的KEY" -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":'
'{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":'
'{"name":"test","version":"1"}}}'
返回 200 且内容里有 "football-data" 就说明通了。
⬇ 下载 mcp_server.py
(保存到本地任意目录,比如 D:\football\mcp_server.py)
pip install mcp httpx
打开配置文件(Windows:%APPDATA%\Claude\claude_desktop_config.json),加入:
{
"mcpServers": {
"football-data": {
"command": "python",
"args": [
"C:/football/mcp_server.py"
],
"env": {
"FOOTBALL_API_KEY": "把这里换成你的KEY",
"FOOTBALL_API_BASE": "https://zqapi.com.cn"
}
}
}
}
把 把这里换成你的KEY 换成你的 Key,
C:/football/mcp_server.py 换成你刚才保存脚本的实际路径,然后重启 Claude Desktop。
帮我查一下今天的比赛,把有盘口变化的场次列出来, 再看下国际米兰最近 10 场的赢盘率。
AI 会自动调用 list_matches / team_form 等工具取数并分析。
这些平台支持导入 OpenAPI 或工具定义:
https://zqapi.com.cn/openapi.json(选择 API Key 认证,Header 名 X-API-Key)[
{
"type": "function",
"function": {
"name": "list_matches",
"description": "查某天赛事列表(统一视图)。调用 GET https://zqapi.com.cn/v1/matches",
"parameters": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "YYYY-MM-DD,不填=今天"
},
"limit": {
"type": "integer",
"description": "条数,默认 20"
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "match_detail",
"description": "单场详情(队名/时间/比分/状态)。调用 GET https://zqapi.com.cn/v1/matches/{match_id}",
"parameters": {
"type": "object",
"properties": {
"match_id": {
"type": "string",
"description": "如 bz:210131"
}
},
"required": [
"match_id"
]
}
}
},
{
"type": "function",
"function": {
"name": "match_odds",
"description": "单场亚盘/欧赔/大小球。调用 GET https://zqapi.com.cn/v1/matches/{match_id}/odds",
"parameters": {
"type": "object",
"properties": {
"match_id": {
"type": "string",
"description": "如 bz:210131"
}
},
"required": [
"match_id"
]
}
}
}
]
... 共 14 个工具,完整内容点下面按钮下载
| 工具名 | 说明 | 接口 |
|---|---|---|
list_matches | 查某天赛事列表(统一视图) | /v1/matches |
match_detail | 单场详情(队名/时间/比分/状态) | /v1/matches/{match_id} |
match_odds | 单场亚盘/欧赔/大小球 | /v1/matches/{match_id}/odds |
event_detail | 赛事详情(天气/裁判/场地/上座) | /v1/bz/events/{event_id} |
lineups | 预测首发阵容(阵型/球员/评分) | /v1/bz/events/{event_id}/lineups |
injuries | 伤停名单(伤病/停赛/原因) | /v1/bz/events/{event_id}/injuries |
stats | 技术统计(xG/控球/射门等 50+ 项) | /v1/bz/events/{event_id}/stats |
odds | 多公司赔率(13 家,含初盘/变动) | /v1/bz/events/{event_id}/odds |
money_share | 资金占比 WoM(成交额与各选项占比) | /v1/wom/events/{event_id} |
team_form | 球队近 10 场战绩与赢盘率 | /v1/teams/{team}/form |
head_to_head | 两队交锋记录 | /v1/h2h |
jingcai | 当天竞彩场次(编号/固定奖金) | /v1/jc/matches |
beidan | 当天北单场次(编号/让球/SP) | /v1/bjdc/matches |
my_quota | 查套餐与剩余额度 | /v1/me |
· 工具按套餐开放:基础版没有阵容/伤停/资金占比,AI 调用会收到 403 和升级提示
· 每天调用额度见 /v1/me,AI 一次分析可能调 5-20 次
· 数据仅供研究与技术开发,不含投注建议