Problem Statement
Currently, Functions worker runtime (FWR) must be set to custom for custom handlers that are self-hosted MCP servers (i.e., with "configurationProfile": "mcp-custom-handler") in order to run the server locally.
However, when deploying the server to Azure, FWR must be set to a specific language (such as dotnet-isolated, python) and the AzureWebJobsFeatureFlags app setting must also be added. Attempting to add the feature flag to local.settings.json locally does not work, and FWR must be set to custom. This introduces a discrepancy between local development and cloud deployment requirements, causing confusion and extra manual steps.

Requirements
- Local development consistency: When running locally, FWR should support a specific language value (e.g.,
dotnet-isolated) if configurationProfile = mcp-custom-handler or AzureWebJobsFeatureFlags=EnableMcpCustomHandlerPreview is present, instead of requiring FWR to be custom.
- Deployment consistency: Both local and cloud deployment flows honor the same requirements for configuration.
- Backward compatibility: Solutions do not break existing workflows for users not using MCP custom handlers, i.e. if
configurationProfile in host.json doesn't have value mcp-custom-handler, then FWR should be custom.
User Experience
Projects with local.settings.json
{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"AzureWebJobsFeatureFlags": "EnableMcpCustomHandlerPreview"
}
}
and host.json...
{
"version": "2.0",
"configurationProfile": "mcp-custom-handler",
"customHandler": {
"description": {
"defaultExecutablePath": "python",
"arguments": ["weather.py"]
},
"http": {
"DefaultAuthorizationLevel": "anonymous"
},
"port": "8000"
}
}
should run locally without error.
Validation & Diagnostics
- If FWR is set to
custom when configurationProfile=mcp-custom-handler, show clear message about FWR needing to be dotnet-isolated|python|node
Acceptance Criteria
- Local development with
configurationProfile = mcp-custom-handler or AzureWebJobsFeatureFlags=EnableMcpCustomHandlerPreview works with FWR set to a specific language
- Cloud deployment preserves the same configuration requirements.
- Clear diagnostic errors for invalid FWR configuration.
Work Items
FYI @fabiocav @soninaren
Problem Statement
Currently, Functions worker runtime (FWR) must be set to
customfor custom handlers that are self-hosted MCP servers (i.e., with"configurationProfile": "mcp-custom-handler") in order to run the server locally.However, when deploying the server to Azure, FWR must be set to a specific language (such as
dotnet-isolated,python) and theAzureWebJobsFeatureFlagsapp setting must also be added. Attempting to add the feature flag tolocal.settings.jsonlocally does not work, and FWR must be set tocustom. This introduces a discrepancy between local development and cloud deployment requirements, causing confusion and extra manual steps.Requirements
dotnet-isolated) ifconfigurationProfile = mcp-custom-handlerorAzureWebJobsFeatureFlags=EnableMcpCustomHandlerPreviewis present, instead of requiring FWR to becustom.configurationProfilein host.json doesn't have valuemcp-custom-handler, then FWR should becustom.User Experience
Projects with
local.settings.json{ "IsEncrypted": false, "Values": { "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated", "AzureWebJobsFeatureFlags": "EnableMcpCustomHandlerPreview" } }and
host.json...{ "version": "2.0", "configurationProfile": "mcp-custom-handler", "customHandler": { "description": { "defaultExecutablePath": "python", "arguments": ["weather.py"] }, "http": { "DefaultAuthorizationLevel": "anonymous" }, "port": "8000" } }should run locally without error.
Validation & Diagnostics
customwhenconfigurationProfile=mcp-custom-handler, show clear message about FWR needing to bedotnet-isolated|python|nodeAcceptance Criteria
configurationProfile = mcp-custom-handlerorAzureWebJobsFeatureFlags=EnableMcpCustomHandlerPreviewworks with FWR set to a specific languageWork Items
customin local MCP custom-handler scenarios.FYI @fabiocav @soninaren