Nav2 MCP Server logo

Nav2 MCP Server

Community
ajtudela

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

Publisherajtudela
Repositorynav2_mcp_server
LanguagePython
Forks
25
Stars
85
Available tools
0
Transport typestdio
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    Nav2 MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    85 stars and 25 forks from the linked repository.

Nav2 MCP Server

ROS2 License Build Docker image Python Dynamic TOML Badge codecov

An MCP (Model Context Protocol) server that provides tools and resources to control and monitor Nav2 navigation operations, allowing seamless integration with Nav2-enabled robots through the MCP protocol.

Demo of Nav2 MCP Server

Features

  • Navigation control: Navigate to specific poses, follow waypoint sequences, and execute precise robot movements
  • Real-time status: Monitor navigation progress, robot pose, and system status with comprehensive feedback
  • Costmap management: Clear stale obstacle data and manage navigation costmaps for optimal path planning
  • Lifecycle management: Control Nav2 system startup and shutdown for complete system control
  • ROS 2 integration: Full compatibility with Nav2 navigation stack and ROS 2 ecosystem
  • Async operations: Non-blocking navigation commands with progress monitoring and cancellation support

Tools

ToolDescriptionParameters
navigate_to_poseNavigate the robot to a specific pose (position and orientation) in the map framex: float, y: float, yaw: float
follow_waypointsNavigate the robot through a sequence of waypoints in orderwaypoints: str (JSON array)
spin_robotRotate the robot in place by a specified angleangle: float
backup_robotMove the robot backward by a specified distancedistance: float, speed: float
dock_robotDock the robot to a charging station or dockx: float, y: float, yaw: float, dock_id: str, dock_type: str, nav_to_dock: bool
undock_robotUndock the robot from a charging station or dockdock_type: str
clear_costmapsClear robot navigation costmaps to remove stale obstacle datacostmap_type: str
get_robot_poseGet the current position and orientation of the robot—
cancel_navigationCancel the currently active navigation task—
nav2_lifecycleControl Nav2 lifecycle (startup or shutdown)action: str
get_pathCompute a navigation path between two posesstart_x: float, start_y: float, start_yaw: float, goal_x: float, goal_y: float, goal_yaw: float, planner_id: str
get_path_from_robotCompute a navigation path from the robot's current pose to a goal posegoal_x: float, goal_y: float, goal_yaw: float, planner_id: str

Environment Variables

VariableDefaultDescription
ROS_DOMAIN_ID—ROS 2 domain ID for network isolation (recommended to set)
ROS_LOCALHOST_ONLY—Set to '1' to restrict ROS 2 communication to localhost only

Configuration

Environment Variables

VariableDefaultDescription
TRANSPORT_MODEstdioTransport mode: stdio (local integration) or http (network)
HTTP_HOST0.0.0.0HTTP host binding (only used when TRANSPORT_MODE=http)
HTTP_PORT3001HTTP port (only used when TRANSPORT_MODE=http)
LOG_LEVELINFOLogging level: DEBUG, INFO, WARNING, ERROR, CRITICAL
ROS_DOMAIN_ID—ROS 2 domain ID for network isolation (recommended)
ROS_LOCALHOST_ONLY—Set to '1' to restrict ROS 2 communication to localhost only

Setup

  1. Copy the environment configuration template:
bash
cp .env.example .env
  1. Edit .env to customize settings:
bash
# Transport mode: 'stdio' for local, 'http' for containerized/network
TRANSPORT_MODE=stdio

# HTTP settings (only needed if using http transport)
HTTP_HOST=0.0.0.0
HTTP_PORT=3001

# Logging
LOG_LEVEL=INFO

Installation

Dependencies

Install with uv

Clone the repository and install with uv:

bash
git clone https://github.com/ajtudela/nav2_mcp_server.git
cd nav2_mcp_server
# Set up ROS 2 environment variables if needed
export ROS_DOMAIN_ID=0
uv sync

Or install directly from the repository:

bash
uv add git+https://github.com/ajtudela/nav2_mcp_server.git

Docker

Build the image

Build the image:

bash
docker build -t nav2-mcp-server:latest .

Pull the image

Pull the latest image from the Docker registry:

bash
docker pull ghcr.io/ajtudela/nav2_mcp_server:latest

Usage

Running with uv

bash
uv run nav2_mcp_server

Configuration example for Claude Desktop/Cursor/VSCode

Add this configuration to your application's settings (mcp.json):

Using uv (stdio transport)

json
{
  "nav2 mcp server": {
    "type": "stdio",
    "command": "uv",
    "args": [
      "run",
      "--directory",
      "/path/to/nav2_mcp_server",
      "nav2-mcp-server"
    ],
    "env": {
      "ROS_DOMAIN_ID": "0",
      "ROS_LOCALHOST_ONLY": "1"
    }
  }
}

Using Docker (stdio transport)

json
"nav2 mcp server": {
    "type": "stdio",
    "command": "docker",
    "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/ajtudela/nav2_mcp_server"
    ],
    "env": {
      "ROS_DOMAIN_ID": "0",
      "ROS_LOCALHOST_ONLY": "1"
    }
}

Using HTTP transport

json
"nav2 mcp server": {
  "type": "http",
  "url": "http://localhost:3001/mcp",
  "env": {
    "TRANSPORT_MODE": "http",
    "LOG_LEVEL": "INFO"
  }
}

Use Nav2 MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Nav2 MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Nav2 MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Nav2 MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "nav2-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Nav2 MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Nav2 MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Nav2 MCP Server to help me with this task?
Nav2 MCP Server
Sure. I read it.
Here is what I found using Nav2 MCP Server.

Frequently asked questions

What is the Nav2 MCP Server MCP server used for?

Nav2 MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Nav2 MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Nav2 MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Nav2 MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Nav2 MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Nav2 MCP Server MCP to TypingMind?

Nav2 MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Nav2 MCP Server MCP provide in TypingMind?

Nav2 MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Nav2 MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Nav2 MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