agentic-robotics-mcp
Control robots with AI assistants using the Model Context Protocol
Give Claude, GPT, or any AI assistant the ability to control your robots through natural language. Part of the Agentic Robotics framework.
๐ฏ What is This?
Problem: You have a robot. You want to control it with natural language using an AI assistant like Claude.
Solution: This crate implements the Model Context Protocol (MCP), which lets AI assistants discover and use your robot's capabilities as "tools".
Example conversation:
You: "Claude, move the robot to the kitchen"
Claude: *calls move_robot tool with location="kitchen"*
Robot: *navigates to kitchen*
Claude: "I've moved the robot to the kitchen"
๐ Quick Start (5 minutes)
Step 1: Add to your project
[]
= "0.1"
= { = "1", = ["full"] }
= "1"
Step 2: Create a simple MCP server
use *;
use json;
async
Step 3: Connect from Claude Desktop
Add to your Claude Desktop config:
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
That's it! Claude can now control your robot ๐
๐ Complete Documentation
This README provides everything you need to know. Jump to:
Or view the full docs at docs.rs/agentic-robotics-mcp
๐ค Why Use MCP for Robots?
Traditional robot control requires writing code for every possible command. With MCP, you describe what your robot can do, and AI figures out how to use those capabilities.
Before MCP
// You write code for hundreds of commands
match command
With MCP
// Just describe capabilities - AI does the rest
server.register_tool;
server.register_tool;
server.register_tool;
// AI: "go to kitchen and grab the cup"
// -> Automatically calls: move_robot("kitchen"), grab_object("cup")
Benefits:
- โ Natural language - Control robots by talking naturally
- โ Flexible - AI combines tools in creative, unexpected ways
- โ Simple - Just describe capabilities, don't write parsers
- โ Standard - Works with Claude, GPT, and all MCP-compatible AIs
- โ Discoverable - AI learns what your robot can do automatically
๐ Complete Tutorial
Let's build complete robot control systems step by step.
Example 1: Navigation Robot (Beginner)
use *;
use json;
async
What Claude can do:
- "Move to the kitchen" โ
move_to(location="kitchen") - "Where are you?" โ
get_status() - "Stop immediately!" โ
emergency_stop()
Example 2: Vision Robot with Images (Intermediate)
use *;
use json;
async
What Claude can do:
- "What do you see?" โ Shows detected objects
- "Take a picture" โ Returns photo to Claude (shown to user)
- "Is there a cup nearby?" โ Combines detection + reasoning
Example 3: Robotic Arm (Advanced)
use *;
use Node; // Connect to your robot
use json;
async
What Claude can do:
- "Pick up the red block at position (0.5, 0.3, 0.1)" โ Precise control
- "Place it on the table" โ Predefined locations
- "Move the cup from the counter to the shelf" โ Multi-step tasks
๐ Real-World Use Cases
Use Case 1: Warehouse Robot
// Tools: navigate_to, scan_barcode, pick_item, place_item, get_battery
// Claude conversation:
// "Go to aisle 5, scan the items, and bring any with low stock to the depot"
// -> Robot autonomously: navigates, scans, identifies low stock, picks, delivers
Use Case 2: Home Assistant Robot
// Tools: navigate, detect_objects, vacuum_area, water_plants, take_photo
// Claude:
// "Clean the living room and water any plants that look dry"
// -> Navigates, identifies plants, checks moisture, waters as needed
Use Case 3: Research Laboratory Robot
// Tools: move_to_station, pipette_liquid, centrifuge, analyze_sample
// Claude:
// "Prepare 10 samples for PCR analysis"
// -> Executes lab protocol automatically
Use Case 4: Security Patrol Robot
// Tools: patrol_route, detect_anomalies, take_photo, sound_alarm
// Claude:
// "Patrol the building and alert me if you see anything unusual"
// -> Autonomous patrol with AI-powered anomaly detection
๐ง Advanced Features
Returning Images
tool
Multiple Content Items
tool
Error Handling
tool
Async Operations
tool
๐ Supported Transports
STDIO (Local AI Assistants)
For Claude Desktop, VS Code extensions, command-line tools:
let transport = new;
transport.run.await?;
SSE (Remote Web Access)
For web dashboards, mobile apps, remote control:
// Coming soon
use sse;
run_sse_server.await?;
๐ ๏ธ Configuration Examples
Claude Desktop Config
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Reading Environment Variables
use env;
let robot_id = var.unwrap_or;
let robot_host = var.unwrap_or;
๐ Troubleshooting
Server doesn't appear in Claude
Check:
- Config file path is correct for your OS
- Binary is executable:
chmod +x /path/to/mcp-server - Binary runs standalone:
./mcp-server(should wait for input) - Check Claude logs:
- Mac:
~/Library/Logs/Claude/mcp-server-*.log - Windows:
%APPDATA%\Claude\logs\ - Linux:
~/.local/state/Claude/logs/
- Mac:
Tools aren't being called
Solutions:
- Make tool descriptions very clear and specific
- Verify
input_schemamatches what AI sends - Add logging:
eprintln!("Tool {} called with: {:?}", name, args); - Test with simple tools first
Connection errors
// Add error handling
match transport.run.await
Debug Mode
// Enable debug output
init;
// Or manual logging
eprintln!;
eprintln!;
๐ Examples
Complete working examples in the repository:
mcp-navigation.rs- Navigation robot with MCPmcp-vision.rs- Computer vision integrationmcp-arm.rs- Robotic arm controlmcp-swarm.rs- Multi-robot coordination
Run them:
๐งช Testing
async
๐ Links
- MCP Spec: modelcontextprotocol.io
- Claude Desktop: claude.ai/download
- Homepage: ruv.io
- Docs: docs.rs/agentic-robotics-mcp
- Repository: github.com/ruvnet/vibecast
- Examples: github.com/ruvnet/vibecast/tree/main/examples
๐ค Contributing
Ideas for contributions:
- More example robots
- WebSocket transport
- Async tool handlers
- Tool composition
- Better error messages
- Performance optimizations
๐ License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Make robots accessible through natural language ๐ค
Part of the Agentic Robotics framework - Making robotics faster, safer, and more accessible
Quick Start ยท Tutorial ยท Examples ยท Troubleshooting
MCP 2025-11 Compliant โข STDIO & SSE Transport โข Production Ready