Azure SDK Samples MCP (Unofficial)

An MCP (Model Context Protocol) server that discovers and retrieves code samples from Azure SDK packages. When working with Azure SDKs, having access to relevant code examples can significantly improve development efficiency and reduce errors. This MCP server automatically discovers Azure SDK samples from your project's dependencies (Cargo, NuGet, pip, Go modules, Maven, npm) and makes them available to AI agents and coding assistants like GitHub Copilot.
Key features:
- Discovers Azure SDK samples from multiple package managers (Cargo, NuGet, pip, Go modules, Maven, npm)
- Lists project dependencies and their available samples
- Integrates seamlessly with AI agents and coding assistants via the MCP protocol
- Supports Rust, .NET, Python, Go, Java, and Node.js projects
Demo

Installation
Install as a Copilot CLI Plugin
Install the plugin using GitHub Copilot CLI:
copilot plugin install heaths/azsdk-samples-mcp
This installs the MCP server and makes it available in all Copilot CLI sessions.
Install as a Global Tool
Alternatively, install the MCP server as a global .NET tool from nuget.org:
dotnet tool install --global AzureSdk.SamplesMcp --prerelease
Clone the Repository (Optional)
If you prefer to run from source or contribute to the project:
git clone https://github.com/heaths/azsdk-samples-mcp.git
cd azsdk-samples-mcp
You can automatically configured the server as described blow:
dotnet run --project src/AzureSdk.SamplesMcp/AzureSdk.SamplesMcp.csproj -- config copilot
Or just build it to configure it manually, also described below:
dotnet build
Configuration
Note: If you installed the Copilot CLI plugin, no additional configuration is needed.
Automatic Configuration
Use the config command to automatically generate MCP configuration files:
# Configure for GitHub Copilot (local - in repository)
azsdk-samples config copilot
# Configure for GitHub Copilot (global)
azsdk-samples config copilot --global
# Configure for VS Code (local only)
azsdk-samples config vscode
# Configure for Claude Code (local)
azsdk-samples config claude
# Configure for Claude Code (global)
azsdk-samples config claude --global
This will create or update the appropriate configuration files:
- Copilot:
.copilot/mcp-config.json (local) or ~/.copilot/mcp-config.json (global)
- VS Code:
.vscode/mcp.json (local only)
- Claude Code:
.mcp.json (local) or ~/.claude.json (global)
Note: For global configurations, the command assumes you have the tool installed globally. For local configurations, it will find your repository root (by looking for .git) and create the config there.
Manual Configuration
For more control or troubleshooting, you can manually configure the MCP server:
Example: Manual VS Code Configuration
Create or edit .vscode/mcp.json in your repository:
{
"servers": {
"azsdk-samples": {
"type": "stdio",
"command": "azsdk-samples"
}
},
"inputs": []
}
Usage
Once integrated into your IDE:
- Ask your AI assistant about Azure SDK samples relevant to your code
- The assistant will have access to real examples from your dependencies
- Get context-specific guidance on how to properly use Azure SDK APIs
Samples
Example applications demonstrating how to use this MCP server: