Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 35 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ If you're looking for this sample in more languages check out the [Node.js/TypeS
+ [Visual Studio Code](https://code.visualstudio.com/)
+ [Azure Functions extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions)

### For running Azure Storage Emulator (Azurite):
**Choose one of the following options:**
+ [Docker](https://docs.docker.com/get-docker/) (recommended for simplicity)
+ [Node.js](https://nodejs.org/) (if you prefer to run Azurite via npx)
+ [Azurite extension for VS Code](https://marketplace.visualstudio.com/items?itemName=Azurite.azurite) (if using Visual Studio Code)

> **Choose one**: You can use either Visual Studio OR Visual Studio Code. Both provide full debugging support, but the setup steps differ slightly.

Below is the architecture diagram for the Remote MCP Server using Azure Functions:
Expand All @@ -53,14 +59,33 @@ Below is the architecture diagram for the Remote MCP Server using Azure Function

An Azure Storage Emulator is needed for this particular sample because we will save and get snippets from blob storage.

1. Start Azurite
### Start Azurite

```shell
docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 \
mcr.microsoft.com/azure-storage/azurite
```
Choose one of the following options to start Azurite:

#### Option 1: Using Docker

```shell
docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 \
mcr.microsoft.com/azure-storage/azurite
```

#### Option 2: Using npx (Node.js)

```shell
npx azurite --silent --location azurite --debug azurite/debug.log
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to make sure this is in a path that is not in the repo. OK options are ~/azurite for posix and C:\azurite for Windows

```

> **Note**: This command runs Azurite with the following options:
> - `--silent`: Disables access log output to the console
> - `--location azurite`: Stores data in the `azurite` directory (can be any relative or absolute path)
> - `--debug azurite/debug.log`: Writes debug logs to a file
>
> Azurite uses the same default ports as Docker (10000 for blobs, 10001 for queues, 10002 for tables). You can specify an absolute path for `--location` if preferred (e.g., `/tmp/azurite` on Linux/Mac or `C:\azurite` on Windows).

#### Option 3: Using VS Code Extension

>**Note** if you use Azurite coming from VS Code extension you need to run `Azurite: Start` now or you will see errors.
If you use the Azurite extension in VS Code, run the **Azurite: Start** command from the command palette now or you will see errors.

## Run your MCP Server locally

Expand Down Expand Up @@ -129,7 +154,10 @@ Once your Azure Functions MCP server is running locally (via either Visual Studi
### Troubleshooting Local Development

**Problem**: Connection refused when trying to connect to MCP server
- **Solution**: Ensure Azurite is running (`docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 mcr.microsoft.com/azure-storage/azurite`)
- **Solution**: Ensure Azurite is running. Choose one of the following methods:
- Docker: `docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 mcr.microsoft.com/azure-storage/azurite`
- npx: `npx azurite --silent --location azurite --debug azurite/debug.log`
- VS Code: Run **Azurite: Start** from the command palette

**Problem**: Wrong URL (0.0.0.0 vs localhost)
- **Solution**: Use `http://0.0.0.0:7071/runtime/webhooks/mcp/sse` for VS Code, `http://localhost:7071/runtime/webhooks/mcp/sse` for Visual Studio
Expand Down