You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix McpWeatherApp: bump azure-functions-maven-plugin to 1.42.0
Plugin 1.41.0 does not generate a binding for @McpResourceTrigger, so the
GetWeatherWidget function failed to start with 'At least one binding must
be declared'. 1.42.0 (toolkit-appservice-lib 0.56.0) adds McpResourceTrigger,
McpMetadata, McpPromptTrigger, and McpPromptArgument to the binding enum.
Also document the required local.settings.json in the README.
Copy file name to clipboardExpand all lines: samples/McpWeatherApp/README.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,25 @@ cd ..
38
38
39
39
This creates a bundled `app/dist/index.html` file that the function serves.
40
40
41
-
### 2. Build and Run the Function App
41
+
### 2. Add a `local.settings.json`
42
+
43
+
The MCP tool trigger is not an HTTP trigger, so the Functions host requires an `AzureWebJobsStorage` connection. Create `local.settings.json` in the project root (next to `host.json`):
`UseDevelopmentStorage=true` points at [Azurite](https://learn.microsoft.com/azure/storage/common/storage-use-azurite); start it in another terminal (`azurite`) or via the VS Code Azurite extension. Alternatively, paste a real Azure Storage connection string.
56
+
57
+
> The maven plugin copies `local.settings.json` into `target/azure-functions/<appname>/` during `package`. If you add or change the file after building, re-run `mvn clean package` so the staged copy is refreshed.
58
+
59
+
### 3. Build and Run the Function App
42
60
43
61
```bash
44
62
mvn clean package
@@ -47,11 +65,11 @@ mvn azure-functions:run
47
65
48
66
The MCP server will be available at `http://localhost:7071/runtime/webhooks/mcp`.
49
67
50
-
### 3. Connect from VS Code
68
+
### 4. Connect from VS Code
51
69
52
70
Open **.vscode/mcp.json** at the repo root. Find the server called *local-mcp-function* and click **Start** above the name.
0 commit comments