返回 MCP 目录
public公开dns本地运行

regennexus

RegenNexus UAP是一个通用适配器协议,用于连接设备、机器人、应用和AI代理,提供低延迟、高安全性的通信,支持多种硬件和MCP集成。

article

README

🚀 RegenNexus UAP

通用适配器协议 - 以极低的延迟和极高的安全性连接设备、机器人、应用程序和 AI 代理。与 MCP 兼容,可实现无缝的 AI 集成。

ReGenNexus Logo

🚀 快速开始

以下是一个简单的 Python 代码示例,展示了如何使用 RegenNexusProtocol:

import asyncio
from regennexus import RegenNexusProtocol

async def main():
    protocol = RegenNexusProtocol()
    await protocol.initialize()

    # Register entities
    await protocol.registry.register_entity(
        entity_id="sensor_01",
        entity_type="device",
        capabilities=["temperature", "humidity"]
    )

    # Send messages
    await protocol.send_message(
        sender="controller",
        recipient="sensor_01",
        intent="read",
        payload={"sensors": ["temperature"]}
    )

    await protocol.shutdown()

asyncio.run(main())

✨ 主要特性

设备支持

  • 树莓派(Raspberry Pi) - GPIO、PWM、摄像头、传感器
  • Arduino - 数字/模拟输入输出、串口命令
  • NVIDIA Jetson - GPU、CUDA、摄像头、推理
  • 物联网设备(IoT Devices) - MQTT、HTTP、CoAP 协议

机械臂支持

  • Amber B1 - 7 自由度控制、夹爪、轨迹规划
  • Lucid One - 笛卡尔坐标控制、力传感、示教模式
from regennexus.plugins import get_amber_b1_plugin

AmberB1 = get_amber_b1_plugin()
arm = AmberB1(entity_id="arm_001", mock_mode=True)
await arm.initialize()

# Move joints
await arm.move_to([0, 45, -30, 0, 90, 0, 0], duration=2.0)

# Gripper control
await arm.open_gripper()
await arm.close_gripper(force=15.0)

传输层

| 传输方式 | 延迟 | 使用场景 | |-----------|---------|----------| | IPC | < 0.1ms | 本地进程 | | UDP 组播 | 1 - 5ms | 局域网发现 | | WebSocket | 10 - 50ms | 远程/互联网 | | 消息队列 | 可变 | 可靠传输 |

安全性

  • 加密:AES - 128/256 - GCM
  • 密钥交换:ECDH - 384
  • 认证:令牌、API 密钥
  • 速率限制:自适应限流

AI 集成(MCP)

可直接从 Claude Desktop 或任何与 MCP 兼容的 AI 控制硬件:

# 启动用于 Claude Desktop 的 MCP 服务器
python -m regennexus.mcp_server

claude_desktop_config.json 中进行配置:

{
    "mcpServers": {
        "regennexus": {
            "command": "python",
            "args": ["-m", "regennexus.mcp_server"]
        }
    }
}

现在可以向 Claude 提问:

  • "将机械臂移动到拾取位置"
  • "打开 GPIO 引脚 17"
  • "温度传感器的读数是多少?"

大语言模型桥接(Ollama、LM Studio)

将本地大语言模型连接到硬件:

from regennexus.bridges import LLMBridge, LLMConfig

llm = LLMBridge(LLMConfig(provider="ollama", model="llama3"))
response = await llm.chat("打开灯光")

网状网络

在网络中的设备间实现自动发现:

from regennexus.core import MeshNetwork, MeshConfig

mesh = MeshNetwork(MeshConfig(
    node_id="controller",
    capabilities=["command"]
))
await mesh.start()

# 设备自动发现
for peer in mesh.get_peers():
    print(f"发现: {peer.node_id} ({peer.capabilities})")

💻 使用示例

基础用法

import asyncio
from regennexus import RegenNexusProtocol

async def main():
    protocol = RegenNexusProtocol()
    await protocol.initialize()

    # Register entities
    await protocol.registry.register_entity(
        entity_id="sensor_01",
        entity_type="device",
        capabilities=["temperature", "humidity"]
    )

    # Send messages
    await protocol.send_message(
        sender="controller",
        recipient="sensor_01",
        intent="read",
        payload={"sensors": ["temperature"]}
    )

    await protocol.shutdown()

asyncio.run(main())

高级用法

from regennexus.plugins import get_amber_b1_plugin

AmberB1 = get_amber_b1_plugin()
arm = AmberB1(entity_id="arm_001", mock_mode=True)
await arm.initialize()

# Move joints
await arm.move_to([0, 45, -30, 0, 90, 0, 0], duration=2.0)

# Gripper control
await arm.open_gripper()
await arm.close_gripper(force=15.0)

📦 安装指南

pip install regennexus

或者安装包含所有功能的版本:

pip install regennexus[full]

📚 详细文档

交互式演示

可以在 Google Colab 中尝试 RegenNexus:

CLI 使用方法

# 启动服务器
regen server --host 0.0.0.0 --port 8080

# 运行示例
regen run examples/robotic_arms/arm_demo.py

# 查看版本信息
regen version

可选依赖

pip install regennexus[api]        # FastAPI 服务器
pip install regennexus[mqtt]       # MQTT 支持
pip install regennexus[robotics]   # 机械臂支持
pip install regennexus[arduino]    # Arduino 支持
pip install regennexus[dev]        # 开发工具

示例代码结构

examples/
├── simple_connection/    # 基本协议使用
├── mcp_integration/      # Claude Desktop 与大语言模型演示
├── mesh_network/         # 设备自动发现
├── llm_integration/      # Ollama/LM Studio 演示
├── robotic_arms/         # Amber B1 与 Lucid One 演示
├── ros_integration/      # ROS 2 桥接示例
├── security/             # 加密与认证
└── binder/               # Jupyter 笔记本

Docker 部署

docker-compose up

详情请参阅 Docker 部署

贡献代码

我们欢迎贡献!请参阅 CONTRIBUTING.md 了解贡献指南。

📄 许可证

本项目采用 MIT 许可证 - 详情请参阅 LICENSE


RegenNexus UAP - 安全地连接一切。

版权所有 (c) 2024 - 2025 ReGen Designs LLC

help

运行方式说明

cloud

托管运行

托管运行通常表示这个 MCP Server 由服务方环境承载,用户一般按页面提供的连接方式或授权流程接入,不需要在本地长期启动一个 MCP 进程

  1. 打开服务方连接页
  2. 完成授权或复制端点
  3. 在 MCP 客户端中连接
terminal

本地运行 / 其它方式

本地运行通常需要用户在自己的电脑或服务器上安装依赖,把 server_config 复制到 MCP 客户端,并按 env_schema 补齐环境变量、密钥或其它配置

  1. 复制 server_config
  2. 安装所需依赖
  3. 补齐环境变量后重启客户端