客户端配置指南
将 TIA Portal 文档接入 Claude Code、Cursor、VS Code 等支持 Streamable HTTP
的 AI 编程助手。以下示例中的 <host> 请替换为你的服务域名,
<YOUR_API_KEY> 请替换为你的真实 API 密钥。
如何获取密钥
登录后在控制台 /dashboard点击「更换密钥」即可生成新密钥。
新密钥只显示一次,请立即复制保存;旧密钥随即全部失效。每把密钥每次
get_docs 调用消耗 1 次额度。
Claude Code
在终端执行以下命令添加 MCP 服务器:
claude mcp add --transport http tia https://<host>/mcp -H "Authorization: Bearer <YOUR_API_KEY>"
Cursor
在项目根目录的 .mcp.json 中配置:
{
"mcpServers": {
"tia": {
"type": "http",
"url": "https://<host>/mcp",
"headers": { "Authorization": "Bearer <YOUR_API_KEY>" }
}
}
}
VS Code
在项目根目录的 .vscode/mcp.json 中配置:
{
"servers": {
"tia": {
"type": "http",
"url": "https://<host>/mcp",
"headers": { "Authorization": "Bearer <YOUR_API_KEY>" }
}
}
}
其他支持 Streamable HTTP 的客户端
- URL:
https://<host>/mcp - 传输方式:
streamable-http - 协议版本:
2025-03-26 - 请求头:
Authorization: Bearer <YOUR_API_KEY>(也接受X-API-Key)
使用方法
连接成功后,在工具列表中选择 get_docs:参数
library: "tia-programming@1.0",topic: 你的问题。
额度耗尽时,工具会返回明确的提示信息。