Skip to main content
Glama
Connhex MCP Server

Connhex MCP Server

Official

Connhex Tools

Tools workspace for Connhex. Contains the MCP server, the CLI, and the API SDK as sibling packages in a single uv workspace.

Packages

Package

Description

README

connhex-sdk

Async Python client for the Connhex API. Used internally by the other packages.

→

connhex-mcp

MCP server that exposes Connhex APIs as tools for AI clients (Claude, etc.).

→

connhex-cli

Command-line interface for managing connhex resources.

→

Related MCP server: Ubidots MCP Server

Getting started

Prerequisites: Python 3.11+, uv.

git clone https://github.com/compiuta-origin/connhex-tools.git
cd connhex-tools
uv sync

This installs all three packages and their dependencies into a shared .venv.

Development

uv run pytest                        # run all tests
uv run ruff check . && uv run ruff format .
uv run pre-commit run --all-files

Run a specific package's tests:

uv run pytest packages/connhex-cli/tests

Available Tools

30 tools
create_manufacturing_resourceCreate Manufacturing ResourceA

Create a new resource on a Connhex JSON:API service.

Use schema fields for attributes and relationships.

If available, call the get_schema tool first to discover valid resource types, attributes, and relationships.

Inputs: attributes (required), resource_type (required), relationships. Returns: A flattened JSON:API resource. All attributes are hoisted to top level.

create_resourceCreate ResourceA

Create a new resource on a Connhex JSON:API service.

Use schema fields for attributes and relationships.

If available, call the get_schema tool first to discover valid resource types, attributes, and relationships.

Inputs: attributes (required), resource_type (required), relationships. Returns: A flattened JSON:API resource. All attributes are hoisted to top level.

create_ruleCreate RuleC

Create a new rule in the Connhex Rules Engine.

Inputs: name (required), conditions (required), notification (required), tags, +3 more. Returns: id, name, tags, status, +8 more

delete_manufacturing_resourceDelete Manufacturing ResourceA
Destructive

Delete a resource. This action is irreversible.

If available, call the get_schema tool first to discover valid resource types, attributes, and relationships.

Inputs: resource_id (required), resource_type (required). Returns: result

delete_resourceDelete ResourceA
Destructive

Delete a resource. This action is irreversible.

If available, call the get_schema tool first to discover valid resource types, attributes, and relationships.

Inputs: resource_id (required), resource_type (required). Returns: result

delete_ruleDelete RuleA
Destructive

Delete a rule. This action is irreversible.

Inputs: rule_id (required). Returns: result

get_manufacturing_resourceGet Manufacturing ResourceA
Read-only

Get a specific resource by its ID from a JSON:API service.

Use include when related resources should be returned inline.

If available, call the get_schema tool first to discover valid resource types, attributes, and relationships.

Inputs: resource_id (required), resource_type (required), include. Returns: A flattened JSON:API resource. All attributes are hoisted to top level.

get_modelGet Thing ModelA
Read-only

Get a single device model by ID.

Inputs: model_id (required). Returns: id, name, tags, image, +5 more

get_model_thingsList Model ThingsB
Read-only

List all things assigned to a specific device model.

Inputs: model_id (required), dir, limit, order, +1 more. Returns: limit, total, offset, things

get_resourceGet ResourceA
Read-only

Get a specific resource by its ID from a JSON:API service.

Use include when related resources should be returned inline.

If available, call the get_schema tool first to discover valid resource types, attributes, and relationships.

Inputs: resource_id (required), resource_type (required), include. Returns: A flattened JSON:API resource. All attributes are hoisted to top level.

get_ruleGet RuleA
Read-only

Get a single rule by ID from the Connhex Rules Engine.

Inputs: rule_id (required). Returns: id, name, tags, status, +8 more

get_schemaGet Service SchemaA
Read-only

Schema of every resource type exposed by this Connhex JSON:API service for the current deployment.

Shape:

  • Top-level keys are resource type names. Use them as the resource_type argument to the corresponding *_resource tools.

  • Each value is a dict of fields:

    • Entries with a type key are attributes (e.g. String, Date, Object). isArray: true indicates a list-valued attribute.

    • Entries with a link key are relationships. The link value is the related resource type — pass it (or a comma-separated list) as the include argument to fetch related records inline. isArray: true means a to-many relationship; inverse is the field name on the other side.

Internal/system fields present on every type:

  • tenants, createdAt, updatedAt are managed by the platform. Do NOT include them in create/update payloads and do not surface them as user-facing data unless explicitly asked.

Read this resource before constructing filters, includes, or create/update payloads — it is the source of truth for valid types and field names.

Inputs: no named parameters. Returns: object

get_thingGet ThingA
Read-only

Get a single thing by ID.

Inputs: thing_id (required). Returns: id, key, name, model, +2 more

get_thing_channelsList Thing ChannelsB
Read-only

List the channels connected to a specific thing.

Inputs: thing_id (required), limit, offset, connected. Returns: limit, total, offset, channels

get_things_flappingGet Flapping ThingsA
Read-only

List devices with an excessive number of reconnections (flapping) within a time window.

Inputs: limit, window, min_reconnects. Returns: things

get_things_statusGet Things Connectivity StatusA
Read-only

Get current connectivity status for a batch of things by their IDs. Things that have never connected are omitted from the response.

Inputs: ids (required). Returns: statuses

