NWO Robotics
NWO Robotics MCP 服务器 v2.0
完整的 NWO Robotics API 模型上下文协议 (MCP) 服务器,集成了 77 个工具,涵盖 SLAM、强化学习、高级传感器和全机器人系统控制。
📋 概述
此 MCP 服务器通过统一接口提供对所有 NWO Robotics API 端点的全面访问,包含按优先级和功能组织的 77 个工具。
✨ 主要功能
77 个集成工具 - 完整的 API 覆盖
SLAM 与定位 - 持久化机器人建图与导航
强化学习 - 云端 RL 训练 (PPO, SAC, DDPG, TD3)
高级传感器 - 热成像、毫米波、气体、声学、磁力传感器
视觉与定位 - 开放词汇对象检测
触觉传感 - ORCA Hand 576-taxel 反馈
运动规划 - 集成 MoveIt2 并具备避障功能
任务规划 - 基于行为树的分层任务执行
ROS2 集成 - 用于真实机器人(UR5e, Panda, Spot)的云桥
安全监控 - 实时安全验证与紧急停止
MQTT 物联网 - 支持 1000+ 智能体及边缘计算
自主智能体 - 自主注册与基于 ETH 的支付
🚀 快速开始
1. 克隆仓库
git clone https://github.com/RedCiprianPater/mcp-server-robotics.git
cd mcp-server-robotics2. 安装依赖
npm install3. 设置环境
cp .env.example .env
# Edit .env and add your NWO_API_KEY
nano .env4. 构建与运行
npm run build
npm start5. 测试运行
# The server will start and display available tools
# You can now use any of the 77 tools through Claude📦 包含内容
文件
src/index.ts - 完整的 MCP 服务器实现(77 个工具)
package.json - 依赖项与构建脚本
tsconfig.json - TypeScript 配置
Dockerfile - 容器部署
docker-compose.yml - 包含 MQTT 代理的完整堆栈
.env.example - 环境变量模板
INTEGRATION_GUIDE.md - 详细集成指南
README.md - 本文件
工具类别
优先级 1 - 独特功能 (5 个工具)
✅ nwo_initialize_slam - Persistent robot mapping
✅ nwo_localize - Landmark-based localization
✅ nwo_create_rl_env - Cloud RL training environments
✅ nwo_train_policy - Policy training (SB3)
✅ nwo_detect_objects_grounding - Open-vocabulary detection优先级 2 - 新型传感器 (5 个工具)
✅ nwo_query_thermal - Heat detection
✅ nwo_query_mmwave - Millimeter-wave radar
✅ nwo_query_gas - Air quality sensors
✅ nwo_query_acoustic - Sound localization
✅ nwo_query_magnetic - Metal detection优先级 3 - 高级功能 (4 个工具)
✅ nwo_read_tactile - ORCA Hand 576 taxels
✅ nwo_identify_material - Material recognition
✅ nwo_plan_motion - MoveIt2 motion planning
✅ nwo_execute_behavior_tree - Hierarchical task execution标准操作 (58 个工具)
Inference & Models (6) Robot Control (3)
Task Planning & Learning (4) Agent Management (3)
Voice & Gesture (2) Simulation & Physics (3)
ROS2 & Hardware (3) MQTT & IoT (2)
Safety & Monitoring (3) Embodiment & Calibration (3)
Autonomous Agents (4) Dataset & Export (2)
Demo & Testing (2)🔧 配置
API 密钥
从 https://nwo.capital/webapp/api-key.php 获取您的免费 API 密钥
export NWO_API_KEY="sk_live_your_key_here"API 端点
# Standard API (full features)
NWO_API_BASE=https://nwo.capital/webapp
# Edge API (ultra-low latency, 200+ locations)
NWO_EDGE_API=https://nwo-robotics-api-edge.ciprianpater.workers.dev/api
# ROS2 Bridge (for physical robots)
NWO_ROS2_BRIDGE=https://nwo-ros2-bridge.onrender.com
# MQTT Broker (IoT sensors)
MQTT_BROKER=mqtt.nwo.capital
MQTT_PORT=8883📖 使用示例
示例 1:SLAM 与导航
// Initialize SLAM mapping
const slam = await client.messages.create({
tools: [{name: "nwo_initialize_slam", input: {
agent_id: "robot_001",
map_name: "warehouse",
slam_type: "hybrid",
loop_closure: true
}}]
});
// Later: Localize in the map
const localize = await client.messages.create({
tools: [{name: "nwo_localize", input: {
agent_id: "robot_001",
map_id: "map_123",
image: "base64_encoded_image"
}}]
});示例 2:基于视觉的任务
// Detect objects with natural language
const detect = await client.messages.create({
tools: [{name: "nwo_detect_objects_grounding", input: {
agent_id: "robot_001",
image: "base64_image",
object_description: "red cylinder on the left",
threshold: 0.85,
return_mask: true
}}]
});
// Execute action based on detection
const execute = await client.messages.create({
tools: [{name: "nwo_inference", input: {
instruction: "Pick up the detected object",
images: ["base64_image"]
}}]
});示例 3:复杂任务规划
// Break down high-level instruction
const plan = await client.messages.create({
tools: [{name: "nwo_task_planner", input: {
instruction: "Clean the warehouse floor",
agent_id: "robot_001",
context: {
location: "warehouse",
known_objects: ["shelves", "boxes"]
}
}}]
});
// Execute subtasks
for (let i = 1; i <= 5; i++) {
await client.messages.create({
tools: [{name: "nwo_execute_subtask", input: {
plan_id: "plan_123",
subtask_order: i,
agent_id: "robot_001"
}}]
});
}示例 4:传感器融合
const fusion = await client.messages.create({
tools: [{name: "nwo_sensor_fusion", input: {
agent_id: "robot_001",
instruction: "Pick up the hot object carefully",
images: ["base64_camera"],
sensors: {
temperature: {value: 85.5, unit: "celsius"},
proximity: {distance: 0.15, unit: "meters"},
force: {grip_pressure: 2.5},
gps: {lat: 51.5074, lng: -0.1278}
}
}}]
});示例 5:RL 策略训练
// Create RL environment
const env = await client.messages.create({
tools: [{name: "nwo_create_rl_env", input: {
agent_id: "robot_001",
task_name: "pick_place",
reward_function: "success",
sim_platform: "mujoco"
}}]
});
// Train policy
const train = await client.messages.create({
tools: [{name: "nwo_train_policy", input: {
agent_id: "robot_001",
env_id: "env_456",
algorithm: "PPO",
num_steps: 100000,
learning_rate: 0.0003
}}]
});📊 性能指标
操作 | 延迟 | 备注 |
标准推理 | 100-120ms | 欧盟数据中心 |
边缘推理 | 25-50ms | 全球 200+ 地点 |
SLAM 初始化 | 200-500ms | 取决于图像质量 |
SLAM 定位 | 100-300ms | 在现有地图中 |
RL 训练 (每步) | 50-100ms | MuJoCo 仿真 |
任务规划 | 500-1000ms | 复杂分解 |
传感器融合 | 150-300ms | 多传感器处理 |
紧急停止 | <10ms | 保证响应 |
🐳 Docker 部署
简单 Docker 运行
docker build -t mcp-nwo-robotics .
docker run -e NWO_API_KEY=sk_xxx mcp-nwo-roboticsDocker Compose (推荐)
# Start full stack with MQTT broker
docker-compose up -d
# View logs
docker-compose logs -f mcp-nwo-robotics
# Stop
docker-compose down生产环境部署
# Build for production
docker build -t mcp-nwo-robotics:prod .
# Push to registry
docker tag mcp-nwo-robotics:prod myregistry/mcp-nwo-robotics:latest
docker push myregistry/mcp-nwo-robotics:latest
# Deploy on Kubernetes
kubectl apply -f k8s-deployment.yaml🔐 安全性
API 密钥管理
# Never commit API keys
echo "NWO_API_KEY=*" >> .gitignore
echo ".env" >> .gitignore
# Use environment variables or .env (in .gitignore)速率限制
免费层级: 100,000 次调用/月
原型层级: 500,000 次调用/月 (~16,666/天)
生产层级: 无限调用
监控使用情况:
const balance = await client.messages.create({
tools: [{name: "nwo_agent_check_balance", input: {
agent_id: "agent_123"
}}]
});安全功能
实时碰撞检测
人员接近警告(默认 1.5 米)
紧急停止(<10ms 响应)
力/扭矩限制执行
合规性审计日志
🧪 测试
运行测试
npm test
npm run test:watch测试单个工具
# Test SLAM
npm run dev -- --test nwo_initialize_slam
# Test inference
npm run dev -- --test nwo_inference
# Test sensor fusion
npm run dev -- --test nwo_sensor_fusion📚 文档
GitHub: https://github.com/RedCiprianPater/mcp-server-robotics
白皮书: https://www.researchgate.net/publication/401902987_NWO_Robotics_API_WHITEPAPER
演示: https://huggingface.co/spaces/PUBLICAE/nwo-robotics-api-demo
🔗 集成指南
与 Claude API 集成
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const response = await client.messages.create({
model: "claude-3-5-sonnet-20241022",
max_tokens: 4096,
tools: tools, // All 77 NWO tools
messages: [{
role: "user",
content: "Initialize SLAM mapping on robot_001"
}]
});与 LangChain 集成
from langchain.chat_models import ChatAnthropic
from langchain.tools import StructuredTool
llm = ChatAnthropic(model_name="claude-3-sonnet-20240229")
tools = load_nwo_tools()
agent = initialize_agent(tools, llm, agent="tool-using-agent")与 CrewAI 集成
from crewai import Agent, Task, Crew
from nwo_tools import get_robotics_tools
tools = get_robotics_tools()
robot_agent = Agent(
role="Robot Controller",
goal="Control robots autonomously",
tools=tools
)🐛 故障排除
问题: "Invalid or missing API key"
# Solution: Check API key
echo $NWO_API_KEY
# If empty, set it:
export NWO_API_KEY="sk_your_actual_key"
# Or in .env:
NWO_API_KEY=sk_your_actual_key问题: "API error 504: Gateway Timeout"
# Solution: Use edge API for faster response
# Set: NWO_EDGE_API endpoint
# Tool: nwo_edge_inference instead of nwo_inference问题: "Collision detected"
# Solution: Validate trajectory before execution
# Use: nwo_simulate_trajectory to check collision
# Use: nwo_check_collision for detailed analysis问题: "SLAM mapping failed"
# Solution: Ensure good image quality
# - Well-lit environment
# - Distinct visual features
# - Slow movement during initialization
# - Try visual instead of hybrid SLAM📈 监控与分析
日志
# View real-time logs
npm run dev
# With custom log level
LOG_LEVEL=debug npm start
# Save to file
npm start > logs/server.log 2>&1指标
# Monitor API usage
nwo_agent_check_balance
# Export dataset for analysis
nwo_export_dataset
# Check system health
GET /health (if enabled)🎯 下一步
✅ 设置:
npm install && npm run build✅ 配置: 将
NWO_API_KEY添加到.env✅ 测试:
npm start并验证工具是否加载✅ 集成: 与 Claude API 或您的框架一起使用
✅ 部署: Docker Compose 或 Kubernetes
✅ 监控: 检查日志和使用指标
✅ 扩展: 根据需要升级层级
📞 支持
问题反馈: https://github.com/RedCiprianPater/mcp-server-robotics/issues
讨论区: https://github.com/RedCiprianPater/mcp-server-robotics/discussions
API 密钥帮助: https://nwo.capital/webapp/api-key.php
📝 版本历史
v2.0.0 (当前 - 2026 年 4 月)
✅ 实现总计 77 个工具
✅ 优先级 1: SLAM, RL, 定位 (5)
✅ 优先级 2: 高级传感器 (5)
✅ 优先级 3: 高级功能 (4)
✅ 标准操作 (58)
✅ 完整的 TypeScript 支持
✅ 支持 Docker 和 Kubernetes
✅ 生产级错误处理
✅ 全面测试覆盖
v1.0.0 (之前)
基础工具集 (20 个工具)
仅标准推理
手动配置
📄 许可证
MIT 许可证 - 详情请参阅 LICENSE 文件
🙏 致谢
NWO Robotics - API 与基础设施
Anthropic - Claude 与 MCP 协议
开源社区 - 贡献与反馈
最后更新: 2026 年 4 月 状态: ✅ 生产就绪 维护者: @RedCiprianPater
⭐ 如果您觉得有用,请给仓库加星!
🔗 相关项目
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/RedCiprianPater/mcp-server-robotics'
If you have feedback or need assistance with the MCP directory API, please join our Discord server