地址和 key
MCP 服务器地址(Streamable HTTP):
https://api.silklinedata.com/mcp用你的 API key 鉴权:请求头 Authorization: Bearer slk_YOUR_KEY,和直接调接口是同一把 key。还没有 key 的,登录后在 API keys 页建一把(新账号有试用额度)。下面每段配置里只有 slk_YOUR_KEY 要换成你的 key。
只能填网址、不能填请求头的客户端,用带 key 的地址 https://api.silklinedata.com/mcp/slk_YOUR_KEY。这个地址就等于 key,别分享、别截图;漏了就在 API keys 页作废它再建一把。
Claude Code
在终端里跑一行:
claude mcp add --transport http silkline https://api.silklinedata.com/mcp \
--header "Authorization: Bearer slk_YOUR_KEY"跑完在 Claude Code 里输入 /mcp 能看到 silkline 已连上。
Claude Desktop 和 claude.ai
设置 → 连接器(Connectors)→ 添加 → 添加自定义连接器(Add custom connector)。名称填 Silkline,网址填带 key 的地址,登录方式选 No sign-in,然后点添加。网页版 claude.ai 和 Claude Desktop 是同一个设置。
https://api.silklinedata.com/mcp/slk_YOUR_KEY如果对话框里有 Request headers,也可以网址只填 https://api.silklinedata.com/mcp,在请求头里选 authorization,值填 Bearer slk_YOUR_KEY。
Cursor
写进 ~/.cursor/mcp.json(所有项目可用)或项目里的 .cursor/mcp.json:
{
"mcpServers": {
"silkline": {
"url": "https://api.silklinedata.com/mcp",
"headers": {
"Authorization": "Bearer slk_YOUR_KEY"
}
}
}
}VS Code
写进项目里的 .vscode/mcp.json。key 不写进文件:第一次启动时 VS Code 弹框问你,输入时不显示。
{
"inputs": [
{
"type": "promptString",
"id": "silkline-key",
"description": "Silkline API key",
"password": true
}
],
"servers": {
"silkline": {
"type": "http",
"url": "https://api.silklinedata.com/mcp",
"headers": {
"Authorization": "Bearer ${input:silkline-key}"
}
}
}
}ChatGPT
打开 Plugins,点 +,选 Add custom MCP server。名称填 Silkline,Server URL 填带 key 的地址,认证选 No authentication,确认风险提示后创建。
https://api.silklinedata.com/mcp/slk_YOUR_KEY其他客户端
支持 Streamable HTTP 的客户端,大多认这样一段:
{
"mcpServers": {
"silkline": {
"type": "http",
"url": "https://api.silklinedata.com/mcp",
"headers": {
"Authorization": "Bearer slk_YOUR_KEY"
}
}
}
}有哪些工具
默认三个工具,不会把你的上下文撑满:先用 search_endpoints 找接口,再用 call_endpoint 取数。
search_endpoints: Find data endpoints by keywords (English or Chinese) and platform. Each result has the endpoint id to pass to call_endpoint, what it returns, the price per record and its parameters. Without query and platform it lists every platform with its number of endpoints. Free, no key needed.call_endpoint: Fetch live public data from one endpoint. Use search_endpoints first to get the endpoint id and its parameters. The answer is { data, cursor, meta }: meta.charged_usd is what this call was charged and meta.balance_usd what is left. Charged per record returned; errors on our side are not charged. Needs an API key.get_balance: The account's balance in USD: paid, trial credit, and what open requests are holding. Free. Needs an API key.
只用一两个平台、想让每个接口都是一个工具的,在地址后面加 ?platforms=xiaohongshu,douyin(平台的 id 见搜索结果,最多 80 个工具)。
出错和收费
没带 key、key 不对、余额不够时,工具会回一段说明:出了什么事、收没收钱、去哪改。列工具和搜索不要 key、不收钱。
一次调用超时或断了线,先用 get_balance 或控制台的 Requests 页看它跑没跑、收没收钱,再决定要不要重发:重发同一个调用会再收一次,和直接调接口一样。
取数和直接调接口完全一样:按返回的条数收费,每次结果的 meta.charged_usd 写着这次收了多少、meta.balance_usd 写着还剩多少。规则见文档和价格。