-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Description
Ask summary
For the Azure Functions: Create new project command, create a new project type called "Self-hosted MCP server" and remove "Ballerina":
When "Self-hosted MCP server" is picked, prompt the user with the following:
- Select server language: Python, TypeScript, .NET
- Include sample server code: Yes, No
Include sample server code is: No
- host.json
{
"version": "2.0",
"configurationProfile": "mcp-custom-handler",
"customHandler": {
"description": {
"defaultExecutablePath": "",
"arguments": [""]
}
}
} - local.settings.json,
FUNCTIONS_WORKER_RUNTIMEdepends on the server language
{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "<python|node|dotnet-isolated>",
"AzureWebJobsFeatureFlags": "EnableMcpCustomHandlerPreview”
}
}Include sample server code is: Yes
- Depending on the language, include simple MCP server snippet:
# TODO: provide Python, TypeScript, and C# code snippets
- Fill in the values for properties
defaultExecutablePathandargumentsin host.json:Language defaultExecutablePathargumentsPython python["server.py"]TypeScript npm["run", "start"].NET dotnet["server.dll"] - local.settings.json should be same as above, with the right
FUNCTIONS_WORKER_RUNTIME - Different languages require extra files:
Server language File included Python pyproject.toml TypeScript package.json, tsconfig.json C# .csproj
TODO: provide file content
Other requirements
This is very important!
-
.vscode/settings.json needs to be generated properly, especially
azureFunctions.projectLanguage. The server wouldn't deploy properly if the value iscustom.For projects created in VSCode, the language can be inferred by the answer to the prompt during project creation. However, for projects created outside of VSCode, this can't be done, so user should be prompted to provide that.
-
Upload the
AzureWebJobsFeatureFlagsto the app (otherwise deployment will fail)
E2E flow summary
- Customer runs Azure Functions: Create new project command
- Project type prompt
- Server language prompt
- Include sample code prompt
- New project is created with the right files and content
Not in scope
- Make F5 debugging work. The debugger needs to attach to the child process. Tracking this in another issue.
Metadata
Metadata
Assignees
Labels
No labels