MCP.so
Sign In

Mbotmcp

@deemkeen

About Mbotmcp

control your mbot2 with a power combo: mqtt+mcp+llm

Basic information

Category

Other

Runtime

java

Transports

stdio

Publisher

deemkeen

Submitted by

deemkeen

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "mbotmcp": {
      "command": "path-to-java-executable",
      "args": [
        "-jar",
        "/path-to-repo/mbotmcp/target/mbotmcp-0.0.1-SNAPSHOT.jar"
      ],
      "env": {
        "MQTT_USERNAME": "<mqtt server username>",
        "MQTT_PASSWORD": "<mqtt server password>",
        "MQTT_SERVER_URI": "mqtt server url"
      }
    }
  }
}

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is MBotMcp?

MBotMcp is a Spring Boot application that uses Spring AI and the Model Context Protocol (MCP) to let AI models control a physical mBot2 robot through natural language commands. It acts as an MCP server, exposing robot control commands as AI-callable tools and relaying them via an MQTT broker to the robot.

How to use MBotMcp?

First, set up an MQTT broker (e.g., with the included Docker Compose file), configure the required environment variables (MQTT_USERNAME, MQTT_PASSWORD, MQTT_SERVER_URI), and upload the mbot-mqtt.py Python script to your mBot2 after editing its WiFi/MQTT settings. Then build the Spring Boot application with mvn clean package and run the test client with mvn test -Dtest=ClientStdioTest. Finally, connect an LLM client that supports MCP (such as Goose) to the server to send natural language commands to the robot.

Key features of MBotMcp

  • Exposes seven robot commands as MCP tools
  • Uses MQTT broker for reliable message passing
  • Supports natural language control via any MCP-compatible AI client
  • Includes a pre-configured Docker Compose for the MQTT broker
  • Provides a Python script for the mBot2 with configurable WiFi and MQTT
  • Integrates easily with Spring AI’s @Tool annotation
  • Tested with the “beep” command and blue LED lights

Use cases of MBotMcp

  • Allowing an AI agent to autonomously explore a room by sending “explore”
  • Teaching students how to combine robotics with AI and the MCP protocol
  • Enabling voice or chat-based control of a physical robot in a classroom
  • Demonstrating real‑time robot control from a Spring Boot application

FAQ from MBotMcp

What are the system requirements?

Java 21, Maven, an mBot2 robot with mBlock IDE, an MQTT broker (can be run locally with Docker), and basic Java knowledge.

How do I configure the MQTT broker and robot?

Set the environment variables MQTT_USERNAME, MQTT_PASSWORD, and MQTT_SERVER_URI in the Spring Boot app. Edit the uploaded mbot-mqtt.py script to include your WiFi credentials and MQTT broker details.

Which AI clients can I use with MBotMcp?

Any LLM client that supports the Model Context Protocol (MCP). The README specifically recommends using Goose.

Where do the robot commands and data travel?

Commands flow from the AI client through the MCP server to the MQTT broker, then to the mBot2 robot. No external cloud storage is used; all data stays on the local MQTT broker.

What happens if the robot goes rogue?

The author provides a humorous disclaimer: “If your robot starts planning world domination, the author accepts no responsibility. Just unplug it and run! 😂” The robot can be stopped with the mbotStop() command or by powering it off.

Comments

More Other MCP servers