Skip to main content
Community site session details

Community site session details

Session Id : Z4x5ixXdsrcZcoqf+J0CNb
Copilot Studio - Model Context Protocol
Suggested answer

MCP Server Integration

Like (1) ShareShare
ReportReport
Posted on 13 May 2025 23:05:38 by 2
Created a custom connector to link my mcp server to the copilot agent as an action and keep getting an error, I tried multiple yaml files as below. Been struggling to get this to work for days now. Please help

 

Sorry, something went wrong. Error code: SystemError. Conversation ID: 4f93e94f-82f3-4e14-8b8a-c01b968bdb87. Time (UTC): 5/13/2025 10:58:49 PM.

yaml file

swagger: '2.0'
info:
  title: MCP Utility Server
  description: >
    Provides tools for multiplication, temperature conversion, and weather info
    via MCP server.
  version: '1.0'
host: s1mcpserver.azurewebsites.net
basePath: /
schemes:
  - https
definitions:
  QueryResponse:
    type: object
    properties:
      jsonrpc:
        type: string
      id:
        type: string
      method:
        type: string
      params:
        type: object
      result:
        type: object
      error:
        type: object
paths:
  /sse:
    get:
      summary: MCP Server SSE Session
      parameters:
        - in: query
          name: sessionId
          type: string
          required: false
      produces:
        - application/json
      responses:
        '200':
          description: SSE connection established
          schema:
            $ref: '#/definitions/QueryResponse'
        '201':
          description: Session created, waiting for tool invocation
      operationId: MCPServerSSE
      tags:
        - Agentic
        - McpSse
securityDefinitions: {}
security: []
 

  • CU13052300-0 Profile Picture
    2 on 28 May 2025 at 15:21:22
    MCP Server Integration
    How do I add the fully qualified url....

    https://s1mcpserver.azurewebsites.net/sse

     
    event: endpoint
    data: /message?sessionId=RgSacpbNA89ndf-_EjRjFA
    
    .net core 9
    
    Progam.cs
    
    using McpServer.Tools;
    using ModelContextProtocol;
    using ModelContextProtocol.Server;
    
    var builder = WebApplication.CreateBuilder(args);
    
    // Add MCP server services
    builder.Services.AddMcpServer()
        
        .WithTools<MultiplicationTool>()
        .WithTools<TemperatureConverterTool>()
        .WithTools<WeatherTools>();
    
    // Add CORS for SSE support in browsers
    builder.Services.AddCors(options =>
    {
        options.AddDefaultPolicy(policy =>
        {
            policy.AllowAnyOrigin()
                  .AllowAnyHeader()
                  .AllowAnyMethod();
        });
    });
    
    var app = builder.Build();
    
    // Configure the HTTP request pipeline
    if (app.Environment.IsDevelopment())
    {
        app.UseDeveloperExceptionPage();
    }
    
    // Enable CORS
    app.UseCors();
    
    // Map MCP endpoints
    app.MapMcp();
    
    // Add a simple home page
    app.MapGet("/", () => "MCP Server on Azure App Service - Ready for use with SSE");
    
    app.Run();
    
    
  • zankard Profile Picture
    Moderator on 14 May 2025 at 17:42:39
    MCP Server Integration
     
    Please ensure your endpoint returned in the open SSE connection call is a fully qualified URL.
     
    For example:
    By default, most standard SDK configurations return something like this:
    event: endpoint
    data: /message 

    But, Copilot Studio requires a fully qualified URI:
    event: endpoint
    data: https://microsoft.com/mcp/message [microsoft.com]

     
    You can find more resources and context in our Model Context Protocol community forum - feel free to check it out! aka.ms/mcsmcpcommunity 
  • Suggested answer
    jamiem Profile Picture
    Microsoft Employee on 14 May 2025 at 17:41:53
    MCP Server Integration
    Hi @CU13052300-0 - the MCP Community should be able to help you with this: aka.ms/mcsmcpcommunity

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 468 Super User 2025 Season 2

#2
stampcoin Profile Picture

stampcoin 52 Super User 2025 Season 2

#3
trice602 Profile Picture

trice602 46 Super User 2025 Season 2

Loading complete