{"openapi":"3.1.0","info":{"title":"FunCoding API","version":"1.0.0","description":"FunCoding（https://funcoding.ai）的接口：搜索和读取 Agent Skills、MCP Server 的安装信息，搜索和阅读智能体文档，读取分享的清单和 AI 热点。\n\n授权：在 https://funcoding.ai/me/api-keys/ 创建 API Key（以 fc_ 开头），放在 X-API-Key 请求头或 Authorization: Bearer 里。文档 Markdown 不需要授权。\n\n次数：每个账号每分钟 60 次、每天 3000 次（UTC 0 点清零），同一账号的所有 Key 共用；每个 IP 每分钟 120 次。超过时返回 429 和 Retry-After。"},"servers":[{"url":"https://funcoding.ai"}],"tags":[{"name":"Skill 和 MCP","description":"Agent Skills 和 MCP Server"},{"name":"文档","description":"智能体文档"},{"name":"清单","description":"用户分享的清单"},{"name":"热点","description":"AI 热点，数据来自 AIHOT"}],"security":[{"apiKey":[]},{"bearer":[]}],"paths":{"/api/cli/search":{"get":{"operationId":"searchCatalog","tags":["Skill 和 MCP"],"summary":"搜索 Skill 和 MCP Server","description":"按名称和描述匹配，名称完全相同的排在最前，同级按 star 排序。只返回站点上展示的条目。","parameters":[{"name":"q","in":"query","required":true,"description":"搜索词，最多 100 个字符","schema":{"type":"string","maxLength":100}},{"name":"limit","in":"query","required":false,"description":"返回条数，1–30，默认 10","schema":{"type":"integer","minimum":1,"maximum":30,"default":10}}],"responses":{"200":{"description":"两组卡片：skills 和 mcp。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"}}}},"400":{"description":"参数错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"没有授权，或 API Key 无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求已超过限额，请等待 Retry-After 指定的秒数后重试。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/cli/skills/{owner}/{repo}/{skill}":{"get":{"operationId":"getSkill","tags":["Skill 和 MCP"],"summary":"读取 Skill 的安装信息","description":"返回文件清单、下载地址前缀和 SKILL.md 全文。文件地址是 rawBase 加文件的相对路径，从 GitHub 下载。","parameters":[{"name":"owner","in":"path","required":true,"description":"GitHub 用户或组织","schema":{"type":"string"}},{"name":"repo","in":"path","required":true,"description":"仓库名","schema":{"type":"string"}},{"name":"skill","in":"path","required":true,"description":"Skill 名","schema":{"type":"string"}}],"responses":{"200":{"description":"安装需要的全部信息，content 是 SKILL.md 全文。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillInstallInfo"}}}},"400":{"description":"参数错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"没有授权，或 API Key 无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"没有找到","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求已超过限额，请等待 Retry-After 指定的秒数后重试。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"读取 GitHub 失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/cli/mcp/{owner}/{repo}":{"get":{"operationId":"getMcpServer","tags":["Skill 和 MCP"],"summary":"读取 MCP Server 的启动方式","description":"列出远程地址和本地启动命令（npx 或 uvx），以及需要提供的请求头和环境变量。同一仓库里有多个 Server 时，在路径最后加上子目录名。","parameters":[{"name":"owner","in":"path","required":true,"description":"GitHub 用户或组织","schema":{"type":"string"}},{"name":"repo","in":"path","required":true,"description":"仓库名","schema":{"type":"string"}}],"responses":{"200":{"description":"launches 为空时，说明没有登记可以直接使用的启动方式，去仓库查看。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpInstallInfo"}}}},"400":{"description":"参数错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"没有授权，或 API Key 无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"没有找到","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求已超过限额，请等待 Retry-After 指定的秒数后重试。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/cli/docs/search":{"get":{"operationId":"searchDocs","tags":["文档"],"summary":"搜索站内文档","description":"在站内的智能体文档里按关键词搜索。","parameters":[{"name":"q","in":"query","required":true,"description":"搜索词，最多 100 个字符","schema":{"type":"string","maxLength":100}},{"name":"agent","in":"query","required":false,"description":"只搜一个智能体，如 claude-code","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"返回条数，1–30，默认 10","schema":{"type":"integer","minimum":1,"maximum":30,"default":10}}],"responses":{"200":{"description":"文档列表，id 可以直接用来读取全文。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocSearchResult"}}}},"400":{"description":"参数错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"没有授权，或 API Key 无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求已超过限额，请等待 Retry-After 指定的秒数后重试。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/cli/docs/{agent}/{path}":{"get":{"operationId":"getDoc","tags":["文档"],"summary":"读取一篇文档","description":"Markdown 原文，开头写明网址、核实或同步日期和官方来源，站内链接已改成完整网址。path 可以含多级目录；省略 path 时返回智能体的概览。","security":[],"parameters":[{"name":"agent","in":"path","required":true,"description":"智能体，如 claude-code","schema":{"type":"string"}},{"name":"path","in":"path","required":true,"description":"文档路径，如 build/skills","schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"传 en 读英文版，没有英文版时返回中文","schema":{"type":"string","enum":["en"]}}],"responses":{"200":{"description":"Markdown 文本。","content":{"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"没有找到","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求已超过限额，请等待 Retry-After 指定的秒数后重试。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/cli/lists/{shareId}":{"get":{"operationId":"getSharedList","tags":["清单"],"summary":"读取分享的清单","description":"用户公开分享的 Skill 和 MCP Server 清单，只包含仍在站点上展示的条目。shareId 是分享链接 /share/<shareId>/ 的最后一段。","parameters":[{"name":"shareId","in":"path","required":true,"description":"分享链接里的 10 位 id","schema":{"type":"string"}}],"responses":{"200":{"description":"清单标题、分享者和两组卡片。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedList"}}}},"401":{"description":"没有授权，或 API Key 无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"没有找到","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求已超过限额，请等待 Retry-After 指定的秒数后重试。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/cli/news":{"get":{"operationId":"getNews","tags":["热点"],"summary":"读取 AI 热榜或日报","description":"不带 daily 时返回当前热榜；带 daily 时返回那一天的 AI 日报。数据来自 AIHOT，展示时请保留来源名和原文链接。","parameters":[{"name":"limit","in":"query","required":false,"description":"返回条数，1–10，默认 10","schema":{"type":"integer","minimum":1,"maximum":10,"default":10}},{"name":"daily","in":"query","required":false,"description":"latest 表示最新一期，或写成 YYYY-MM-DD","schema":{"type":"string"}}],"responses":{"200":{"description":"热榜条目和 attribution；日报的格式见 /openapi.json。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HotNews"}}}},"401":{"description":"没有授权，或 API Key 无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"没有找到","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求已超过限额，请等待 Retry-After 指定的秒数后重试。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/cli/mcp/{owner}/{repo}/{sub}":{"get":{"operationId":"getMcpServerInRepo","tags":["Skill 和 MCP"],"summary":"读取仓库中某个 MCP Server 的启动方式","description":"列出远程地址和本地启动命令（npx 或 uvx），以及需要提供的请求头和环境变量。同一仓库里有多个 Server 时，在路径最后加上子目录名。","parameters":[{"name":"owner","in":"path","required":true,"description":"GitHub 用户或组织","schema":{"type":"string"}},{"name":"repo","in":"path","required":true,"description":"仓库名","schema":{"type":"string"}},{"name":"sub","in":"path","required":true,"description":"子目录名","schema":{"type":"string"}}],"responses":{"200":{"description":"launches 为空时，说明没有登记可以直接使用的启动方式，去仓库查看。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpInstallInfo"}}}},"400":{"description":"参数错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"没有授权，或 API Key 无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"没有找到","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求已超过限额，请等待 Retry-After 指定的秒数后重试。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/cli/docs/{agent}":{"get":{"operationId":"getAgentOverview","tags":["文档"],"summary":"读取智能体的概览","description":"Markdown 原文，开头写明网址、核实或同步日期和官方来源，站内链接已改成完整网址。path 可以含多级目录；省略 path 时返回智能体的概览。","security":[],"parameters":[{"name":"agent","in":"path","required":true,"description":"智能体，如 claude-code","schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"传 en 读英文版，没有英文版时返回中文","schema":{"type":"string","enum":["en"]}}],"responses":{"200":{"description":"Markdown 文本。","content":{"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"没有找到","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求已超过限额，请等待 Retry-After 指定的秒数后重试。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"个人中心创建的 API Key，以 fc_ 开头"},"bearer":{"type":"http","scheme":"bearer","description":"API Key，或 funcoding-cli 登录得到的 token"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"CatalogCard":{"type":"object","properties":{"kind":{"type":"string","enum":["skill","mcp"]},"id":{"type":"string","description":"skill 为 owner/repo/skill，mcp 为 owner/repo 或 owner/repo/sub"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"},"stars":{"type":"integer"},"category":{"type":"string"},"official":{"type":"boolean","description":"厂商为自己的产品发布的条目"},"likes":{"type":"integer"},"saves":{"type":"integer"}},"required":["kind","id","name","description","owner","repo","stars","category","official","likes","saves"]},"SearchResult":{"type":"object","properties":{"skills":{"type":"array","items":{"$ref":"#/components/schemas/CatalogCard"}},"mcp":{"type":"array","items":{"$ref":"#/components/schemas/CatalogCard"}}},"required":["skills","mcp"]},"SkillInstallInfo":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"folder":{"type":"string","description":"安装到本地时的目录名"},"repo":{"type":"object","properties":{"owner":{"type":"string"},"name":{"type":"string"},"branch":{"type":"string"},"url":{"type":"string"}},"required":["owner","name","branch","url"]},"path":{"type":"string","description":"Skill 在仓库里的目录，根目录为空字符串"},"rawBase":{"type":"string","description":"文件下载地址 = rawBase + 文件相对路径"},"files":{"type":"array","items":{"type":"string"}},"truncated":{"type":"boolean","description":"文件过多时只列出一部分"},"stars":{"type":"integer"},"official":{"type":"boolean"},"content":{"type":"string","description":"SKILL.md 全文"}},"required":["id","name","description","folder","repo","path","rawBase","files","truncated","stars","official","content"]},"McpInstallInfo":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"configName":{"type":"string","description":"写进智能体配置时用的名称"},"description":{"type":"string"},"repo":{"type":"object","properties":{"owner":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["owner","name","url"]},"page":{"type":"string"},"stars":{"type":"integer"},"official":{"type":"boolean"},"devtool":{"type":"boolean","description":"SDK、框架等开发工具，不是可安装的 Server"},"launches":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"const":"remote"},"transport":{"type":"string","enum":["http","sse"]},"url":{"type":"string"},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"required":{"type":"boolean"},"description":{"type":"string"}},"required":["name","required"]}}},"required":["kind","transport","url","headers"]},{"type":"object","properties":{"kind":{"const":"stdio"},"registry":{"type":"string","enum":["npm","pypi"]},"package":{"type":"string"},"version":{"type":"string"},"command":{"type":"string","enum":["npx","uvx"]},"args":{"type":"array","items":{"type":"string"}},"env":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"required":{"type":"boolean"},"description":{"type":"string"}},"required":["name","required"]}}},"required":["kind","registry","package","command","args","env"]}]}}},"required":["id","name","configName","description","repo","page","stars","official","devtool","launches"]},"DocSearchResult":{"type":"object","properties":{"docs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"<agent>/<path>"},"title":{"type":"string"},"agent":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"}},"required":["id","title","agent","description","url"]}}},"required":["docs"]},"SharedList":{"type":"object","properties":{"shareId":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"owner":{"type":"object","properties":{"name":{"type":"string"},"image":{"type":["string","null"]}},"required":["name","image"]},"url":{"type":"string"},"skills":{"type":"array","items":{"$ref":"#/components/schemas/CatalogCard"}},"mcp":{"type":"array","items":{"$ref":"#/components/schemas/CatalogCard"}}},"required":["shareId","title","description","updatedAt","owner","url","skills","mcp"]},"HotNews":{"oneOf":[{"type":"object","properties":{"updatedAt":{"type":["string","null"],"format":"date-time"},"stories":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer"},"title":{"type":"string"},"latest":{"type":"string"},"summary":{"type":"string"},"sourceCount":{"type":"integer"},"url":{"type":"string"},"originalUrl":{"type":"string"},"sources":{"type":"array","items":{"type":"string"}}},"required":["rank","title","latest","summary","sourceCount","url","originalUrl","sources"]}},"attribution":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"]}},"required":["updatedAt","stories","attribution"]},{"type":"object","properties":{"day":{"type":"string"},"url":{"type":"string"},"lead":{"oneOf":[{"type":"object","properties":{"title":{"type":"string"},"summary":{"type":"string"}},"required":["title","summary"]},{"type":"null"}]},"sections":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"summary":{"type":"string"},"source":{"type":"string"},"url":{"type":"string"}},"required":["title","summary","source","url"]}}},"required":["label","items"]}},"flashes":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"summary":{"type":"string"},"source":{"type":"string"},"url":{"type":"string"}},"required":["title","summary","source","url"]}},"attribution":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"]}},"required":["day","url","lead","sections","flashes","attribution"]}]}}}}