Docs
连接 MCP 客户端
灵稿使用本地 HTTP transport。应用运行后打开 MCP Server 页面,确认服务为 Running,再按你使用的 Agent 或 MCP 客户端写入配置。
保持灵稿桌面应用运行,并在 MCP Server 页面确认状态为 Running。默认 endpoint 是 http://127.0.0.1:7654/mcp;如果端口被占用,以应用内显示的 endpoint 为准。
Claude Code
在项目终端里添加 RedMate MCP server。需要团队共享时可以把 scope 改为 project;只给自己用则保留默认 local scope。
- 运行命令后,在 Claude Code 里使用 /mcp 查看 redmate 是否启用。
- 第一次调用工具前,先让 Claude Code 列出 xhs_* tools,确认它拿到的是当前项目期望的 server。
claude mcp add --transport http redmate http://127.0.0.1:7654/mcpCursor
打开 Cursor Settings → MCP → Add new global MCP server,或在项目根目录创建 .cursor/mcp.json 进行项目级共享。
- 保存配置后重启 Cursor,或使用 Cursor 的 MCP reload 功能。
- 在聊天里让 Cursor 调用 account_list,确认连接已经通。
{
"mcpServers": {
"redmate": {
"url": "http://127.0.0.1:7654/mcp"
}
}
}VS Code / GitHub Copilot
在工作区创建 .vscode/mcp.json,然后从 Command Palette 运行 MCP: List Servers 或 MCP: Open User Configuration。
- 工作区配置适合随项目一起提交;用户级配置适合所有项目共用。
- 启动 server 后,Copilot 应该能看到 RedMate 暴露的 xhs_* tools。
{
"servers": {
"redmate": {
"type": "http",
"url": "http://127.0.0.1:7654/mcp"
}
}
}Claude Desktop
如果你的 Claude Desktop 支持远程 MCP connectors,打开 Settings → Connectors → Add custom connector,然后填入灵稿 endpoint。旧版本地 stdio 配置不等同于这个 HTTP endpoint。
- 添加 connector 时使用 http://127.0.0.1:7654/mcp。
- 保持灵稿应用运行;关闭应用后 connector 会连接失败。
http://127.0.0.1:7654/mcpCodex
把 RedMate MCP server 写入 Codex 配置。灵稿是本地服务,不需要 OAuth login;启动应用后 Codex 可以直接请求这个 endpoint。
- 用户级配置写入 ~/.codex/config.toml。
- 项目级共享可以写入项目根目录的 .codex/config.toml。
[mcp_servers.redmate]
url = "http://127.0.0.1:7654/mcp"其他 MCP 客户端
如果你的工具没有列在上面,但支持 HTTP MCP server,优先使用 url / type:http 的配置。只有老客户端完全不支持 HTTP 时,才考虑额外的本地桥接方案。
- Transport 使用 HTTP,URL 使用应用内显示的 /mcp endpoint。
- 保存配置后重启客户端,并确认 tools/list 能返回 xhs_* 工具。
- 写操作前建议打开客户端的人工确认层,特别是发布、删除和取消任务。
{
"mcpServers": {
"redmate": {
"type": "http",
"url": "http://127.0.0.1:7654/mcp"
}
}
}