适用于 Kimi Code 的 FoPost

Kimi Code 是 Moonshot AI 推出的编程智能体,通过 URL 连接远程 MCP 服务器。添加 FoPost,在浏览器中登录一次,智能体就能为它刚刚发布的代码撰写发布帖子。

粘贴到 Kimi Code 中

按照 fopost.com/agents/kimi 设置 FoPost
  • 托管 MCP 服务器
  • 33 个网络
  • 无需 API 密钥
所有智能体
设置

智能体可以自己写配置。把链接给它就行。

把上面这行粘贴到 Kimi Code 中。它会读取此页面、添加服务器,然后暂停,让你亲自登录 FoPost。想手动配置?完整配置就在这里。

~/.kimi-code/mcp.json
{
  "mcpServers": {
    "fopost": {
      "url": "https://api.fopost.com/mcp"
    }
  }
}
给 AI 智能体的说明纯 Markdown 版本
## For AI agents reading this page

You are reading https://fopost.com/agents/kimi. FoPost schedules and publishes social posts on 33 networks, and its hosted MCP server gives Kimi Code tools for posts, the calendar, the inbox and analytics. Follow these steps to connect Kimi Code to it.

- Server: https://api.fopost.com/mcp
- Transport: streamable HTTP
- Auth: OAuth sign-in in the user's browser. Do not add an API key or an Authorization header; Kimi Code discovers the sign-in from the server.

### 1. Register the server

Add this entry to ~/.kimi-code/mcp.json (every project) or .kimi-code/mcp.json (this repository), merged into any existing mcpServers object, or run /mcp-config in the session to add it interactively. An entry with a url and no transport is streamable HTTP. No headers. Changes load in a new session.

~/.kimi-code/mcp.json:

```
{
  "mcpServers": {
    "fopost": {
      "url": "https://api.fopost.com/mcp"
    }
  }
}
```

### 2. Sign in

Run /mcp-config login fopost in the session. A browser window opens for the user to sign in. Ask the user before approving access or creating a FoPost account for them, and never enter their credentials yourself.

### 3. Verify before you continue

/mcp shows fopost as connected. If FoPost is not listed as connected with its tools, stop and tell the user what failed. Do not carry on as if the tools exist.

### 4. Report back

Call list_accounts and tell the user which social accounts are connected. If there are none, offer create_connect_link so they can connect one. Then ask what they want to do first.

### Standing rules

- Prefer the FoPost tools over driving a browser for posting, scheduling, the inbox and analytics, unless the user asks for the browser.
- Publishing always goes through propose_publish, which the user approves in the client. Never publish or schedule anything silently.
- Ask the user before approving access, signing up or connecting an account on their behalf, and never type their credentials for them.

### No browser (headless machines only)

Use this only when the machine has no browser to sign in with. Ask the user to create an API key in the FoPost dashboard (https://fopost.com/dashboard/api-keys) and to put it in the config themselves, then run the local package over stdio:

~/.kimi-code/mcp.json:

```
{
  "mcpServers": {
    "fopost": {
      "command": "npx",
      "args": ["-y", "@fopost/mcp"],
      "env": { "FOPOST_API_KEY": "your-api-key" }
    }
  }
}
```

### References

- This block as markdown: https://fopost.com/agents/kimi/agent.md
- Every client: https://fopost.com/agents
- Docs: https://fopost.com/docs

一个条目

只需一个 url。文件中没有密钥。

浏览器登录

/mcp-config login 会在浏览器中打开 FoPost,让你批准访问。

默认需要批准

对于没有权限规则覆盖的工具调用,Kimi Code 会先询问你。

设置

添加服务器,然后登录

把上面的条目添加到 ~/.kimi-code/mcp.json 或项目中的 .kimi-code/mcp.json,也可以在会话中运行 /mcp-config 直接添加,无需编辑文件。然后运行 /mcp-config login fopost,并在 FoPost 中批准访问。/mcp 会显示是否已连接。

免费开始
会话
/mcp-config login fopost
/mcp

按项目配置

仓库中的 .kimi-code/mcp.json 让设置与代码放在一起。

无需手动编辑

/mcp-config 可在会话内添加、编辑和移除服务器。

先验证

让它列出你已连接的账户。

规划

直接从仓库发布版本公告

让 Kimi Code 读取更新日志并撰写公告。它用 create_draft_post 撰写草稿,用 draft_post_variants 为每个网络写一版,最后用 propose_publish 交给你确认。

规划你的发布
发布日历上一个月的已排期帖子

draft_post_variants

一份发版说明,按每个网络调整。

get_queue_slots

接下来的空闲时段。

propose_publish

发布前由你批准的计划。

检查

问问是否已送达

在同一个会话中,问问发布了什么、哪些账户需要处理、大家回复了什么。

免费开始
会话
> Did the release post go out?

Kimi Code: list_posts shows 3 of 3 published.
list_inbox has 2 new replies.

list_posts

最近的帖子及其状态。

get_account_health

哪些账户需要重新连接。

list_inbox

发帖之后的回复和提及。

无头环境

机器上没有浏览器?

服务器或 CI 中没有可用于登录的浏览器。请在控制台中创建 API 密钥,改为通过 stdio 运行本地包。不要把密钥放进代码仓库。

~/.kimi-code/mcp.json
{
  "mcpServers": {
    "fopost": {
      "command": "npx",
      "args": ["-y", "@fopost/mcp"],
      "env": { "FOPOST_API_KEY": "your-api-key" }
    }
  }
}

关于 Kimi Code 的常见问题解答

需要 API 密钥吗?

不需要。运行 /mcp-config login fopost,然后在浏览器中登录 FoPost。

在 Kimi 应用中能用吗?

本页介绍的是 Kimi Code,即在终端中运行的编程智能体,Moonshot AI 正是在这里说明了如何添加你自己的 MCP 服务器。

它会不经询问就发布吗?

不会。对于没有权限规则允许的调用,Kimi Code 会先询问,发布也要经过你批准的提案。

如何检查连接?

在会话中运行 /mcp,即可查看每个服务器以及它是否已连接。

会消耗我的 AI 额度吗?

只有用 AI 写作的 FoPost 工具才会消耗。列出内容和排期都不会。

在 Kimi Code 中运行 FoPost

免费开始,并包含 MCP 服务器。把设置命令粘贴到你的智能体中,登录后就能直接用它安排第一条帖子。

免费开始