metrotech-sk/xerxes-mcp-server
3.2
If you are the rightful owner of xerxes-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Xerxes MCP Server is a Model Context Protocol server designed to facilitate interaction with the Xerxes IoT platform API, offering tools for device management, data retrieval, and user authentication.
Tools
9
Resources
0
Prompts
0
Xerxes MCP Server
MCP (Model Context Protocol) server providing tools to interact with the Xerxes IoT platform API.
Features
- Device configuration management (CRUD operations)
- Measurement data retrieval and aggregation
- Authentication verification
- User confirmation for destructive operations
Prerequisites
- Python 3.13+
- Xerxes API key
- Access to Xerxes server (default: https://xerxes.rubint.sk/)
Installation
# Install dependencies with uv
uv sync
Configuration
Create a .env file in the project root:
XERXES_API_KEY=your_api_key_here
XERXES_BASE_URL=https://xerxes.rubint.sk/
HOST=0.0.0.0
PORT=8800
Or set environment variables directly:
XERXES_API_KEY- Required. Your Xerxes API authentication keyXERXES_BASE_URL- Optional. Defaults to https://xerxes.rubint.sk/HOST- Optional. MCP server host, defaults to 0.0.0.0PORT- Optional. MCP server port, defaults to 8800
Running
Local Development
python main.py
Docker
docker compose up
Available Tools
Configuration Management
verify_auth()- Test API authenticationget_all_configs()- List all device configurationsget_all_devices()- List all devices with UUIDs and serial numbersget_device_config(uuid)- Get configuration for specific devicecreate_device_config(uuid, config)- Create device configuration (requires confirmation)update_device_config(uuid, config)- Update device configuration (requires confirmation)delete_device_config(uuid)- Delete device configuration (requires confirmation)
Measurements
find_one_measurement(project_id)- Get single measurement recordaggregate_measurements(project_id, aggregation)- Query measurements with MongoDB aggregation pipeline
Configuration Object Structure
{
"battery_low": 3.6,
"battery_critical": 3.3,
"period": 900,
"max_cycle_time": 120,
"project": "project_key",
"serial_number": "device_serial",
"endpoint": "https://custom.endpoint/api",
"headers": {"Custom-Header": "value"},
"note": "Optional note"
}
Aggregation Pipeline Example
aggregation = [
{"$match": {"meta.uuid": "12345"}},
{"$sort": {"time.server.epoch": -1}},
{"$limit": 10}
]
Development
Project structure:
src/xerxes.py- Tool implementationssrc/config.py- Configuration managementsrc/client.py- HTTP client setupsrc/mcp.py- MCP server instancemain.py- Entry point
API Documentation
Full API documentation available at: https://xerxes.rubint.sk/openapi.json