Skip to content

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Oct 31, 2025

Description

ASPIRE_DASHBOARD_MCP_ENDPOINT_URL values had previously been added to template's launchSettings.json. However config wasn't added to templates to generate a random value for the endpoint when a template was created.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@github-actions
Copy link
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12558

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12558"

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 adds MCP (Model Context Protocol) endpoint configuration to Aspire project templates. MCP endpoints are configured similarly to existing OTLP endpoints with both HTTP and HTTPS variants.

  • Adds port configuration parameters for MCP HTTP (18000) and HTTPS (23000) endpoints across all templates
  • Updates template configuration files to support user-specified or auto-generated MCP ports
  • Adds MCP endpoint environment variables to launch settings

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Aspire.ProjectTemplates/templates/aspire-starter/.template.config/template.json Adds MCP HTTP/HTTPS port parameters with generation and coalescing logic
src/Aspire.ProjectTemplates/templates/aspire-starter/.template.config/dotnetcli.host.json Hides MCP port parameters from CLI interface
src/Aspire.ProjectTemplates/templates/aspire-py-starter/13.0/apphost.run.json Adds MCP endpoint environment variable configuration
src/Aspire.ProjectTemplates/templates/aspire-py-starter/.template.config/template.json Adds MCP HTTP/HTTPS port parameters with generation and coalescing logic
src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/template.json Adds MCP HTTP/HTTPS port parameters with generation and coalescing logic
src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/dotnetcli.host.json Hides MCP port parameters from CLI interface
src/Aspire.ProjectTemplates/templates/aspire-apphost/.template.config/template.json Adds MCP HTTP/HTTPS port parameters with generation and coalescing logic
src/Aspire.ProjectTemplates/templates/aspire-apphost/.template.config/dotnetcli.host.json Hides MCP port parameters from CLI interface
src/Aspire.ProjectTemplates/templates/aspire-apphost-singlefile/.template.config/template.json Adds MCP HTTP/HTTPS port parameters with generation and coalescing logic
src/Aspire.ProjectTemplates/templates/aspire-apphost-singlefile/.template.config/dotnetcli.host.json Hides MCP port parameters from CLI interface

@davidfowl davidfowl merged commit 343737a into main Oct 31, 2025
875 of 881 checks passed
@davidfowl davidfowl deleted the jamesnk/mcp-endpoint-template-fix branch October 31, 2025 22:32
@davidfowl
Copy link
Member

/backport to release/13.0

@dotnet-policy-service dotnet-policy-service bot added this to the 13.1 milestone Oct 31, 2025
@github-actions
Copy link
Contributor

Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/18986770305

@JamesNK
Copy link
Member Author

JamesNK commented Oct 31, 2025

I made this PR at the end of the day and didn't test it before signing off.

Does it work?

@davidfowl
Copy link
Member

I did, yes it does.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants