Skip to main content
Glama

Azure MCP Server

Official
MIT License
1,161
  • Linux
  • Apple
Update-Solution.ps11.72 kB
#!/bin/env pwsh #Requires -Version 7 [CmdletBinding()] param( [switch] $SetDevOpsVariables ) . "$PSScriptRoot/../common/scripts/common.ps1" function Get-ProjectIds { param ( [string] $slnFilePath ) $projectIds = @{} if (Test-Path $slnFilePath) { $slnContent = Get-Content $slnFilePath foreach ($line in $slnContent) { if ($line -match 'Project\("(?<type>[^"]+)"\) = "(?<name>[^"]+)", "(?<path>[^"]+)", "(?<id>[^"]+)"') { $path = $matches['path'] $id = $matches['id'] if($path -like '*.csproj') { $projectIds[$path] = $id } } } } return $projectIds } Push-Location $RepoRoot try { $slnFile = Get-Item 'AzureMcp.sln' -ErrorAction SilentlyContinue $projectIds = @{} if ($slnFile) { $projectIds = Get-ProjectIds $slnFile Remove-Item $slnFile -Force } dotnet new sln -n 'AzureMcp' $projects = Get-ChildItem -Path "$RepoRoot" -Filter "*.csproj" -Recurse | Sort-Object -Property FullName foreach ($project in $projects) { dotnet sln add $project } # Read the new project ids from the solution file $newProjectIds = Get-ProjectIds 'AzureMcp.sln' # Replace the new ids with the old ones $slnContent = Get-Content 'AzureMcp.sln' -Raw foreach ($path in $projectIds.Keys) { if ($newProjectIds.ContainsKey($path)) { $newId = $newProjectIds[$path] $originalId = $projectIds[$path] $slnContent = $slnContent.Replace($newId, $originalId) } } Set-Content 'AzureMcp.sln' -Value $slnContent } finally { Pop-Location }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Azure/azure-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server