buttplug.io mcp服务器
*|插入人工智能生成的机器人做坏事的垃圾图像|*
LLM|=> - - (__(__)
设置后,您可以提示您的LLM:
- “我的连接插头设备是什么?”
- “将LELO F1S上的第二个电机设置为50%的强度”
- “我的Lovense Max 2还剩多少电池?”
- “我的WeWibe信号弱吗?”
注:以上是有抱负的,实际上是 当前经验 不稳定,令人沮丧。
它支持以下资源和工具:
| 资源 | 描述 |
|---|---|
/devices | JSON格式的已连接Buttplug设备列表。 |
/device/{id} | 按设备ID列出的设备信息,其中id 是一个数字 /devices |
/device/{id}/rssi | 按设备ID划分的RSSI信号电平,其中 id 是一个数字 /devices |
/device/{id}/battery | 按设备ID显示的电池电量 id 是一个数字 /devices |
| 工具 | 参数 | 描述 |
|---|---|---|
device_vibrate | id, motor, strength | 通过以下方式振动设备 id,选择 strength 可选 motor |
JSON Schema for Resources. Click to expand
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"resources": [
{
"uri": "devices",
"name": "Device List",
"description": "List of connected Buttplug devices in JSON",
"mimeType": "application/json"
}
]
}
}JSON Schema for Tools. Click to expand
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"tools": [
{
"description": "Vibrates device by `id`, selecting `strength` and optional `motor`",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"description": "Device ID to query, sourced from `/devices`",
"pattern": "^[0-9]*$",
"type": "number"
},
"motor": {
"description": "Motor number to vibrate, defaults to 0",
"pattern": "^[0-9]*$",
"type": "number"
},
"strength": {
"description": "Strength from 0.0 to 1.0, with 0.0 being off and 1.0 being full",
"pattern": "^(0(\\.\\d+)?|1(\\.0+)?)$",
"type": "number"
}
},
"required": [
"id",
"strength"
]
},
"name": "device_vibrate"
}
]
}
}当前状态
我在创建了另一个实验性的MCP服务后,于2025年4月1日愚人节开始着手这项工作, dbn-go 金融市场数据,前一天。所以这是新鲜的肉,是一个快速、有趣的教育项目。
虽然它确实有效,但我发现了其背后的原因 go-buttplug 图书馆 在连接处理中不稳定。我可以向Claude索要我的设备,但即使只有Intiface Central,我的特定设备也不会振动——就像在只读模式下一样!我也希望我有一个虚拟的buttplug.io设备进行测试,而不是依赖于物理设备。
因此,它还没有真正经过“端到端”的测试:wink:
我会深入了解 go-buttplug 库,看看为什么连接不稳定。我还需要了解MCP主机的MCP协议当前状态——它们似乎更关注工具而不是资源和资源模板。
安装二进制文件
适用于多个平台的二进制文件 通过 .
brew tap conacademy/homebrew-tap
brew install conacademy/tap/buttplug-mcp用法
下载 银泰中心 hub应用程序来管理您的设备。启动它并记下服务器端口(默认值似乎是 12345).
要使用此 buttplug-mcp MCP服务器,您必须配置主机程序才能使用它。我们将用 克劳德桌面我们必须找到 buttplug-mcp 我们系统上的程序;下面的示例显示了 buttplug-mcp 与MacOS Homebrew一起安装(也许可以自己构建并指向)。
下列 配置JSON 设置此项:
{
"mcpServers": {
"buttplug": {
"command": "/opt/homebrew/bin/buttplug-mcp",
"args": [
"--ws-port", "12345"
]
}
}
}使用Claude Desktop,您可以按照以下步骤操作 他们的配置教程 但替换上述配置。有了这个,你可以问克劳德问题,它将使用 buttplug-mcp 服务器。以下是示例对话:
也许你可以用 家庭助理MCP 集成将灯光调低。..
奥拉玛和 mcphost
以下是如何使用存储在中的上述配置安装和运行它 mcp.json:
$ go install github.com/mark3labs/mcphost@latest
$ mcphost -m ollama:llama3.3 --config mcp.json
...chat away...似乎只支持“工具”,不支持“资源”,所以我无法枚举和反思我的设备。但我有这个工具交互(但如前所述 上方,我的设备实际上没有振动):
$ mcphost -m ollama:phi4-mini --config mcp.json
2025/04/02 09:25:05 INFO Model loaded provider=ollama model=phi4-mini
2025/04/02 09:25:05 INFO Initializing server... name=buttplug
2025/04/02 09:25:05 INFO Server connected name=buttplug
2025/04/02 09:25:05 INFO Tools loaded server=buttplug count=1
2025/04/02 09:28:31 INFO Model loaded provider=ollama model=phi4-mini
2025/04/02 09:28:31 INFO Initializing server... name=buttplug
2025/04/02 09:28:31 INFO Server connected name=buttplug
2025/04/02 09:28:31 INFO Tools loaded server=buttplug count=1
/servers
# buttplug
Command /opt/homebrew/bin/buttplug-mcp
Arguments --ws-port 12345
/tools
• buttplug
• device_vibrate
• Vibrates device by ID, selecting strength and optional motor
You: buttplug device_vibrate id 0 at strength 1
Assistant:
[start_processing]
[{"type":"function","function":{"name":"buttplug__device_vibrate","description":"Vibrates device by ID, selecting strength and optional
motor","parameters":{"id":0,"strength":1}}]
{}
{"status":"success","message":"Device with id 0 is vibrating at full strength."}建筑
建筑是通过以下方式进行的 任务,二进制文件可在 bin/buttplug-mcp.
$ task
task: [tidy] go mod tidy
task: [build] go build -o bin/buttplug-mcp cmd/buttplug-mcp/main.go有用的测试工具:
task stdio-schema | jq--打印JSON模式npx @modelcontextprotocol/inspector node build/index.js-- MCP检查器Web GUI
CLI参数
R buttplug-mcp --help
usage: buttplug-mcp [opts]
-h, --help Show help
-l, --log-file string Log file destination (or MCP_LOG_FILE envvar). Default is stderr
-j, --log-json Log in JSON (default is plaintext)
--sse Use SSE Transport (default is STDIO transport)
--sse-host string host:port to listen to SSE connections
-v, --verbose Verbose logging
--ws-port int port to connect to the Buttplug Websocket server贡献与行为
与ConAcademy的所有项目一样,我们欢迎提交pull请求。或者用叉子叉,你自己动手。
无论哪种方式,遵守我们的 行为准则要遮遮掩掩,但不要做混蛋。
学分和许可证
版权所有(c)2025 Neomantra BV。由Evan Wies为 ConAcademy 的.
根据 MIT许可证,请参阅 LICENSE.txt.

