-
Notifications
You must be signed in to change notification settings - Fork 147
Support deploying MCP extension triggers and self-hosted MCP servers #4791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Nov 13, 2025
MicroFish91
previously approved these changes
Nov 14, 2025
MicroFish91
previously approved these changes
Nov 14, 2025
Contributor
MicroFish91
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - although I think there's still a build issue showing up
Member
Author
MicroFish91
approved these changes
Nov 18, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

The deployment scenario applies to both MCP extension triggers and self-hosted MCP servers with some small nuanced differences.
The first change is for finding the subscription from a Azure resource ID. But if we can't find it for some reason, I fall back to prompting the user for it.
We used to not have to check any app settings for flex, but since this is only on flex and we need the feature flag, I had to change that behavior.
On deployment, there's a new notification message that has embedded links. Those are next steps that help explain easy auth (using Entra ID) and something foundry related. I didn't dig too deep into these, but Lily wanted to guide users to these docs.
There's also a connect server button.

The remote server is automatically added to the
mpc.json(if it doesn't already exist). The connect server button is there to alert the user and opens themcp.jsonfor them.When checking for feature flags, I'm comparing what's in the app settings and what's in the local.settings.json. I just make a set out of them to remove duplicates and then re-join the flags. (Flags are comma-delimited lists, so it looks like
flag1, flag2, flag3, etc.)getMcpHostKeyis an internal command that will get an app key from the function app. If you were paying close attention, you would have seen it got defined in the first PR and it's part of the remote server definition. The remote server definition has an input, and then that input is defined as acommand. ThatcommandisgetMcpHostKeywith 2 arguments,resourceIdandprojectType. (Learn more here)The point of the input is so that we can programmatically grab the host key for the function app without having to hard-code it into their
mcp.jsonwhich may go up into SCM.The keys differ slightly depending on the scenario:
defaultkey that every function app has.mcp_extensionThis key gets created by the runtime if the host.json has theextensions.mcpproperty defined that I discuseed in #4970.I have a work item to throw an error if we can't find the system key because falling back to the default key doesn't work. If the system key isn't there, it means that the func host never saw the
extensions.mcpproperty. This happened to me because while my deployment said succeeded, the app logs said it failed to run because I had two identical IDs for my mcp tool triggers.Lastly, the changes in the host.json definition to support all of these changes.