I have created an MCP Server in .NET C# SDK and deployed via Visual Studio in Azure. However, while creating the custom connection in Power App Platform, I am not able to test the connection successfully. Kindly help with correct specification for MCP Server custom connector in C# .Net Implementation. It works with MCP Inspector, VSCode GitHub Copilot in Agent mode but just not with Copilot Studio.
This is the swagger that shows up -
```
swagger: '2.0'
info:
title: MCP Server
description: >-
This MCP Server will work with Streamable HTTP and is meant to work with
Microsoft Copilot Studio
version: 1.0.0
host: <host>.azurewebsites.net
basePath: /
schemes:
- https
consumes: []
produces: []
paths:
/:
post:
summary: MCP Server Streamable HTTP
x-ms-agentic-protocol: mcp-streamable-1.0
operationId: InvokeServer
responses: {}
definitions: {}
parameters: {}
responses: {}
securityDefinitions: {}
security: []
tags: []
```
## Program.cs
```
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddLogging();
// Register MCP actions
builder.Services.AddScoped<AnalyzeAppInsightsAction>();
builder.Services.AddScoped<TriggerUatDeploymentAction>();
// Add MCP Server with automatic action discovery
builder.Services.AddMcpServer().WithHttpTransport().WithTools<AnalyzeAppInsightsAction>().WithTools<TriggerUatDeploymentAction>();
var app = builder.Build();
// Enable MCP endpoints
app.MapMcp();
app.UseHttpsRedirection();
await app.RunAsync();
```
## Tool/Action -
```
[McpServerToolType]
public class AnalyzeAppInsightsAction
{
[McpServerTool, Description("Analyzes Application Insights.")]
public async Task<JsonElement> AppInsightsLoad(bool input, CancellationToken cancellationToken)
{
/// code here
}
}
```
Stay up to date on forum activity by subscribing.
Romain The Low-Code...
132
Michael E. Gernaey
81
Super User 2025 Season 1
Pablo Roldan
61