Skip to content

Conversation

@nturinski
Copy link
Member

@nturinski nturinski commented Nov 13, 2025

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.
image

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 the mcp.json for 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.)

getMcpHostKey is 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 a command. That command is getMcpHostKey with 2 arguments, resourceId and projectType. (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.json which may go up into SCM.

The keys differ slightly depending on the scenario:

  • For self-hosted MCP servers, we can rely on the default key that every function app has.
  • For MCP extension servers, we need to use a system key called mcp_extension This key gets created by the runtime if the host.json has the extensions.mcp property 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.mcp property. 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.

MicroFish91
MicroFish91 previously approved these changes Nov 14, 2025
Base automatically changed from nat/mcpExtensionTriggerCreate to main November 14, 2025 02:06
@nturinski nturinski dismissed MicroFish91’s stale review November 14, 2025 02:06

The base branch was changed.

MicroFish91
MicroFish91 previously approved these changes Nov 14, 2025
Copy link
Contributor

@MicroFish91 MicroFish91 left a 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

@nturinski
Copy link
Member Author

LGTM - although I think there's still a build issue showing up

image 🥹

@nturinski nturinski enabled auto-merge (squash) November 15, 2025 02:09
@nturinski nturinski disabled auto-merge November 15, 2025 06:56
@nturinski nturinski closed this Nov 15, 2025
@nturinski nturinski reopened this Nov 15, 2025
@nturinski nturinski enabled auto-merge (squash) November 15, 2025 09:57
@nturinski nturinski merged commit 77c94a4 into main Nov 18, 2025
4 checks passed
@nturinski nturinski deleted the nat/mcpDeployment branch November 18, 2025 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants