Skip to content

Conversation

@anuchandy
Copy link
Member

@anuchandy anuchandy commented Sep 4, 2025

What does this PR do?

[Provide a clear, concise description of the changes]

adding an insecure, undocumented switch to begin the early exploration of self-hosted remote mcp server.

[Any additional context, screenshots, or information that helps reviewers]

GitHub issue number?

[Link to the GitHub issue this PR addresses]

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
    • Spelling check passes: .\eng\common\spelling\Invoke-Cspell.ps1
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated README.md documentation
    • Updated command list in /docs/azmcp-commands.md
    • Updated test prompts in /docs/e2eTestPrompts.md
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
  • 👉 For Community (non-Azure team member) PRs:
    • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
    • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

@anuchandy anuchandy self-assigned this Sep 4, 2025
Copilot AI review requested due to automatic review settings September 4, 2025 01:59
@anuchandy anuchandy requested a review from a team as a code owner September 4, 2025 01:59
@anuchandy anuchandy requested a review from hallipr September 4, 2025 01:59
@github-project-automation github-project-automation bot moved this to Untriaged in Azure MCP Server Sep 4, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces HTTP transport support for the MCP server as an alternative to the default STDIO transport. The changes add a new command-line option --enable-insecure-transports that allows the server to run over HTTP with CORS enabled for development purposes.

Key changes:

  • Adds HTTP transport capability with CORS configuration
  • Introduces security validation requiring production credentials when enabling insecure transports
  • Updates package dependencies to support the new HTTP transport functionality

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Azure.Mcp.Core.csproj Adds ModelContextProtocol.AspNetCore package reference for HTTP transport
ServiceStartOptions.cs Adds EnableInsecureTransports property to configuration options
ServiceOptionDefinitions.cs Defines the new command-line option for enabling insecure transports
ServiceStartCommand.cs Implements HTTP host creation and security validation logic
ServiceCollectionExtensions.cs Configures MCP server with appropriate transport based on options
Directory.Packages.props Updates ModelContextProtocol package versions and adds AspNetCore variant
Comments suppressed due to low confidence (1)

core/Azure.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs:1

  • According to the coding guidelines, System.Text.Json should be used instead of Newtonsoft.Json. Consider migrating to System.Text.Json for consistency.
// Copyright (c) Microsoft Corporation.

@anuchandy
Copy link
Member Author

anuchandy commented Sep 4, 2025

@LarryOsterman, here is the pr based on our offline discussion

@xiangyan99
Copy link
Member

Will this trigger the security concern again?

@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure MCP Server Sep 4, 2025
@joshfree joshfree enabled auto-merge (squash) September 4, 2025 20:22
@joshfree joshfree merged commit 2b08327 into microsoft:main Sep 4, 2025
26 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure MCP Server Sep 4, 2025
feiskyer pushed a commit to feiskyer/microsoft-mcp that referenced this pull request Sep 8, 2025
* Updated live tests

* Added unit test for list keys

* Added unit tests for get key

* Added unit tests for create key

* Refactored code and removed unnecessary tests
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Sep 27, 2025
* Enable enable-insecure-transports option

* Check for ProdCred for streaming

* allow standard ASPNETCORE_URLS and fix message

* address cspell

* improve message

* adding GetSafeAspNetCoreUrl

* restrict further
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants