Add Azure Device Registry tool to Azure MCP Server #1961
Open
nimengan wants to merge 6 commits intomicrosoft:mainfrom
Open
Add Azure Device Registry tool to Azure MCP Server #1961nimengan wants to merge 6 commits intomicrosoft:mainfrom
nimengan wants to merge 6 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Azure Device Registry tool area to the Azure MCP Server, introducing a first command to list Device Registry namespaces via the server’s command/tool framework.
Changes:
- Introduces new
Azure.Mcp.Tools.DeviceRegistrytool project withdeviceregistry namespace listcommand and supporting service/models. - Adds unit tests + live/recorded-test scaffolding and test resource deployment templates for the new tool.
- Wires the tool into Azure MCP Server registration and documentation/metadata (docs, consolidated tools, CODEOWNERS, solutions, packages, changelog entry).
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.DeviceRegistry/src/Azure.Mcp.Tools.DeviceRegistry.csproj | New tool project with dependencies and AOT compatibility setting. |
| tools/Azure.Mcp.Tools.DeviceRegistry/src/GlobalUsings.cs | Adds project-wide System.CommandLine global using. |
| tools/Azure.Mcp.Tools.DeviceRegistry/src/AssemblyInfo.cs | Exposes internals to unit/live test assemblies. |
| tools/Azure.Mcp.Tools.DeviceRegistry/src/DeviceRegistrySetup.cs | Registers DI services and command groups for the new area. |
| tools/Azure.Mcp.Tools.DeviceRegistry/src/Commands/BaseDeviceRegistryCommand.cs | Base command type for Device Registry commands (subscription-based). |
| tools/Azure.Mcp.Tools.DeviceRegistry/src/Commands/DeviceRegistryJsonContext.cs | Source-generated System.Text.Json context for tool payloads. |
| tools/Azure.Mcp.Tools.DeviceRegistry/src/Commands/Namespace/NamespaceListCommand.cs | Implements the namespace list command and tool response shaping. |
| tools/Azure.Mcp.Tools.DeviceRegistry/src/Models/DeviceRegistryNamespaceInfo.cs | Output model for namespace list results. |
| tools/Azure.Mcp.Tools.DeviceRegistry/src/Options/BaseDeviceRegistryOptions.cs | Base options for Device Registry commands (subscription). |
| tools/Azure.Mcp.Tools.DeviceRegistry/src/Options/DeviceRegistryOptionDefinitions.cs | Adds a --namespace option definition (for future commands). |
| tools/Azure.Mcp.Tools.DeviceRegistry/src/Options/Namespace/NamespaceListOptions.cs | Options type for namespace list command. |
| tools/Azure.Mcp.Tools.DeviceRegistry/src/Services/IDeviceRegistryService.cs | Service contract for namespace listing. |
| tools/Azure.Mcp.Tools.DeviceRegistry/src/Services/DeviceRegistryService.cs | Resource Graph-backed implementation for listing namespaces. |
| tools/Azure.Mcp.Tools.DeviceRegistry/src/Services/Models/DeviceRegistryNamespaceData.cs | Resource Graph deserialization models. |
| tools/Azure.Mcp.Tools.DeviceRegistry/tests/Azure.Mcp.Tools.DeviceRegistry.UnitTests/Azure.Mcp.Tools.DeviceRegistry.UnitTests.csproj | New unit test project for the tool. |
| tools/Azure.Mcp.Tools.DeviceRegistry/tests/Azure.Mcp.Tools.DeviceRegistry.UnitTests/Namespace/NamespaceListCommandTests.cs | Unit tests for namespace list behavior and error handling. |
| tools/Azure.Mcp.Tools.DeviceRegistry/tests/Azure.Mcp.Tools.DeviceRegistry.LiveTests/Azure.Mcp.Tools.DeviceRegistry.LiveTests.csproj | New live/recorded test project for server-integrated tool invocation. |
| tools/Azure.Mcp.Tools.DeviceRegistry/tests/Azure.Mcp.Tools.DeviceRegistry.LiveTests/assets.json | Recording assets configuration for externalized recordings. |
| tools/Azure.Mcp.Tools.DeviceRegistry/tests/Azure.Mcp.Tools.DeviceRegistry.LiveTests/DeviceRegistryCommandTests.cs | Live tests invoking deviceregistry_namespace_list. |
| tools/Azure.Mcp.Tools.DeviceRegistry/tests/test-resources.bicep | Deploys Device Registry namespace + RBAC for test principal. |
| tools/Azure.Mcp.Tools.DeviceRegistry/tests/test-resources-post.ps1 | Post-deploy script for test resource deployment. |
| servers/Azure.Mcp.Server/src/Program.cs | Registers the new Device Registry area setup. |
| servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json | Adds consolidated tool mapping for Device Registry namespace listing. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Documents the new azmcp deviceregistry namespace list CLI command. |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Adds e2e prompts for the new tool. |
| servers/Azure.Mcp.Server/changelog-entries/1772227057670.yaml | Adds changelog entry for the new command. |
| Directory.Packages.props | Introduces Azure.ResourceManager.DeviceRegistry package version pin. |
| servers/Azure.Mcp.Server/Azure.Mcp.Server.slnx | Adds DeviceRegistry projects to the server solution filter. |
| Microsoft.Mcp.slnx | Adds DeviceRegistry projects to the root solution filter. |
| .github/CODEOWNERS | Adds code ownership rules for the new tool directory. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a new Azure.Mcp.Tools.DeviceRegistry toolset with the deviceregistry_namespace_list command, which lists Azure Device Registry namespaces in a specified subscription and optional resource group
[Any additional context, screenshots, or information that helps reviewers]GitHub issue number?
#1962
Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.mdand/orservers/Fabric.Mcp.Server/CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies)servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationeng/scripts/Process-PackageReadMe.ps1. See Package README/servers/Azure.Mcp.Server/docs/azmcp-commands.mdand/or/docs/fabric-commands.md.\eng\scripts\Update-AzCommandsMetadata.ps1to update tool metadata in azmcp-commands.md (required for CI)ToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.json/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline