Nav2
MCP server that provides tools and resources to control and monitor robots using Nav2.
What is Nav2?
Nav2 is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server that provides tools and resources to control and monitor robots using nav2.
MCP server that provides tools and resources to control and monitor robots using Nav2.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- MCP server that provides tools and resources to control and
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx nav2Configuration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Nav2
The Nav2 MCP server bridges AI assistants and ROS 2 Nav2 navigation stacks, exposing tools to navigate robots to target poses, follow waypoints, spin, back up, dock, and monitor real-time robot pose and status. It enables researchers and robotics engineers to control and query Nav2-enabled robots through natural language using an MCP-compatible client such as Claude Desktop.
Prerequisites
- ROS 2 Jazzy installed and sourced in your shell environment
- A Nav2-enabled robot or simulation (e.g. Gazebo) running with Nav2 active
- Python 3.10+ and uv package manager installed
- An MCP-compatible client such as Claude Desktop or Cursor
Clone the repository and install dependencies
Clone the nav2_mcp_server repository and install with uv. Ensure your ROS 2 environment is sourced before running.
git clone https://github.com/ajtudela/nav2_mcp_server.git
cd nav2_mcp_server
export ROS_DOMAIN_ID=0
uv syncConfigure environment variables
Copy the example .env file and set the transport mode and ROS 2 domain settings. Use stdio for local AI client integration or http for containerized or network setups.
cp .env.example .env
# Edit .env:
# TRANSPORT_MODE=stdio
# ROS_DOMAIN_ID=0
# ROS_LOCALHOST_ONLY=1
# LOG_LEVEL=INFOStart your ROS 2 Nav2 navigation stack
Ensure Nav2 is up and running and that the robot (or simulation) is accepting navigation commands on the configured ROS_DOMAIN_ID before starting the MCP server.
Add the server to your MCP client configuration
Add the nav2_mcp_server to your MCP client config. Use the uv stdio transport for local integration, or Docker if you prefer a containerized setup.
{
"mcpServers": {
"nav2 mcp server": {
"type": "stdio",
"command": "uv",
"args": [
"run",
"--directory",
"/absolute/path/to/nav2_mcp_server",
"nav2-mcp-server"
],
"env": {
"ROS_DOMAIN_ID": "0",
"ROS_LOCALHOST_ONLY": "1"
}
}
}
}Restart your MCP client and verify the connection
Restart Claude Desktop or your chosen MCP client. Ask it to get the current robot pose to verify the MCP server is connected to Nav2.
Nav2 Examples
Client configuration
Claude Desktop/Cursor configuration for the Nav2 MCP server using uv and stdio transport.
{
"mcpServers": {
"nav2 mcp server": {
"type": "stdio",
"command": "uv",
"args": [
"run",
"--directory",
"/home/user/nav2_mcp_server",
"nav2-mcp-server"
],
"env": {
"ROS_DOMAIN_ID": "0",
"ROS_LOCALHOST_ONLY": "1"
}
}
}
}Prompts to try
Example natural language prompts to control a Nav2-enabled robot through your AI client.
- "Navigate the robot to position x=2.5, y=1.0 facing east"
- "What is the robot's current position and orientation?"
- "Follow these waypoints: [{\"x\": 1.0, \"y\": 0.0, \"yaw\": 0.0}, {\"x\": 2.0, \"y\": 1.0, \"yaw\": 1.57}]"
- "Clear all navigation costmaps"
- "Cancel the current navigation task"
- "Spin the robot 90 degrees clockwise"Troubleshooting Nav2
MCP server cannot connect to Nav2 or ROS 2 topics
Ensure your ROS 2 environment is sourced in the same shell before starting the MCP server, and that ROS_DOMAIN_ID matches the domain used by your Nav2 stack. Run 'ros2 topic list' to verify ROS 2 is active and topics are visible.
Navigation commands time out or the robot does not move
Confirm Nav2 lifecycle nodes are in the 'active' state. Use the nav2_lifecycle tool with action='startup' if Nav2 was not fully started, or check the Nav2 logs for any configuration errors.
uv command not found or dependency install fails
Install uv from https://astral.sh/uv or via 'curl -LsSf https://astral.sh/uv/install.sh | sh'. The ROS 2 Jazzy packages (rclpy, nav2_msgs) must also be available; source your ROS 2 install with 'source /opt/ros/jazzy/setup.bash' before running 'uv sync'.
Frequently Asked Questions about Nav2
What is Nav2?
Nav2 is a Model Context Protocol (MCP) server that mcp server that provides tools and resources to control and monitor robots using nav2. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Nav2?
Follow the installation instructions on the Nav2 GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Nav2?
Nav2 works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Nav2 free to use?
Yes, Nav2 is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
Nav2 Alternatives — Similar Developer Tools Servers
Looking for alternatives to Nav2? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Nav2 in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Nav2?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.