Azure-Samples / Azure-Samples/remote-mcp-functions-dotnet

Deployment steps results in 404 Error

Open
#37 2 comments 0 reactions 1 assignee Claimed by @paulyuk View on GitHub
not repro question
Dominant language
C#
Stars
134
Forks
74
PR merge metrics
No merged PRs in 30d

Description

While the steps to run the MCP server locally works perfectly, the `Deploy to Azure` steps result in several issues:

1. Doing `azd up` first causes a crash for [deployer](https://github.com/Azure-Samples/remote-mcp-functions-dotnet/blob/989392a5c13469f5db205549a9661e9e85fe336a/infra/main.bicep#L60) not found in `main.bicep`. The comment immediately preceding it is helpful, and I am able to fix the problem by leaving the `principalId` empty. Perhaps it might be better to default to empty value for the `principalId` in `main.bicep`.

1. The next problem is `azd deploy` step failing with the following error:

```
(x) Failed: Deploying service api

ERROR: error executing step command 'deploy --all': failed deploying service 'api': POST https://func-api-.scm.azurewebsites.net/api/zipdeploy
--------------------------------------------------------------------------------
RESPONSE 404: 404 Not Found
ERROR CODE UNAVAILABLE
--------------------------------------------------------------------------------
Response contained no body
--------------------------------------------------------------------------------
```
Running the `azd deploy` step separately does not seem to help.
I see that the resources are generated in the subscription, and clicking on the functions app seems to indicate that it is running. I don't see a system key called `mcp_extension` though, and the default and master keys don't allow connection via the MCP Inspector.

When I follow the deployment steps outlined [here](https://learn.microsoft.com/en-us/azure/azure-functions/how-to-create-function-vs-code?pivots=programming-language-csharp), then the deployment does seem to work, with the `mcp_extension` system key generated.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.