MCP (AI Assistants)¶
Connect N-Hub to AI assistants — such as Claude — using the Model Context Protocol (MCP). The N-Hub MCP server exposes your organisation's device data as tools, resources, and prompts that an assistant can use on your behalf. Everything is scoped to your account: an assistant only ever sees the data you can see.
Endpoint¶
The /mcp path is required — it's the MCP protocol endpoint.
Authentication¶
The server uses OAuth 2.1. You connect with an OAuth Client ID and Secret issued by N-Hub (the server uses pre-registered clients; automatic client registration is not supported). During connection you log in with your own N-Hub account, and the assistant inherits only the access your account has.
Your account must be provisioned in N-Hub and belong to an organisation. If you can't sign in or see no data, contact your N-Hub representative.
Connecting¶
Claude.ai and Claude Desktop (custom connector)¶
The recommended path — works on Claude.ai and Claude Desktop.
- Settings → Connectors → Add custom connector (on Team/Enterprise, an owner adds it under Customize → Connectors).
- URL:
https://mcp.<environment>.nnnco.io/mcp - Open Advanced settings and enter the OAuth Client ID and Client Secret from N-Hub. (These fields appear only in the add dialog, not when editing an existing connector.)
- Connect, then sign in. On Team/Enterprise each member signs in individually before they can use it.
Claude Desktop (local configuration)¶
Claude Desktop's local config doesn't speak the server's transport directly, so
bridge it with mcp-remote
(requires Node):
{
"mcpServers": {
"n-hub": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.<environment>.nnnco.io/mcp"]
}
}
}
A browser window opens for sign-in on first use.
What's available¶
Paginated lists
Every list_* tool returns a page envelope —
{ total, returned, limit, offset, has_more, <items> }. total is the
real count of matching records (not the page size); page through a large
result by increasing offset (page size default 100, max 500).
Tools¶
Actions the assistant can call.
| Tool | What it does |
|---|---|
whoami |
Your identity and roles. |
list_devices |
Devices in your organisation. Filters: q, device_type_code, status (online/warning/offline), signal_quality (excellent/good/fair/poor), enterprise (code or full_path — narrows to that organisation and its sub-organisations). Each device carries an effective location ({latitude, longitude} or null) for mapping plus location_source (device/site/null). |
get_device |
One device by device_id — with live status, location, signal (RSSI/SNR/SF), and primary gateway. location falls back to the device's assigned site when the device has no pin of its own; location_source says which was used. |
list_base_stations |
Gateways. Filters: q, connection_state, health_state, enterprise (code or full_path). |
get_base_station |
One gateway by lrr_id — hardware, served-device count, signal averages, live connection/health. |
device_recent_messages |
Recent uplinks/downlinks for a device (radio metadata + payload). |
gateway_served_devices |
Devices that have communicated through a gateway (lrr_id) — message counts by type, last-seen, and average RF metrics (RSSI/SNR/SF). Range: 24h/7d/30d. |
site_health |
Devices currently located at a site (site_id), with an online/warning/offline summary. |
fleet_message_throughput |
Message volume over time (24h/7d/30d). |
list_sites / get_site |
Sites (location, type, address). list_sites filters: q, site_type, enterprise (code or full_path). |
list_assets / get_asset |
Assets (type, decommission state). list_assets filters: q, asset_type, include_decommissioned, enterprise (code or full_path). |
list_groups / get_group |
Device groups with active-device counts. list_groups filters: q, enterprise (code or full_path). |
list_enterprises / get_enterprise |
The organisations you can access (tree order). get_enterprise accepts a UUID, a code (e.g. selwynwater), or a full_path (e.g. neura.selwynwater). |
list_device_types / get_device_type |
The device-type reference catalogue. |
list_device_categories |
The device-category reference catalogue. |
fleet_health_summary |
Device + gateway health counts — whole organisation, or one enterprise's subtree via the optional enterprise filter (code or full_path). Time windows: 24h/7d/30d. |
device_activity_history |
Historical daily activity per enterprise subtree (enterprise accepts code, full_path, or exact name; window ≤ 366 days). "Active" = communicated that day. |
licence_headroom |
Staff only. Device-licence quota per enterprise (granted/used/headroom/utilisation). Not available to customers. |
Resources¶
Read-only data you can attach to a conversation as context. Each …://mine
returns the page envelope above; each …://{id} returns one record.
| Resource | What it is |
|---|---|
devices://mine · device://{device_id} |
Your devices / one device. |
basestations://mine · basestation://{lrr_id} |
Your gateways / one gateway. |
sites://mine · site://{site_id} |
Your sites / one site. |
assets://mine · asset://{asset_id} |
Your assets / one asset. |
groups://mine · group://{group_id} |
Your device groups / one group. |
enterprises://mine · enterprise://{enterprise_id} |
Your organisations / one organisation. |
Prompts¶
Ready-made prompts you can invoke.
| Prompt | What it does |
|---|---|
fleet_overview |
Summarises the devices in your organisation. |
fleet_health_check |
Health snapshot of devices and gateways. |
quiet_devices |
Finds devices that have stopped reporting. |
weak_signal_devices |
Finds devices with a poor RF link across your fleet. |
device_troubleshoot |
Investigates a single device by its device_id. |
device_signal_check |
Assesses the RF signal quality of one device. |
gateway_troubleshoot |
Investigates a single gateway by its lrr_id. |
disconnected_gateways |
Finds gateways that are currently offline. |
gateway_served_devices |
Summarises the devices served by a single gateway (lrr_id). |
site_health |
Health snapshot of the devices located at a site (site_id). |
licence_headroom |
Staff only. Device-licence quota per enterprise. |
Data access and permissions¶
- You only ever see your organisation's data — the same scope you have in the N-Hub portal, including any sub-organisations you can access.
- Requesting a device outside your access returns not found — the same response as a device that doesn't exist, so nothing about other organisations is revealed.
- Every tool in the catalogue today is read-only — the connector cannot change your data.
- A few tools are staff-only (marked above) and return an authorization error for customer accounts.