cfrs2005 mcp gs robot

cfrs2005 mcp gs robot avatar

by cfrs2005

mcp-gs-robot gaussian bot

What is cfrs2005 mcp gs robot

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:

!Architecture Diagram

MCP Protocol Flow

The diagram below shows how AI models interact with Gausium robots through the MCP protocol:

!MCP Protocol Flow

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:

. 
โ”œโ”€โ”€ .venv/                # Virtual environment directory
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ gs_openapi/
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ”œโ”€โ”€ api/            # Modules for direct API interactions
โ”‚       โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚       โ”‚   โ”œโ”€โ”€ maps.py
โ”‚       โ”‚   โ””โ”€โ”€ robots.py
โ”‚       โ”œโ”€โ”€ auth/           # Authentication related modules
โ”‚       โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚       โ”‚   โ””โ”€โ”€ token_manager.py # Handles OAuth token lifecycle
โ”‚       โ”œโ”€โ”€ config.py       # Configuration (URLs, Env Vars)
โ”‚       โ””โ”€โ”€ mcp/            # MCP server specific implementations
โ”‚           โ”œโ”€โ”€ __init__.py
โ”‚           โ””โ”€โ”€ gausium_mcp.py # GausiumMCP class extending FastMCP
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ docs/
โ”‚   โ””โ”€โ”€ images/            # Documentation images
โ”œโ”€โ”€ main.py               # Main application entry point, tool registration, server run
โ”œโ”€โ”€ README.md             # This file
โ””โ”€โ”€ requirements.txt      # Project dependencies
  • 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 using httpx.
  • src/gs_openapi/mcp/gausium_mcp.py: Defines the GausiumMCP class which integrates the API calls and token management.
  • main.py: Initializes GausiumMCP, registers the API functionalities as MCP tools using @mcp.tool(), configures basic logging, and starts the server using mcp.run().

Setup and Running

  1. Clone the repository:

    git clone https://github.com/cfrs2005/mcp-gs-robot.git
    cd mcp-gs-robot
    
  2. Create and activate a virtual environment using uv:

    uv venv
    source .venv`/bin/activate`  # On Windows use `.venv\Scripts\activate`
    
  3. Install dependencies using uv:

    uv pip install -r requirements.txt 
    # Or, if you prefer adding specific core packages:
    # uv add httpx "mcp[cli]"
    
  4. 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:

    export GS_CLIENT_ID="your_client_id"
    export GS_CLIENT_SECRET="your_client_secret"
    export GS_OPEN_ACCESS_KEY="your_access_key"
    

    (Alternatively, modify src/gs_openapi/config.py for development, but do not commit credentials).

  5. Run the server:

    python main.py
    

    By default, this starts the server using SSE transport on http://0.0.0.0:8000. You can modify main.py to use stdio 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:

!Cursor Usage Screenshot

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:

!MCP Debug Screenshot

Leave a Comment

Frequently Asked Questions

What is MCP?

MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.

What are MCP Servers?

MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.

How do MCP Servers work?

MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.

Are MCP Servers secure?

Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.

Related MCP Servers

chrisdoc hevy mcp avatar

chrisdoc hevy mcp

mcp
sylphlab pdf reader mcp avatar

sylphlab pdf reader mcp

An MCP server built with Node.js/TypeScript that allows AI agents to securely read PDF files (local or URL) and extract text, metadata, or page counts. Uses pdf-parse.

pdf-parsetypescriptnodejs
aashari mcp server atlassian bitbucket avatar

aashari mcp server atlassian bitbucket

Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.

atlassianrepositorymcp
aashari mcp server atlassian confluence avatar

aashari mcp server atlassian confluence

Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP interface.

atlassianmcpconfluence
prisma prisma avatar

prisma prisma

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

cockroachdbgomcp
Zzzccs123 mcp sentry avatar

Zzzccs123 mcp sentry

mcp sentry for typescript sdk

mcptypescript
zhuzhoulin dify mcp server avatar

zhuzhoulin dify mcp server

mcp
zhongmingyuan mcp my mac avatar

zhongmingyuan mcp my mac

mcp
zhixiaoqiang desktop image manager mcp avatar

zhixiaoqiang desktop image manager mcp

MCP ๆœๅŠกๅ™จ๏ผŒ็”จไบŽ็ฎก็†ๆกŒ้ขๅ›พ็‰‡ใ€ๆŸฅ็œ‹่ฏฆๆƒ…ใ€ๅŽ‹็ผฉใ€็งปๅŠจ็ญ‰๏ผˆๅฎŒๅ…จ่ฎฉTraeๅฎž็Žฐ๏ผ‰

mcp
zhixiaoqiang antd components mcp avatar

zhixiaoqiang antd components mcp

An MCP service for Ant Design components query | ไธ€ไธชๅ‡ๅฐ‘ Ant Design ็ป„ไปถไปฃ็ ็”Ÿๆˆๅนป่ง‰็š„ MCP ๆœๅŠก๏ผŒๅŒ…ๅซ็ณป็ปŸๆ็คบ่ฏใ€็ป„ไปถๆ–‡ๆกฃใ€API ๆ–‡ๆกฃใ€ไปฃ็ ็คบไพ‹ๅ’Œๆ›ดๆ–ฐๆ—ฅๅฟ—ๆŸฅ่ฏข

designantdapi

Submit Your MCP Server

Share your MCP server with the community

Submit Now