get_things_status_summaryGet Fleet Connectivity SummaryA
Read-only

Get a fleet-wide connectivity summary: online, offline, never connected, active last hour.

Inputs: no named parameters. Returns: total, online, offline, never_connected, +1 more

get_thing_uptimeGet Thing UptimeA
Read-only

Get the connect/disconnect timeline and total uptime for a single thing within a time range.

Inputs: to_ts (required), from_ts (required), thing_id (required). Returns: events, uptime_seconds

list_manufacturing_resourcesList Manufacturing ResourcesA
Read-only

List resources of a given type from a JSON:API service.

Supports filtering, sorting, relationship includes, and pagination. Argument details are provided in the parameter schema.

If available, call the get_schema tool first to discover valid resource types, attributes, and relationships.

Inputs: resource_type (required), sort, filter, include, +2 more. Returns: data, total, has_next

list_modelsList Thing ModelsA
Read-only

List device models with optional filtering and pagination.

Inputs: dir, tag, name, limit, +3 more. Returns: limit, total, models, offset

list_resourcesList ResourcesA
Read-only

List resources of a given type from a JSON:API service.

Supports filtering, sorting, relationship includes, and pagination. Argument details are provided in the parameter schema.

If available, call the get_schema tool first to discover valid resource types, attributes, and relationships.

Inputs: resource_type (required), sort, filter, include, +2 more. Returns: data, total, has_next

list_rule_eventsList Rule EventsB
Read-only

List rule events (triggered rule occurrences).

Inputs: page, sort, status, to_date, +3 more. Returns: total, results

list_rulesList RulesB
Read-only

List rules from the Connhex Rules Engine.

Inputs: ids, page, sort, status, +4 more. Returns: total, results

list_thingsList ThingsC
Read-only

List things with optional filtering and pagination.

Inputs: dir, name, limit, order, +1 more. Returns: limit, total, offset, things

read_channel_messagesRead Channel MessagesA
Read-only

Read messages from a Connhex IoT channel by its channel ID.

Use this when you already have a channel ID. To go from a device's business identifier (serial, etc.) to messages, prefer read_thing_messages, which resolves the channel ID for you from a thing ID.

Inputs: channel_id (required), ds, dsf, dsv, +7 more. Returns: limit, total, offset, messages

read_thing_messagesRead Thing MessagesA
Read-only

Read messages for a Connhex thing (device/edge), identified by its thing ID. Resolves the thing's event_channel_id from its metadata and reads messages from it.

Resolving a user-facing identifier: If you only have a serial number or another business identifier, first use list_resources / list_manufacturing_resources to find the record, then look for a field named connhexId (or similar) — that value is the thing_id to pass here, not the record's own id.

Inputs: thing_id (required), ds, dsf, dsv, +7 more. Returns: limit, total, offset, messages

update_manufacturing_resourceUpdate Manufacturing ResourceA

Update an existing resource's attributes (partial update).

Use schema fields for attributes. Only provided attributes are changed.

If available, call the get_schema tool first to discover valid resource types, attributes, and relationships.

Inputs: attributes (required), resource_id (required), resource_type (required). Returns: A flattened JSON:API resource. All attributes are hoisted to top level.

update_resourceUpdate ResourceA

Update an existing resource's attributes (partial update).

Use schema fields for attributes. Only provided attributes are changed.

If available, call the get_schema tool first to discover valid resource types, attributes, and relationships.

Inputs: attributes (required), resource_id (required), resource_type (required). Returns: A flattened JSON:API resource. All attributes are hoisted to top level.

update_ruleUpdate RuleB

Partially update a rule. Only the fields provided are changed.

Inputs: rule_id (required), name, tags, severity, +4 more. Returns: id, name, tags, status, +8 more

whoamiGet Current User and SessionA
Read-only

Returns information about the currently authenticated user. Use this to verify the connection and see user's identity (active Ory Kratos session).

Inputs: no named parameters. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 30 tools

    Disambiguation2/5

    There is significant overlap between generic resource tools (create_resource, delete_resource, etc.) and manufacturing resource tools (create_manufacturing_resource, etc.), with identical descriptions. This creates ambiguity about when to use each set. Other tools like read_channel_messages and read_thing_messages are more distinct.

    Naming Consistency5/5

    Nearly all tools follow a consistent verb_noun pattern (e.g., create_resource, list_things, get_rule). The only slight outlier is whoami, but it is a common convention. Naming is highly predictable and uniform across domains.

    Tool Count3/5

    With 30 tools, the server covers multiple domains (generic resources, manufacturing, rules, things, models, messages, user info). However, the explicit duplication of CRUD tools for generic and manufacturing resources inflates the count unnecessarily. The scope is broad but the count is borderline high.

    Completeness2/5

    The tool surface has notable gaps: things can only be read/fetched (no create, update, or delete), models lack CRUD beyond get/list, and channels only support reading messages. Full CRUD is only present for resources (generic and manufacturing) and rules. The absence of basic lifecycle operations for core entities (things, models) will likely cause agent failures.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Connect your AI workflows to the ThingsBoard IoT Platform through this MCP server. Enables LLMs to query device telemetry, manage IoT entities (devices, assets, customers), and analyze sensor data - all through natural language. Perfect for building AI-powered IoT monitoring, predictive maintenance,
      99
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with an OpenRemote instance through its service API, allowing management of assets, users, and other resources via natural language.
      AGPL 3.0