darrenjrobinson/PowerShellMCPAzureFuncServer
If you are the rightful owner of PowerShellMCPAzureFuncServer and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server that bridges PowerShell modules with MCP-compatible applications using Azure Functions for cost-effective serverless deployment.
PowerShell MCP Azure Function Server (.NET)
A Model Context Protocol (MCP) server that exposes PowerShell modules as MCP tools via Azure Functions using .NET. This project demonstrates how to bridge PowerShell functionality with MCP-compatible applications using Windows Azure Functions for cost-effective serverless deployment.
Features
- JWT Analysis: Decode JWT tokens with full claims and expiry information
- X509 Certificate Analysis: Parse and analyze X509 certificates with detailed information
- MCP Integration: Expose PowerShell modules as standardized MCP tools
- Azure Functions (.NET): Serverless deployment with HTTP triggers on Windows
- Cost Effective: Uses Windows Consumption plan instead of expensive Premium plans required for PowerShell on Linux
PowerShell Modules
This project includes two PowerShell modules:
JWTDetails
- Decodes JWT access tokens
- Provides readable expiry times
- Extracts all token claims and signature details
X509Details
- Decodes X509 certificates
- Shows certificate expiry information
- Calculates time to expiry
- Supports multiple certificate formats
Quick Start
-
Prerequisites
- .NET 8 SDK
- Azure Functions Core Tools >= 4.0.7030
- PowerShell 7+
- Azure Developer CLI (optional)
-
Local Development
# Navigate to source directory cd src # Restore packages dotnet restore # Start the function locally func start
-
Testing
- Access the health endpoint:
http://localhost:7071/api/health
- Use MCP-compatible applications to connect to the server
- Test with included PowerShell scripts:
test_mcp_server.ps1
andtest_modules.ps1
- Access the health endpoint:
Usage
JWT Token Analysis
{
"tool": "jwt_details",
"arguments": {
"token": "eyJ0eXAiOiJKV1Q..."
}
}
X509 Certificate Analysis
{
"tool": "x509_details",
"arguments": {
"cert": "MIIDQTCCAimgAwIBAgI..."
}
}
Architecture
This project demonstrates how to expose PowerShell modules through Azure Functions (.NET) as MCP tools. The solution leverages Windows Azure Functions for cost-effective deployment while maintaining native PowerShell execution capabilities.
Deployment
Deploy to Azure using Azure Developer CLI:
# Deploy infrastructure and application
azd up
Or deploy manually:
# Deploy to Azure Functions
func azure functionapp publish <function-app-name>
License
MIT License - see for details.
Author
Created by Darren J Robinson - demonstrating PowerShell module integration with MCP protocol.