内容
# Kit for AI 开发者中心
Kit for AI 的公共开发者资源:AI 代理的持久内存 — `记住`/`回忆`,基于知识的 RAG 搜索,引用聊天,以及文档→Markdown/JSON 转换,均通过 **MCP** 和 **REST** 使用一个 API 密钥。
在 <https://kitforai.com/app/settings> 获取 API 密钥(以 `kfa_` 开头)。
## 内容列表
| 路径 | 描述 |
|------|-----------|
| [`packages/sdk`](packages/sdk) | `@kitforai/sdk` — 官方类型化的 TypeScript/JavaScript REST 客户端(转换,知识库)。零依赖,ESM + CJS。 |
| [`plugins/kit-for-ai`](plugins/kit-for-ai) | Claude Code 插件 — 将 Kit for AI MCP 工具和一个使用技能连接到 Claude,只需一个命令。 |
| [`.claude-plugin/marketplace.json`](.claude-plugin/marketplace.json) | 使此仓库成为可安装的插件市场(`kitforai`)。 |
| [`.claude/`](.claude) | `using-kit-for-ai` 技能 — 克隆此仓库,Claude Code 知道何时记住/回忆和使用工具。 |
| [`llms.txt`](llms.txt) | 代理的机器可读索引(镜像 <https://kitforai.com/llms.txt>)。 |
| [`examples/`](examples) | 可运行的 SDK 和 MCP 设置示例。 |
## 使用 SDK
```bash
npm install @kitforai/sdk
```
```ts
import { KitForAI } from "@kitforai/sdk";
const kit = new KitForAI({ apiKey: process.env.KITFORAI_API_KEY! });
// 将 URL 转换为结构化 JSON
const res = await kit.convertUrl("https://example.com/report.pdf", { outputFormat: "json" });
```
参见 [`examples/sdk-quickstart.ts`](examples/sdk-quickstart.ts)。
## 使用 Claude 插件
```
/plugin marketplace add kitforai/kitforai
/plugin install kit-for-ai@kitforai
```
```bash
export KITFORAI_API_KEY=kfa_...
```
> 此仓库是插件、SDK 和 MCP 设置的规范首页。插件从此处提交到 Anthropic 的 Claude 插件目录。
## 连接任意 MCP 代理
将任意 MCP 客户端指向托管服务器 — 参见 [`examples/mcp-setup.md`](examples/mcp-setup.md):
```json
{
"kit-for-ai": {
"type": "http",
"url": "https://kitforai.com/api/mcp",
"headers": { "x-api-key": "${KITFORAI_API_KEY}" }
}
}
```
代理可以从 <https://kitforai.com/llm-setup> 自行配置。
## 链接
- 文档:<https://kitforai.com/docs> · API 参考:<https://kitforai.com/reference>
- MCP 端点:`https://kitforai.com/api/mcp` · REST 基址:`https://kitforai.com/api/v1`
## 许可证
MIT — 参见 [LICENSE](LICENSE)。