Skip to main content

15.2 MCP Interface

IDMP now exposes its MCP integration through a reverse-proxied Streamable HTTP endpoint. AI agents do not need to install or run mcp-tdengine-idmp locally. Instead, they connect directly to the Streamable HTTP endpoint provided by IDMP and can immediately discover the available tools, resources, and prompts. The current surface covers tools, resources, and prompt workflows for diagnostics, alarm triage, shift handover, root-cause analysis, and guided creation of analyses and panels.

15.2.1 Typical Use Cases

  • Connect Streamable HTTP MCP clients directly to IDMP elements, attributes, events, analyses, and panels.
  • Bring live industrial context into LLM workflows for health checks, alarm investigation, and natural-language question answering.
  • Standardize multi-step operational workflows such as shift handover, batch review, and alarm triage through prompt templates.
  • Create analyses, alarm rules, panels, attributes, and annotations within a controlled write boundary instead of exposing broad administrative CRUD.

15.2.2 Access Model

ItemValue
TransportStreamable HTTP
Endpoint URLhttp://<IDMP_HOST>:6042/api/v1/mcp/stream
AuthenticationAuthorization: Bearer <IDMP_TOKEN>
Capability discoveryThe client automatically reads Tools, Resources, and Prompts after connecting

If your deployment uses a public domain or another entry point instead of http://<IDMP_HOST>:6042, replace the host portion accordingly and keep the MCP path as /api/v1/mcp/stream.

15.2.3 Configuring Common Agents

Different clients may use slightly different field names, but the essential information is always the same: remote URL + Streamable HTTP transport + Authorization header.

15.2.3.1 Claude Code

Claude Code officially supports adding a remote HTTP MCP server from the command line. Use a command like this:

claude mcp add --transport http tdengine-idmp \
http://<IDMP_HOST>:6042/api/v1/mcp/stream \
--header "Authorization: Bearer <IDMP_TOKEN>"

If you want to share the configuration with the current project, add --scope project.

15.2.3.2 Codex

Codex configures remote MCP servers under mcp_servers in ~/.codex/config.toml. A practical setup is to keep the token in an environment variable:

[mcp_servers.tdengine-idmp]
url = "http://<IDMP_HOST>:6042/api/v1/mcp/stream"
bearer_token_env_var = "IDMP_TOKEN"

Before starting Codex, make sure the IDMP_TOKEN environment variable is available in the current shell.

15.2.3.3 Copilot CLI

GitHub Copilot CLI officially supports adding remote MCP servers through the interactive /mcp add command. Inside an interactive copilot session, run:

/mcp add

Then fill in the form with values like these:

FieldValue
Server Nametdengine-idmp
Server TypeHTTP
URLhttp://<IDMP_HOST>:6042/api/v1/mcp/stream
HTTP Headers{"Authorization":"Bearer <IDMP_TOKEN>"}
Tools*

You can also edit Copilot CLI's configuration file directly at ~/.copilot/mcp-config.json:

{
"mcpServers": {
"tdengine-idmp": {
"type": "http",
"url": "http://<IDMP_HOST>:6042/api/v1/mcp/stream",
"headers": {
"Authorization": "Bearer <IDMP_TOKEN>"
},
"tools": [
"*"
]
}
}
}

15.2.4 MCP Surface Summary

TypeDescription
ToolsQuery tools plus a controlled write surface for elements, attributes, events, analyses, and panels
ResourcesDynamic resources for hierarchy, templates, event templates, and analysis algorithms
PromptsStructured workflows for handover, health checks, alarm triage, root-cause analysis, and more

15.2.5 Tool Categories

CategoryRepresentative toolsWhat they cover
Elements and hierarchyget_element_context, search_elements, get_element_by_path, list_element_children, count_branch_elementsElement context, hierarchy lookup, branch navigation, and scoped discovery
Attribute dataget_attribute_value, get_attribute_history, get_batch_attribute_data, search_attributesCurrent values, time-series history, and cross-element attribute queries
Events and notificationslist_events, get_event, acknowledge_event, add_event_annotation, get_notification_historyEvent querying, alarm acknowledgement, annotation, and notification tracing
Analyseslist_analyses, get_analysis, add_analysis, create_analysis, create_alarm_rule, manage_analysisReading, creating, pausing, resuming, and deleting analysis tasks
Panels and dashboardslist_panels, get_panel, add_panel, create_panel, delete_panel, search_dashboardsQuerying, generating, creating, and deleting panels, plus dashboard search
AI and system metadataask_idmp, recommend_analyses, recommend_panels, get_system_config, list_categoriesBuilt-in AI calls plus system metadata and category lookup

The write surface is intentionally limited to a scoped set of tools: acknowledge_event, add_event_annotation, add_analysis, create_analysis, create_alarm_rule, manage_analysis, add_panel, create_panel, delete_panel, create_attribute, create_element_annotation, and update_contact_point.

15.2.6 Dynamic Resources

ResourceWhen to use itReturned content
idmp://hierarchyBefore resolving elements by name or building full asset-tree contextA flat element hierarchy with id, name, parentId, and template metadata
idmp://element-templatesBefore designing panels, analyses, or attribute queriesElement templates and their standard attribute definitions
idmp://event-templatesBefore interpreting event template IDs, severities, and alarm semanticsEvent template definitions
idmp://analysis-algorithmsBefore creating analyses so the client can inspect supported trigger and algorithm typesAnalysis algorithm and trigger metadata

15.2.7 Prompt Workflows

PromptTypical useSuggested tool flow
shift_handoverGenerate a structured shift handover reportget_element_contextlist_eventslist_element_annotationslist_analyses
equipment_health_checkRun a health assessment for one equipment elementget_element_contextask_idmp
root_cause_analysisInvestigate one alarm or eventget_eventget_element_contextget_attribute_historyget_event_annotations
batch_reviewReview one batch or time-bounded operationget_element_contextlist_eventsget_attribute_historylist_analyses
fleet_comparisonCompare all elements of the same typelist_elementsget_element_contextlist_eventsask_idmp
maintenance_dueBuild a maintenance-due report for child equipmentget_element_contextlist_eventslist_element_annotationsask_idmp
alarm_triagePrioritize system-wide unacknowledged alarmsget_event_count_unacknowledgedlist_eventsget_eventget_element_contextask_idmp

15.2.8 Common Usage Patterns

ScenarioRecommended flow
Element lookup and context gatheringidmp://hierarchyget_element_context → add get_attribute_value, list_events, or list_panels as needed
Single-equipment health checkget_element_contextequipment_health_check, or pass a compact context summary into ask_idmp
Alarm triageget_event_count_unacknowledgedlist_eventsget_eventget_element_contextalarm_triage
Root-cause analysisget_eventget_element_contextget_attribute_historyget_event_annotationsroot_cause_analysis
Creating analyses or panelsidmp://analysis-algorithms / idmp://element-templatescreate_attribute (if an output attribute is needed) → add_analysis / create_analysis or add_panel / create_panel

If your client supports prompts, start with shift_handover, equipment_health_check, or root_cause_analysis instead of building the tool sequence manually.