mcpField
R
regennexus-mcp

regennexus-mcp

本地服务
github.com/ReGenNow其他042 周前更新

关于 regennexus-mcp

regennexus-mcp 将 RegenNexus UAP 的硬件能力接入 AI 客户端,供其操作实体设备。它支持本地或基于 HTTP 的远程连接,并可自动发现已安装的 RegenNexus 和网状网络节点。

主要功能

  1. 01控制 GPIO、PWM 和传感器
  2. 02操作机械臂与夹爪
  3. 03串行和 I2C 通信
  4. 04拍摄图像并查询设备详情
  5. 05发现网状节点并发送消息
  6. 06本地、远程和自动模式

适用场景

  1. 01读取传感器并设置 GPIO 引脚
  2. 02移动机械臂或操作夹爪
  3. 03用摄像头拍摄图像
  4. 04发现网状节点并发送命令

MCP 相关

该 MCP 服务将 RegenNexus 硬件与网状网络功能作为工具开放给 MCP 客户端,包括 GPIO、机器人、传感器、摄像头和节点通信。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"regennow-regennexus": {
"command": "uvx",
"args": [
"regennexus-mcp"
],
"env": {
"REGENNEXUS_MODE": "<REGENNEXUS_MODE>"
}
}
}
}
启动命令uvx regennexus-mcp
需要配置的环境变量
REGENNEXUS_MODEConnection mode: auto, local, or remote

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
pypiregennexus-mcp0.1.1

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

RegenNexus MCP 服务

RegenNexus 徽标

RegenNexus UAP 的 MCP(Model Context Protocol)服务适配器,可实现由 AI 控制硬件。

此软件包将 RegenNexus 硬件功能作为 MCP 工具提供,使 Claude Code、Claude Desktop 和其他兼容 MCP 的 AI 客户端能够控制物理设备。

功能

  • 硬件控制:GPIO、PWM、机械臂、传感器、摄像头
  • 网状网络:通过 LAN(UDP/WebSocket)发现节点并与之通信
  • 串口/I2C:与微控制器和传感器通信
  • 两种连接模式:本地(直接导入)或远程(HTTP API)
  • 自动发现:自动检测已安装的 RegenNexus 和网状网络节点
  • 兼容 MCP:适用于 Claude、Codex、Gemini 以及任何 MCP 客户端

安装

# MCP server only (for remote UAP connection)
pip install regennexus-mcp

# With local UAP support
pip install regennexus-mcp[local]

# With remote API support
pip install regennexus-mcp[remote]

# Everything
pip install regennexus-mcp[all]

快速开始

1. 配置 Claude Code

将以下内容添加到 Claude Code MCP 设置中:

{
  "mcpServers": {
    "regennexus": {
      "command": "regennexus-mcp"
    }
  }
}
2. 与 Claude 搭配使用

完成配置后,Claude 可以控制硬件:

User: "List all connected devices"
Claude: [calls list_devices tool]

User: "Turn on GPIO pin 18"
Claude: [calls gpio_write with pin=18, value=1]

User: "Move the robot arm to position [0, 45, -30, 0, 60, 0, 0]"
Claude: [calls robot_arm_move with positions]

配置

通过环境变量进行配置:

# Connection mode: auto, local, or remote
REGENNEXUS_MODE=auto

# Remote mode settings
REGENNEXUS_ENDPOINT=https://your-uap-server.com
REGENNEXUS_API_KEY=your-api-key

# Local mode settings
REGENNEXUS_CONFIG=/path/to/regennexus-config.yaml

# Logging
REGENNEXUS_LOG_LEVEL=INFO
配置含环境变量的 Claude Code
{
  "mcpServers": {
    "regennexus": {
      "command": "regennexus-mcp",
      "env": {
        "REGENNEXUS_MODE": "local",
        "REGENNEXUS_LOG_LEVEL": "DEBUG"
      }
    }
  }
}

可用工具(免费版)

这些工具由 regennexus 软件包提供(开源):

GPIO 和基本 I/O
工具描述
gpio_write将 GPIO 引脚设为 HIGH(1)或 LOW(0)
gpio_read读取 GPIO 引脚的当前状态
pwm_write为电机、LED、舵机设置 PWM 占空比(0-100%)
传感器和 I2C
工具描述
read_sensor读取传感器数值(温度、湿度等)
i2c_scan扫描 I2C 总线上的已连接设备
串口通信
工具描述
serial_send通过串口(UART)发送数据
serial_read从串口读取数据
机器人
工具描述
robot_arm_move将机械臂移动到指定关节位置
gripper_control打开或关闭机器人夹爪
设备管理
工具描述
list_devices列出所有已连接的硬件设备
device_info获取设备详情(CPU、内存、IP、温度)
摄像头
工具描述
camera_capture使用摄像头拍摄单张图像
网状网络
工具描述
list_nodes列出网状网络中的所有节点
ping_nodePing 节点并测量网络延迟
send_to_node向指定节点发送消息/命令
broadcast_message向所有节点广播消息
find_by_capability查找具备特定功能的节点

另有提供更多功能的高级工具可供单独使用。

连接模式

本地模式(推荐)

需要在同一台机器上安装 regennexus 软件包。直接导入 UAP 模块,以尽可能降低延迟。无需 API 服务端。

pip install regennexus-mcp[local]
REGENNEXUS_MODE=local regennexus-mcp

这是大多数用户的推荐模式。

远程模式(高级)

通过 HTTP API 连接到作为服务运行的 UAP 实例。需要运行 UAP API 服务端(regen server)。

# On the UAP server machine:
regen server --port 8080

# On the Claude Code machine:
pip install regennexus-mcp[remote]
REGENNEXUS_MODE=remote \
REGENNEXUS_ENDPOINT=http://uap-server:8080 \
regennexus-mcp
自动模式(默认)

优先尝试本地模式;如果未安装 UAP,则回退到远程模式。

regennexus-mcp  # Auto-detects best mode

独立运行

# Run MCP server
regennexus-mcp

# Or via Python
python -m regennexus_mcp

架构

Claude Code (MCP Client)
        │
        ▼
regennexus-mcp (This Package)
        │
        ├── Local Mode: Direct import
        │       │
        │       ▼
        │   regennexus (UAP)
        │
        └── Remote Mode: HTTP API
                │
                ▼
            UAP Service

开发

# Clone
git clone https://github.com/regennow/regennexus-mcp
cd regennexus-mcp

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black src/
ruff check src/

相关项目

许可证

MIT 许可证

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。