Skip to content

On boarding IoTHub toolset#3005

Open
jichang1 wants to merge 4 commits into
mainfrom
jichang/hubonboarding
Open

On boarding IoTHub toolset#3005
jichang1 wants to merge 4 commits into
mainfrom
jichang/hubonboarding

Conversation

@jichang1

@jichang1 jichang1 commented Jul 8, 2026

Copy link
Copy Markdown

What does this PR do?

[Provide a clear, concise description of the changes]
On boarding Azure IoT Hub to Azure MCP Server

[Add additional context, screenshots, or information that helps reviewers]

GitHub issue number?

[Link to the GitHub issue this PR addresses]
#2917

Pre-merge Checklist

  • [] Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Created a changelog entry if the change falls among the following: new feature, bug fix, UI/UX update, breaking change, or updated dependencies. Follow the changelog entry guide
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes running the script ./eng/scripts/Process-PackageReadMe.ps1. See Package README
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • For renamed tools, follow the Tool Rename Checklist and tag the PR with the breaking-change label
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated command list in servers/Azure.Mcp.Server/docs/azmcp-commands.md
    • Ran ./eng/scripts/Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • Updated test prompts in servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

Copilot AI review requested due to automatic review settings July 8, 2026 05:47
@jichang1 jichang1 requested review from a team as code owners July 8, 2026 05:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Onboards a new Azure IoT Hub toolset into the Azure MCP Server, including a first command (azmcp iothub hub get) backed by Resource Graph queries, plus test infrastructure and documentation updates so the tool is discoverable and runnable in CI/live test flows.

Changes:

  • Added the iothub hub get command, options, models, service implementation, and JSON source-gen context for AOT-friendly output.
  • Added unit tests and recorded live tests plus Bicep/ARM test resource templates and post-deploy script.
  • Wired the toolset into the server (area registration + consolidated tool mapping) and updated docs/changelog/CODEOWNERS.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/Azure.Mcp.Tools.IoTHub/tests/test-resources.json Generated ARM template for IoTHub test resources.
tools/Azure.Mcp.Tools.IoTHub/tests/test-resources.bicep Bicep template deploying an IoT Hub and RBAC for test execution.
tools/Azure.Mcp.Tools.IoTHub/tests/test-resources-post.ps1 Post-deployment hook to write test settings / confirm outputs.
tools/Azure.Mcp.Tools.IoTHub/tests/Azure.Mcp.Tools.IoTHub.UnitTests/IoTHub/IoTHubGetCommandTests.cs Unit tests validating binding, serialization, and error handling for iothub hub get.
tools/Azure.Mcp.Tools.IoTHub/tests/Azure.Mcp.Tools.IoTHub.UnitTests/Azure.Mcp.Tools.IoTHub.UnitTests.csproj Adds the IoTHub unit test project.
tools/Azure.Mcp.Tools.IoTHub/tests/Azure.Mcp.Tools.IoTHub.LiveTests/IoTHubCommandTests.cs Recorded live tests exercising list/get flows via the tool name iothub_hub_get.
tools/Azure.Mcp.Tools.IoTHub/tests/Azure.Mcp.Tools.IoTHub.LiveTests/Azure.Mcp.Tools.IoTHub.LiveTests.csproj Adds the IoTHub live test project and references required test infrastructure.
tools/Azure.Mcp.Tools.IoTHub/tests/Azure.Mcp.Tools.IoTHub.LiveTests/assets.json Enables recorded-test playback via azure-sdk-assets tag metadata.
tools/Azure.Mcp.Tools.IoTHub/src/Services/IoTHubService.cs Implements IoT Hub discovery/details via BaseAzureResourceService Resource Graph queries.
tools/Azure.Mcp.Tools.IoTHub/src/Services/IIoTHubService.cs Defines the IoTHub service interface contract.
tools/Azure.Mcp.Tools.IoTHub/src/Options/IoTHub/IoTHubGetOptions.cs Adds CLI option POCO for iothub hub get.
tools/Azure.Mcp.Tools.IoTHub/src/Models/IoTHubDescription.cs Adds the response model returned from the get/list command.
tools/Azure.Mcp.Tools.IoTHub/src/IoTHubSetup.cs Registers the IoTHub area, DI services, and command groups.
tools/Azure.Mcp.Tools.IoTHub/src/GlobalUsings.cs Introduces global usings for the toolset project.
tools/Azure.Mcp.Tools.IoTHub/src/Commands/IoTHubJsonContext.cs Registers response models in a source-generated JSON context for AOT safety.
tools/Azure.Mcp.Tools.IoTHub/src/Commands/IoTHub/IoTHubGetCommand.cs Adds the azmcp iothub hub get command implementation and tool metadata.
tools/Azure.Mcp.Tools.IoTHub/src/Azure.Mcp.Tools.IoTHub.csproj New IoTHub toolset project definition and dependencies.
tools/Azure.Mcp.Tools.IoTHub/src/AssemblyInfo.cs InternalsVisibleTo for unit/live test projects.
servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json Adds iothub_hub_get into the “messaging services details” consolidated tool mapping.
servers/Azure.Mcp.Server/src/Program.cs Registers the IoTHub area in the Azure MCP Server.
servers/Azure.Mcp.Server/README.md Documents IoTHub capabilities and example prompts.
servers/Azure.Mcp.Server/docs/e2eTestPrompts.md Adds e2e prompts for iothub_hub_get.
servers/Azure.Mcp.Server/docs/azmcp-commands.md Adds CLI documentation entry for azmcp iothub hub get.
servers/Azure.Mcp.Server/changelog-entries/jichang1-add-iothub-docs-integration.yml Changelog entry for IoTHub onboarding/doc + integration updates.
servers/Azure.Mcp.Server/Azure.Mcp.Server.slnx Includes IoTHub toolset + test projects in the server solution.
Microsoft.Mcp.slnx Includes IoTHub toolset + test projects in the repo solution.
Directory.Packages.props Adds central package version for Azure.ResourceManager.IotHub.
.github/CODEOWNERS Adds ownership/labels for the new IoTHub toolset path.

Comment thread tools/Azure.Mcp.Tools.IoTHub/src/Azure.Mcp.Tools.IoTHub.csproj Outdated
Comment thread Directory.Packages.props Outdated
@jichang1 jichang1 changed the title on boarding IoTHub toolset On boarding IoTHub toolset Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants