Azure Management MCP Server
Azure Management MCP Server
Manage Azure Virtual Networks, DNS, and Functions through Claude Desktop using natural language.
๐ฆ What's Included
This package contains everything you need to set up an MCP (Model Context Protocol) server that extends Claude Desktop with Azure management capabilities.
Files in This Package:
- BLOG_POST_COMPLETE_GUIDE.md - Complete tutorial (START HERE!)
- azure_mcp_server.py - The MCP server script (template with placeholders)
- requirements.txt - Python dependencies for easy installation
- SETUP_CHECKLIST.md - Step-by-step checklist to track your progress
- README.md - This file
๐ Quick Start
1. Read the Complete Guide
Open BLOG_POST_COMPLETE_GUIDE.md and follow along. It contains:
- Prerequisites
- Step-by-step installation instructions
- Configuration guide
- Usage examples
- Troubleshooting
2. Use the Checklist
Open SETUP_CHECKLIST.md and check off each step as you complete it. This ensures you don't miss anything.
3. Install Dependencies
pip install -r requirements.txt
Or manually:
pip install mcp azure-identity azure-mgmt-network azure-mgmt-dns azure-mgmt-resource azure-mgmt-web azure-mgmt-storage requests
๐ Prerequisites
Before you begin, you need:
- ✅ Python 3.10 or higher
- ✅ Azure account (free tier works)
- ✅ Claude Desktop installed
- ✅ Azure CLI installed
- ✅ 30-45 minutes
๐ฏ What This MCP Server Can Do
Virtual Networks
- List all VNets
- Create new VNets
- List subnets
- Create subnets
DNS Management
- List DNS zones
- Create DNS zones
- Create DNS records (A, CNAME, TXT)
Azure Functions
- List Function Apps
- Create Function Apps (Python, Node.js, .NET, Java)
- Start/Stop/Restart Function Apps
- Deploy functions from ZIP files
General
- Check Azure subscription status
- List resource groups
๐ง Installation Overview
- Install Azure CLI - Manage Azure from command line
- Install Python - Required to run the MCP server
- Create Service Principal - Azure credentials for the server
- Install Python packages - Azure SDK and MCP framework
- Configure the script - Add your credentials
- Configure Claude Desktop - Connect the MCP server
- Test - Verify everything works
Full instructions in BLOG_POST_COMPLETE_GUIDE.md
⚙️ Configuration
Step 1: Edit the Script
Open azure_mcp_server.py and replace these placeholders:
TENANT_ID = "YOUR_TENANT_ID_HERE" # Your Azure tenant ID
CLIENT_ID = "YOUR_CLIENT_ID_HERE" # Service principal client ID
CLIENT_SECRET = "YOUR_CLIENT_SECRET_HERE" # Service principal secret
SUBSCRIPTION_ID = "YOUR_SUBSCRIPTION_ID_HERE" # Azure subscription ID
Step 2: Configure Claude Desktop
Edit Claude Desktop's config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"azure-management": {
"command": "python",
"args": [
"/FULL/PATH/TO/azure_mcp_server.py"
]
}
}
}
Important: Use the full absolute path to the script!
Step 3: Restart Claude Desktop
Completely quit and restart Claude Desktop.
๐งช Testing
Once configured, test with these commands in Claude Desktop:
Check my Azure subscription status
List all my resource groups
List all my virtual networks
If these work, you're all set! ๐
๐ก Usage Examples
Create a Virtual Network
Create a virtual network named "prod-vnet" in resource group "network-rg"
in East US with address space 10.0.0.0/16
Create a Function App
Create a Python Function App named "my-api" in resource group "app-rg"
in East US with storage account "myapistorage123"
Manage DNS
Create a DNS zone for "example.com" in resource group "dns-rg"
Create an A record named "www" in zone "example.com" pointing to 1.2.3.4
๐ Security Notes
Important Security Practices:
-
Never commit credentials to Git
# Add to .gitignore echo "azure_mcp_server.py" >> .gitignore -
Keep the script file secure
- Don't share it with credentials in it
- Don't upload to public repositories
- Store in a secure location
-
Rotate credentials regularly
- Every 6-12 months
- After any security incident
- When team members leave
-
Use least privilege
- Only grant necessary permissions
- Use resource-specific roles when possible
-
Monitor Azure activity
- Check activity logs regularly
- Set up cost alerts
- Enable Azure Security Center
๐ Troubleshooting
MCP Server Not Showing
Check:
- Path in config is absolute (full path)
- JSON syntax is valid
- Claude Desktop was completely restarted
Authentication Failed
Check:
- Credentials in script are correct
- Service principal has Contributor role
- Subscription ID is correct
Module Not Found
Fix:
pip install -r requirements.txt
Python Command Not Found
Windows: Use python in config
Mac/Linux: Use python3 in config
๐ Additional Resources
๐ Getting Help
If You're Stuck:
- ✅ Review BLOG_POST_COMPLETE_GUIDE.md thoroughly
- ✅ Check SETUP_CHECKLIST.md - did you complete all steps?
- ✅ Look at the Troubleshooting sections
- ✅ Verify all prerequisites are installed
- ✅ Check Azure Portal for permission issues
๐ What's Next?
Once your MCP server is working:
Expand Functionality
- Add more Azure services (Storage, VMs, Databases)
- Create custom workflows
- Add organization-specific features
Automate Tasks
- Environment setup scripts
- Resource cleanup routines
- Deployment pipelines
Share with Team
- Create team-specific MCP server
- Enforce naming conventions
- Add compliance checks
๐ Learning Path
Beginner
- Follow the complete guide
- Create your first VNet
- Set up a DNS zone
- Deploy a simple Function App
Intermediate
- Automate environment creation
- Set up multi-region deployments
- Implement tagging strategies
- Create monitoring dashboards
Advanced
- Add custom Azure services
- Implement CI/CD with MCP
- Build team collaboration features
- Create compliance automation
⚖️ License
This project is provided as-is for educational and practical purposes.
Important: You are responsible for:
- Securing your Azure credentials
- Managing Azure costs
- Compliance with your organization's policies
- Following Azure's terms of service
๐ Credits
- Built with MCP (Model Context Protocol)
- Uses Azure Python SDK
- Powered by Claude
๐ Quick Stats
- Lines of Code: ~600
- Supported Services: 3 (VNet, DNS, Functions)
- Total Tools: 15+
- Setup Time: 30-45 minutes
- Skill Level: Beginner-friendly
๐ฆ Status Indicators
After setup, you should see:
✅ All Systems Go:
- MCP server shows in Claude Desktop
- Subscription check returns authenticated
- Can list resource groups
- Can list virtual networks
⚠️ Check Setup:
- MCP server not showing
- Authentication errors
- Module import errors
❌ Needs Attention:
- Python not installed
- Azure CLI not installed
- No service principal created
- Config file incorrect
๐ฏ Success Criteria
You've successfully set up the MCP server when:
- ✅ Claude Desktop shows the MCP connection
- ✅
Check my Azure subscription statusreturns authenticated - ✅ You can list Azure resources
- ✅ You can create new resources with natural language commands
- ✅ No error messages appear
๐ Quick Reference
File Locations
Config File:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - Mac:
~/Library/Application Support/Claude/claude_desktop_config.json
Script File:
- Wherever you saved
azure_mcp_server.py
Common Commands
Install dependencies:
pip install -r requirements.txt
Test Azure connection:
az login
az account show
Verify Python:
python --version
Check MCP installation:
pip show mcp
Ready to get started? Open BLOG_POST_COMPLETE_GUIDE.md and begin! ๐
Download Script MCP Script
Last updated: December 2024

Comments
Post a Comment