MuJoCo MCP

MuJoCo MCP

Advanced robotics simulation platform enabling AI assistants to control complex physics simulations via natural language, built on MuJoCo and MCP.

Category
访问服务器

README

MuJoCo MCP - Enterprise Robotics Simulation Platform

Version Python MuJoCo MCP License

🤖 Advanced robotics simulation platform that enables AI assistants to control complex physics simulations through natural language. Built on MuJoCo physics engine and Model Context Protocol for seamless integration with Claude Desktop and other MCP clients.

🚀 Quick Start | 📚 Documentation | 🏗️ Architecture | 🔧 API Reference | 🎯 Advanced Features

🌟 Features

Core Capabilities

  • Natural Language Control: Control robots using plain English commands
  • Real-time Visualization: Native MuJoCo viewer with interactive GUI
  • MCP Standard Compliance: Full Model Context Protocol implementation
  • Cross-Platform Support: Works on macOS, Linux, and Windows

Advanced Features (v0.8.2)

  • 🎛️ Advanced Control Algorithms: PID, trajectory planning, optimization control
  • 🤖 Multi-Robot Coordination: Formation control, cooperative manipulation
  • 🔬 Sensor Feedback Systems: Closed-loop control with multi-modal sensors
  • 🧠 RL Integration: Gymnasium-compatible reinforcement learning environments
  • 📊 Physics Benchmarking: Performance, accuracy, and scalability testing
  • 📈 Real-time Monitoring: Advanced visualization and analytics tools
  • 🚀 Production Ready: Enhanced server with connection pooling and diagnostics

Quick Start

1. Install Dependencies

pip install mujoco mcp numpy

2. Install MuJoCo MCP

pip install -e .

3. Start the Viewer Server

python mujoco_viewer_server.py

4. Configure Claude Desktop

Add to your Claude Desktop config:

{
  "mcpServers": {
    "mujoco-mcp": {
      "command": "python",
      "args": ["-m", "mujoco_mcp"],
      "env": {
        "PYTHONPATH": "./src"
      }
    }
  }
}

5. Start Using Natural Language Commands

In Claude Desktop:

"Create a pendulum simulation"
"Set the pendulum angle to 45 degrees"
"Step the simulation 100 times"
"Show me the current state"

📝 Example Usage

Basic Physics Simulations

# Simple pendulum
"Create a pendulum simulation"
"Set the pendulum to 90 degrees and let it swing"

# Double pendulum (chaotic motion)
"Create a double pendulum"
"Give it a small push and watch the chaos"

# Cart-pole balancing
"Create a cart pole simulation"
"Try to balance the pole"

Advanced Robot Control

# Load robot from MuJoCo Menagerie
"Load a Franka Panda robot"
"Move the robot arm in a circle"
"Set all joints to home position"

# Multi-robot coordination
"Create two robot arms side by side"
"Make them work together to lift a box"

# Walking robots
"Load the Unitree Go2 quadruped"
"Make it walk forward"

Reinforcement Learning

from mujoco_mcp.rl_integration import create_reaching_env

# Create RL environment
env = create_reaching_env("franka_panda")

# Train your agent
obs, info = env.reset()
for _ in range(1000):
    action = env.action_space.sample()  # Your policy here
    obs, reward, terminated, truncated, info = env.step(action)
    if terminated or truncated:
        obs, info = env.reset()

🛠️ MCP Tools Available

Tool Description Example
get_server_info Get server status Returns version, capabilities
create_scene Create physics simulation {"scene_type": "pendulum"}
step_simulation Advance simulation {"steps": 100}
get_state Get current state Returns positions, velocities
set_joint_positions Control joints {"positions": [0, 0.785, 0]}
reset_simulation Reset to initial Resets physics state
execute_command Natural language {"command": "move arm up"}
get_loaded_models List active models Returns all loaded models
close_viewer Close GUI window Closes visualization

🚀 Advanced Setup

Install MuJoCo Menagerie (for robot models)

git clone https://github.com/google-deepmind/mujoco_menagerie.git ~/mujoco_menagerie
export MUJOCO_MENAGERIE_PATH=~/mujoco_menagerie

Use Enhanced Production Server

# For better performance and reliability
/opt/miniconda3/bin/mjpython mujoco_viewer_server_enhanced.py --port 8888

Run Comprehensive Tests

# Test basic functionality
python scripts/quick_internal_test.py

# Test advanced features
python test_advanced_features.py

# Run benchmarks
python benchmarks/physics_benchmarks.py

📚 Documentation

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md and Repository Guidelines for workflow expectations.

🐛 Troubleshooting

Common Issues

  1. "Failed to connect to viewer server"

    • Make sure mujoco_viewer_server.py is running
    • Check port 8888 is available
    • On macOS, use /opt/miniconda3/bin/mjpython
  2. "Model not found"

    • Install MuJoCo Menagerie for robot models
    • Check file paths in configurations
  3. Performance issues

    • Use the enhanced viewer server
    • Enable connection pooling
    • Check system resources

For more help, see the Documentation Index.

📄 License

MIT License - see LICENSE file for details.

🙏 Acknowledgments


Built with ❤️ for the robotics and AI community

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选