Nav2

v1.0.0Developer Toolsstable

MCP server that provides tools and resources to control and monitor robots using Nav2.

mcpmcp-servernav2rosros2
Share:
73
Stars
0
Downloads
0
Weekly
0/5

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

Provide tools for robot navigation and monitoring with Nav2.
Execute ROS2-based autonomous robot control.
ajtudela

Maintainer

LicenseApache-2.0
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx nav2

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 sync
2

Configure 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=INFO
3

Start 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.

4

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"
      }
    }
  }
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "nav2": { "command": "npx", "args": ["-y", "nav2"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides