Token导航 LogoToken导航TokenDH.com
Purrfect (Ryan Lisse) logo
开发工具未说明官方级别未说明来源级核验

Purrfect (Ryan Lisse)

MCP Server

一个纯Swift编写的Clawdbot网关命令行/TUI客户端,提供消息发送、状态检查、历史记录查看等功能,支持WebSocket协议v3。

工具数

4

提示词数

0

GitHub Stars

1

资源数

0
Swift命令行工具ClaudeClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

RyanLisse

提供方

RyanLisse

最后核验

2026/5/17 20:23

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

喵完美🐾

](https://swift.org) ![Platform](https://www.apple.com/macos/) ![License](LICENSE)

一个纯Swift CLI/TUI客户端 克劳德博特 网关。

特性

  • CLI接口:发送消息、检查状态、查看历史记录
  • TUI接口:终端UI(即将推出)
  • MCP 服务器:Claude桌面集成
  • 纯Swift:不需要Node.js-本机macOS性能
  • 网关协议v3:完全支持WebSocket

安装

从源代码构建

git clone https://github.com/yourusername/Purrfect.git
cd Purrfect
swift build -c release
cp .build/release/purrfect /usr/local/bin/

配置

配置文件

创建 ~/.purrfect/config.yaml:

gateway:
  url: ws://localhost:3030/gateway
  token: null
  password: null
defaults:
  sessionKey: main
  channel: null
  deliver: false
sessions:
  directory: ~/.purrfect/sessions
  retainHours: 168

或者使用默认值进行初始化:

purrfect config init

环境变量

环境变量覆盖配置文件值。CLI参数具有最高优先级。

# Gateway connection
export GATEWAY_URL="ws://localhost:3030/gateway"
export GATEWAY_TOKEN="your-token"
export GATEWAY_PASSWORD="your-password"

# Session defaults
export SESSION_KEY="main"
export CHANNEL="telegram"

优先级顺序:

  1. 命令行参数(最高)
  2. 环境变量
  3. 配置文件值
  4. 内置默认值(最低)

CLI覆盖示例

# CLI arg overrides env var and config file
purrfect ask "Hello" --gateway-url ws://other-host:3030/gateway

# CLI arg with env var fallback
purrfect ask "Hello" --session work  # or export SESSION_KEY=work

用法

CLI命令

问一个问题:

purrfect ask "What's the weather today?"
purrfect ask "Explain quantum computing" --stream

检查网关状态:

purrfect status
purrfect status --json

查看消息渠道:

purrfect channels

查看聊天记录:

purrfect history
purrfect history --limit 50 --reverse

管理配置:

purrfect config show
purrfect config set gateway.url ws://localhost:3030/gateway
purrfect config set defaults.session my-session

全局选项

--gateway-url, -g     Gateway WebSocket URL
--token, -t           Authentication token
--password            Authentication password
--session, -s         Session key
--verbose             Enable verbose output

例子

发送到特定频道:

purrfect ask "Send this to Telegram" --channel telegram --deliver

使用不同的会话:

purrfect ask "Hello" --session work
purrfect history --session work

流响应:

purrfect ask "Write a story" --stream

MCP服务器(克劳德桌面)

添加到 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "purrfect": {
      "command": "/usr/local/bin/purrfect-mcp"
    }
  }
}

可用的MCP工具:

  • ask -向Clawdbot代理发送消息
  • status -获取网关状态
  • channels -获取消息通道状态
  • history -获取聊天记录

建筑

Purrfect/
├── Sources/
│   ├── PurrfectCore/          # Shared library
│   │   ├── Models/            # Gateway protocol types
│   │   ├── Gateway/           # WebSocket client
│   │   ├── Config/            # Configuration loader
│   │   ├── Events/            # Event bus
│   │   └── Sessions/          # Session persistence
│   ├── PurrfectCLI/           # CLI executable
│   │   └── Commands/          # CLI commands
│   ├── PurrfectTUI/           # TUI executable (coming soon)
│   └── PurrfectMCP/           # MCP server executable
└── Package.swift

需求

  • macOS 14.0+
  • Swift 6.0+
  • Clawdbot网关正在运行(默认值: ws://localhost:3030/gateway)

网关协议

Purrfect使用WebSocket协议v3连接到Clawdbot网关。不需要对Clawdbot进行任何更改,它是一个纯客户端实现。

关键网关方法:

  • connect -验证并建立会话
  • agent -向AI代理发送消息
  • chat.send -发送聊天消息
  • chat.history -检索聊天记录
  • status -获取网关状态
  • channels.status -获取消息通道状态

发展

构建:

swift build

运行测试:

swift test

运行CLI:

swift run purrfect ask "Hello"

运行MCP服务器:

swift run purrfect-mcp

路线图

  • \[x\] CLI界面
  • \[x\] MCP服务器集成
  • \[\]带标签的TUI界面
  • \[\]会话管理UI
  • \[\]实时事件流
  • \[\]本地缓存
  • \[\]离线模式

许可证

麻省理工学院

学分

灵感来自 法定人数 建筑。 专为 克劳德博特.

目录标签

目录标签

Swift命令行工具Claude本地部署终端用户界面WebSocket客户端Swift开发AI网关集成

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

token

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明token部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP