Integrates with Gausium robots through the Gausium OpenAPI, providing tools for listing robots, fetching robot status, retrieving cleaning task reports, and accessing robot maps.
Gausium OpenAPI MCP Server
This project implements an MCP (Model Control Protocol) server that acts as a bridge to the Gausium OpenAPI, allowing AI models or other clients to interact with Gausium robots through a standardized interface.
Repository: https://github.com/cfrs2005/mcp-gs-robot
Architecture
The server follows a layered architecture that separates concerns and promotes maintainability:
MCP Protocol Flow
The diagram below shows how AI models interact with Gausium robots through the MCP protocol:
Features
The server currently supports the following functionalities as MCP tools:
list_robots
: Lists robots accessible via the API key. (Based on: List Robots API)get_robot_status
: Fetches the detailed status of a specific robot by its serial number. (Based on: Get Robot Status API)list_robot_task_reports
: Retrieves cleaning task reports for a specific robot, with optional time filtering. (Based on: List Robot Task Reports API)list_robot_maps
: Lists the maps associated with a specific robot. (Based on: List Robot Maps API)
Project Structure
The project follows a structured layout based on Python best practices:
src/gs_openapi/config.py
: Contains base URLs, API paths, and environment variable names.src/gs_openapi/auth/token_manager.py
: Manages acquiring and refreshing OAuth tokens.src/gs_openapi/api/
: Contains modules (robots.py
,maps.py
) with functions that directly call the Gausium OpenAPI endpoints usinghttpx
.src/gs_openapi/mcp/gausium_mcp.py
: Defines theGausiumMCP
class which integrates the API calls and token management.main.py
: InitializesGausiumMCP
, registers the API functionalities as MCP tools using@mcp.tool()
, configures basic logging, and starts the server usingmcp.run()
.
Setup and Running
- Clone the repository:
- Create and activate a virtual environment using
uv
: - Install dependencies using
uv
: - Configure Credentials:
The application expects Gausium API credentials to be set as environment variables:
GS_CLIENT_ID
: Your Gausium Application Client ID.GS_CLIENT_SECRET
: Your Gausium Application Client Secret.GS_OPEN_ACCESS_KEY
: Your Gausium OpenAPI Access Key.
You can set these directly in your shell:
(Alternatively, modify
src/gs_openapi/config.py
for development, but do not commit credentials). - Run the server:By default, this starts the server using SSE transport on
http://0.0.0.0:8000
. You can modifymain.py
to usestdio
transport if needed.
Connecting an MCP Client
Once the server is running, an MCP client (like Cursor or another compatible tool) can connect to it via the appropriate transport (SSE or stdio) to utilize the defined tools.
Usage with Cursor
Below is an example of how Cursor interacts with this MCP server:
Debugging
You can monitor the server logs for debugging information. The basic logging configuration in main.py
provides timestamps, levels, and source information.
Below is an example of the server log output during operation:
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A Model Control Protocol plugin for controlling GS cleaning robots, supporting robot listing, status monitoring, navigation commands, task execution, and remote control operations.
Related MCP Servers
- -securityAlicense-qualityA control server that enables AI assistants to interact with Ecovacs robot vacuums through MCP protocol, supporting device listing, cleaning control, charging control, and status queries.Last updated -13PythonMIT License
- -securityFlicense-qualityA Python-based server that enables AI assistants to control robots by integrating the Model Context Protocol (MCP) with ROS 2, allowing for natural language commands that translate into robot movement via the /cmd\_vel topic.Last updated -55Python
- AsecurityAlicenseAqualityA server built on the Model Context Protocol that enables controlling the Unitree Go2 robot using natural language commands, which are translated into ROS2 instructions for the robot to perform corresponding actions.Last updated -1233PythonApache 2.0
- -securityFlicense-qualityA Model Context Protocol server that enables natural language interactive control of Universal Robots collaborative robots, allowing users to control robot motion, monitor status, and execute programs through direct commands to large language models.Last updated -3Python