Skip to content

Commit 97e6957

Browse files
authored
Update sample (#42)
* update dependencies;use stable bundles * update to python 3.13 * update python version requirement; remove setting requirement
1 parent 5859663 commit 97e6957

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Below is the architecture diagram for the Remote MCP Server using Azure Function
2828

2929
## Prerequisites
3030

31-
+ [Python](https://www.python.org/downloads/) version 3.11 or higher
32-
+ [Azure Functions Core Tools](https://learn.microsoft.com/azure/azure-functions/functions-run-local?pivots=programming-language-python#install-the-azure-functions-core-tools) >= `4.0.7030`
31+
+ [Python](https://www.python.org/downloads/) version 3.13 or higher
32+
+ [Azure Functions Core Tools](https://learn.microsoft.com/azure/azure-functions/functions-run-local?pivots=programming-language-python#install-the-azure-functions-core-tools) >= `4.8.0`
3333
+ [Azure Developer CLI](https://aka.ms/azd)
3434
+ To use Visual Studio Code to run and debug locally:
3535
+ [Visual Studio Code](https://code.visualstudio.com/)
@@ -285,8 +285,6 @@ This sample uses the new first-class MCP decorators available in `azure-function
285285
- Eliminating the need for manual JSON serialization of tool properties
286286
- Using standard Python decorators (`@app.mcp_tool()`, `@app.mcp_tool_property()`, `@app.blob_input()`, `@app.blob_output()`)
287287
288-
**Important:** When using the MCP decorators, you must set `PYTHON_ISOLATE_WORKER_DEPENDENCIES=1` in your app settings (both locally in `local.settings.json` and in your deployed Azure Function App).
289-
290288
Here's the actual code from the function_app.py file:
291289
292290
```python

infra/main.bicep

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ module api './app/api.bicep' = {
110110
applicationInsightsName: monitoring.outputs.name
111111
appServicePlanId: appServicePlan.outputs.resourceId
112112
runtimeName: 'python'
113-
runtimeVersion: '3.12'
113+
runtimeVersion: '3.13'
114114
storageAccountName: storage.outputs.name
115115
enableBlob: storageEndpointConfig.enableBlob
116116
enableQueue: storageEndpointConfig.enableQueue
@@ -119,7 +119,6 @@ module api './app/api.bicep' = {
119119
identityId: apiUserAssignedIdentity.outputs.resourceId
120120
identityClientId: apiUserAssignedIdentity.outputs.clientId
121121
appSettings: {
122-
PYTHON_ISOLATE_WORKER_DEPENDENCIES: '1'
123122
}
124123
virtualNetworkSubnetId: vnetEnabled ? serviceVirtualNetwork.outputs.appSubnetID : ''
125124
}

src/host.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010
},
1111
"extensionBundle": {
12-
"id": "Microsoft.Azure.Functions.ExtensionBundle.Preview",
13-
"version": "[4.32.0, 5.0.0)"
12+
"id": "Microsoft.Azure.Functions.ExtensionBundle",
13+
"version": "[4.*, 5.0.0)"
1414
}
1515
}

src/local.settings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"IsEncrypted": false,
33
"Values": {
44
"FUNCTIONS_WORKER_RUNTIME": "python",
5-
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
6-
"PYTHON_ISOLATE_WORKER_DEPENDENCIES": "1"
5+
"AzureWebJobsStorage": "UseDevelopmentStorage=true"
76
}
87
}

src/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# The Python Worker is managed by the Azure Functions platform
33
# Manually managing azure-functions-worker may cause unexpected issues
44

5-
azure-functions==1.25.0b3
5+
azure-functions

0 commit comments

Comments
 (0)