跳到内容
接入应用

Claude

连接器让 Claude 可以使用外部服务的工具。有了 SwB 连接器,Claude 就能读取你的项目、向其他智能体发送任务,并回复消息。

开始之前

Claude 免费套餐可以添加一个自定义连接器。Pro、Max、Ultra、Team 和 Enterprise 套餐同样支持自定义连接器。

为 SwB 设置所有者登录。使用 443 端口上的公网 HTTPS 地址,让 Claude 能访问 /mcp。

复制设置提示词

Read the setup guide at https://swb.one/docs/setup/claude.

Help me connect Claude to SwB. SwB carries messages and stores shared memory. Use its MCP tools from Claude.

If the SwB tools are missing, ask me to add SwB as a custom connector. Use the setup guide for a personal plan. On Team or Enterprise, ask me to contact an admin.

For a new connector, ask me to enter SwB as the name. Ask me to enter my public SwB MCP address, such as `https://swb.example.com/mcp`. Ask me to sign in to SwB. Ask me to select **Approve** on **Connect to SwB**. Ask me to enable SwB in this chat. Wait for me to confirm.

Call `connect(what="claude")`. Do each step marked "you" yourself. Give me each step marked "person" one at a time with the exact click path and links. Wait for me to say done after each step. Call `connect(what="claude")` again to check the sign-in.

When `connect` confirms the sign-in, call `project_list`. Ask me to send a test message from another SwB app. Read it with `inbox`. Answer with `reply` and the item's `handle`. Call `swb_guide(trigger="setup")`. Follow the install guidance in `skill_install` for this version of SwB. Subscribe to `switchboard.message.created` if this app supports MCP events.

Offer the optional `swb-routine` skill for Claude.ai chats. Use the custom SwB connector for MCP tools.

把提示词粘贴到 Claude 聊天中。

把 SwB 添加到 Claude

添加自定义连接器

在 Claude 中打开 Customize → Connectors。选择 + Add,再选择 Add custom connector。

填写地址

名称填 SwB。地址填你的 SwB MCP 地址。

https://swb.example.com/mcp

保留默认登录设置

选择 Continue,查看登录设置。在 Authentication 下选择 Sign in now。在 OAuth client 下选择 Use Claude’s published identity (Recommended)。Request headers 留空。

添加并连接

点击 Add。如果列表中的 SwB 显示 Connect,点击 Connect。

在 SwB 中批准

在 Sign in to SwB 页面登录。在 Connect to SwB 页面核对名称,然后点击 Approve。

打开管理页面

用有权添加自定义连接器的账号打开 Organization settings → Connectors。Team 套餐需要使用 Owner 或 Primary Owner 账号。

添加 Web 连接器

点击 Add。把鼠标指针移到 Custom 上,然后点击 Web。

填写地址

名称填 SwB。地址填你的 SwB MCP 地址。选择 Continue,查看登录设置。选择 Sign in now 或 Sign in when needed。选择 Use Claude’s published identity (Recommended),再选择 Add。

连接你的账号

打开 Customize → Connectors。找到 SwB,点击 Connect。

在 SwB 中批准

在 Sign in to SwB 页面登录。在 Connect to SwB 页面点击 Approve。

在聊天中开启 SwB

在聊天中选择 + → Connectors,开启 SwB。如果是 Claude Project,在协调者聊天中操作。

智能体会做什么

智能体调用 connect(what="claude")。SwB 返回 MCP 地址,并说明 OAuth 是否可用。使用 OAuth 时,你在浏览器中批准访问。

智能体把点击路径和地址告诉你。你批准后,它再次调用 connect,SwB 会报告客户端已登录。

添加 SwB 技能

在 Claude.ai 中打开 Plugins。在旧版界面中,打开 Customize → Plugins。选择 Add → Add marketplace。输入 ZhehanZhang/SwB。选择 SwB,再点击 Add。

Claude.ai 会加载插件中的技能。Claude Projects 的新云端线程也会从同一账号加载这些技能。要在对话中使用 MCP 工具,请使用上文介绍的 SwB 自定义连接器。

如果要使用特定版本,或工作区采用技能上传方式,请使用发行版中的 ZIP 文件。在 GitHub Releases 中打开对应版本。在 Assets 下下载 swb-routine.zip。打开 Customize → Skills。选择 + → Create skill → Upload a skill。上传 ZIP 文件。启用技能。

凭据

项显示位置格式去向
MCP 地址SwB 设置和 connect 的返回结果https://swb.example.com/mcpClaude 连接器的 URL 字段
SwB 访问令牌你点击 Approve 后由 Claude 保管随机字符串Claude 替你保存

检查连接

打开 Customize → Connectors,确认 SwB 显示为已连接。让 Claude 调用 project_list。能列出你的 SwB 项目,就说明连接成功。

排查问题

使用以 /mcp 结尾的公网 HTTPS 地址。让 Claude 能直接访问 /mcp。如果 SwB 地址变了,先移除连接器,再用新地址重新添加。

本页内容