Skip to main content
Glama
chiefautism

mcp-buttplug

by chiefautism

一个 MCP 服务器,用于将 Claude Code(或任何 MCP 客户端)连接到 buttplug.io —— 开源的亲密硬件控制库。Claude 可以获得实时发现、控制和编排触觉设备的工具。

现已支持游戏手柄。 Xbox、PlayStation 和 Switch 控制器在 macOS、Windows 和 Linux 上均可作为振动设备使用 —— 由我们的 SDL2 分支 intiface-engine 提供支持。

LLM 决定你的感受,以及何时感受。

工作原理

Claude Code <-> MCP (stdio) <-> buttplug-mcp <-> WebSocket <-> intiface-engine <-> SDL2/BLE/USB <-> Device

当你调用 connect 时,buttplug-mcp 会自动启动我们分叉的 intiface-engine。无需安装或运行单独的服务器。该引擎处理:

  • 游戏手柄 (Xbox/PS/Switch) 通过 SDL2 —— 跨平台震动

  • 蓝牙低功耗 (BLE) 玩具 (Lovense, We-Vibe 等) 通过 btleplug

  • USB/串口设备 通过平台驱动程序

Related MCP server: jlbloomer-mcp-server

入门指南

先决条件

安装

# Install Bun if you don't have it
curl -fsSL https://bun.sh/install | bash

# Install Rust if you don't have it
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Install cmake
# macOS: brew install cmake
# Ubuntu: sudo apt install cmake
# Windows: choco install cmake

# Clone and install
git clone https://github.com/chiefautism/buttplug-mcp.git
cd buttplug-mcp
bun install

bun install 将自动克隆我们的 buttplug 分支 并使用 SDL2 游戏手柄支持构建 intiface-engine。首次安装大约需要 2 分钟。

添加到 Claude Code

创建或编辑 ~/.claude/.mcp.json:

{
  "mcpServers": {
    "buttplug": {
      "command": "bun",
      "args": ["/absolute/path/to/buttplug-mcp/index.ts"]
    }
  }
}

开始使用

重启 Claude Code。工具将立即生效。

you: connect and scan for devices

claude: [calls connect] -> [calls scan]
        Connected. Found your Xbox Wireless Controller.

游戏手柄设置

通过 蓝牙 连接你的控制器(不要使用 USB —— macOS 不支持 USB 震动):

  1. 按住 Xbox/PS 按钮直到它闪烁

  2. 按下配对按钮(Xbox 上 USB 端口附近的小按钮)

  3. 进入系统设置 → 蓝牙 → 连接

  4. 在 Claude Code 中:connect → scan → 你的控制器会出现

工具

工具

描述

connect

连接到 Intiface Engine(如果需要会自动启动)

scan

发现设备(游戏手柄、蓝牙、USB)

devices

列出已连接的设备

vibrate

以 0.0-1.0 的强度振动,可选自动停止计时器

rotate

以 0.0-1.0 的速度旋转

oscillate

以 0.0-1.0 的强度摆动

linear

在持续时间内移动到指定位置(活塞类设备)

pulse

模式化脉冲 —— 次数、开/关时间、强度

wave

在一段时间内平滑地在两个强度之间切换

stop

停止一个或所有设备

battery

读取设备电池电量

disconnect

断开连接并停止引擎

使用方法

连接后,直接与 Claude 对话即可。它拥有这些工具 —— 它会自己搞定。

you: give me a gentle pulse

claude: [calls vibrate(intensity=0.3)] -> [calls pulse(count=3)]
        Sent 3 gentle pulses to your Xbox controller.
you: slowly ramp up over 10 seconds then stop

claude: [calls wave(from=0, to=0.8, duration_ms=10000)]
        [calls stop]

所有设备参数(强度、速度、位置)均归一化为 0.0-1.0。Claude 会处理映射。

架构

该项目由两个仓库组成:

buttplug-mcp (本仓库)

使用 TypeScript/Bun 编写的 MCP 服务器。轻量级 WebSocket 客户端,直接使用 buttplug v3 协议(设备控制无需 npm 依赖)。自动启动 intiface-engine。

chiefautism/buttplug (分支)

buttplugio/buttplug 的分支,包含一个新 crate:buttplug_server_hwmgr_sdl_gamepad。通过 SDL2 添加了跨平台游戏手柄震动支持。Xbox/PS/Switch 控制器将显示为标准的 buttplug 设备。

支持的设备

游戏手柄 (通过 SDL2)

任何 SDL2 支持震动的控制器:Xbox Series X/S、Xbox One、DualShock 4、DualSense、Switch Pro Controller 等。通过蓝牙连接。

亲密硬件 (通过 buttplug.io)

来自 30 多个品牌的 750 多种设备。buttplug.io 生态系统 中的任何设备均可使用。

品牌

设备

连接方式

Lovense

Lush, Hush, Edge, Nora, Max, Osci, Domi 等

蓝牙 LE

We-Vibe

Sync, Melt, Vector, Nova, Chorus, Wish

蓝牙 LE

Kiiroo

Onyx+, Keon, FeelConnect, Titan

蓝牙 LE

Satisfyer

Curvy, Love Triangle, Sexy Secret

蓝牙 LE

The Handy

The Handy

Wi-Fi / API

Magic Motion

Flamingo, Awaken, Equinox

蓝牙 LE

Lelo

F1s, Hugo, Tiani

蓝牙 LE

TCode

OSR-2, SR-6, DIY 设备

串口 / USB

完整可搜索数据库:iostindex.com

为什么做这个

我看到 TikTok 上的女孩们在和 AI 聊天机器人玩。只有文字。没有触觉。只有氛围和想象力。

我想 —— 如果聊天机器人真的能“触碰”你呢?MCP 为 LLM 提供了工具使用能力。Buttplug.io 提供了软件设备控制。这把它们粘合在了一起。现在 AI 不仅仅是说话。它在行动。

硬件已经在抽屉里了。这只是软件而已。

许可证

BSD-3-Clause

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A flexible server that enables communication between AI models and tools, supporting multiple MCP servers and compatible with Claude, MCP Dockmaster, and other MCP clients.
    42 npm
    1
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    A personal MCP server for AI assistant integration that provides custom tools, resources, and prompts for use with Claude Desktop and other MCP-compatible clients.
    2
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables Claude Desktop to interact with Discord through a dedicated bot. It allows users to list channels, read message history, and send messages directly from the AI interface.
    2
    -
  • A
    license
    Not graded
    quality
    F
    maintenance
    An MCP server that lets Claude control a Minecraft bot with 40+ actions including movement, combat, crafting, and inventory management. Built on Mineflayer, it supports Microsoft authentication, pathfinding, and auto-reconnect.
    3
    MIT