Skip to content
Cloud InfrastructureClaude Desktop Guide

iotHubClient Claude Desktop Integration

This guide explains how to configure Claude Desktop (Mac and Windows) to use the iotHubClient API through the Model Context Protocol (MCP). The integration exposes 10 API endpointsas callable tools inside Claude's chat interface, including Get all the IoT hubs in a subscription., Check if an IoT hub name is available., Get all the IoT hubs in a resource group., and more. No API keys or credentials are needed — setup takes approximately 30 seconds. The server runs locally via npx and communicates over STDIO transport. Paste the JSON configuration below into your claude_desktop_config.json file to get started.

Integration Specs

ClientClaude Desktop
Runtimenpx
AuthenticationNone
Setup Time~30 sec

Setup Instructions

1

Open Claude Settings

Launch Claude Desktop, open Settings (click your profile) → Developer → click 'Edit Config'.

2

Locate configuration file

This opens your local 'claude_desktop_config.json' file in your system editor.

3

Insert Server Config JSON

Paste the JSON configuration schema block (provided below) into the 'mcpServers' object.

4

Add authentication credentials

No credentials needed; leave the 'env' mapping empty.

5

Restart Claude app

Save the config file and restart Claude Desktop to load your new tools.

Configuration JSON

claude_desktop_config.json

Copy and paste this config snippet inside your local configuration file.

{
  "mcpServers": {
    "azure-com-iothub": {
      "command": "npx",
      "args": [
        "-y",
        "@mcp/azure-com-iothub"
      ],
      "env": {
        "IOTHUBCLIENT_API_KEY": "your_iothubclient_api_key"
      }
    }
  }
}

Required Environment Keys

Provide these variable keys in your local environment section:

IOTHUBCLIENT_API_KEY

Replace your_iothubclient_api_key with your secret key credentials.

Available Tools (10)

These endpoints are parsed from the OpenAPI schema and converted to Claude-compatible tools:

GET/subscriptions/{subscriptionId}/providers/Microsoft.Devices/IotHubs
Get all the IoT hubs in a subscription.
POST/subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkNameAvailability
Check if an IoT hub name is available.
GET/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs
Get all the IoT hubs in a resource group.
GET/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}
Get the non-security related metadata of an IoT hub.
PUT/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}
Create or update the metadata of an IoT hub.
DELETE/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}
Delete an IoT hub.
POST/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubKeys/{keyName}/listkeys
Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
GET/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats
Get the statistics from an IoT hub.
GET/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups
Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.
GET/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}
Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.