This is an MCP server that manages to-do lists.
- .NET 10 SDK
- Visual Studio Code with
- C# Dev Kit extension
- Azure CLI
- Azure Developer CLI
- Docker Desktop
To-do List MCP server includes:
| Building Block | Name | Description | Usage |
|---|---|---|---|
| Tools | add_todo_item |
Adds a to-do item. | #add_todo_item |
| Tools | get_todo_items |
Gets a list of to-do items. | #get_todo_items |
| Tools | update_todo_item |
Updates a to-do item. | #update_todo_item |
| Tools | complete_todo_item |
Completes a to-do item. | #complete_todo_item |
| Tools | delete_todo_item |
Deletes a to-do item. | #delete_todo_item |
-
Get the repository root.
# bash/zsh REPOSITORY_ROOT=$(git rev-parse --show-toplevel)
# PowerShell $REPOSITORY_ROOT = git rev-parse --show-toplevel
-
Run the MCP server app.
cd $REPOSITORY_ROOT/todo-list dotnet run --project ./src/McpSamples.TodoList.HybridApp
Make sure take note the absolute directory path of the
McpSamples.TodoList.HybridAppproject.Parameters:
--http: The switch that indicates to run this MCP server as a streamable HTTP type. When this switch is added, the MCP server URL ishttp://localhost:5240.
With this parameter, you can run the MCP server like:
dotnet run --project ./src/McpSamples.TodoList.HybridApp -- --http
-
Build the MCP server app as a container image.
cd $REPOSITORY_ROOT docker build -f Dockerfile.todo-list -t todo-list:latest .
-
Run the MCP server app in a container.
docker run -i --rm -p 8080:8080 todo-list:latest
Alternatively, use the container image from the container registry.
docker run -i --rm -p 8080:8080 ghcr.io/microsoft/mcp-dotnet-samples/todo-list:latest
Parameters:
--http: The switch that indicates to run this MCP server as a streamable HTTP type. When this switch is added, the MCP server URL ishttp://localhost:8080.
With this parameter, you can run the MCP server like:
# use local container image docker run -i --rm -p 8080:8080 todo-list:latest --http# use container image from the container registry docker run -i --rm -p 8080:8080 ghcr.io/microsoft/mcp-dotnet-samples/todo-list:latest --http
-
Navigate to the directory.
cd $REPOSITORY_ROOT/todo-list
-
Login to Azure.
# Login with Azure Developer CLI azd auth login -
Deploy the MCP server app to Azure.
azd up
While provisioning and deploying, you'll be asked to provide subscription ID, location, environment name.
-
After the deployment is complete, get the information by running the following commands:
-
Azure Container Apps FQDN:
azd env get-value AZURE_RESOURCE_MCP_TODO_LIST_FQDN
-
-
Copy
mcp.jsonto the repository root.For locally running MCP server (STDIO):
mkdir -p $REPOSITORY_ROOT/.vscode cp $REPOSITORY_ROOT/todo-list/.vscode/mcp.stdio.local.json \ $REPOSITORY_ROOT/.vscode/mcp.json
New-Item -Type Directory -Path $REPOSITORY_ROOT/.vscode -Force Copy-Item -Path $REPOSITORY_ROOT/todo-list/.vscode/mcp.stdio.local.json ` -Destination $REPOSITORY_ROOT/.vscode/mcp.json -Force
For locally running MCP server (HTTP):
mkdir -p $REPOSITORY_ROOT/.vscode cp $REPOSITORY_ROOT/todo-list/.vscode/mcp.http.local.json \ $REPOSITORY_ROOT/.vscode/mcp.json
New-Item -Type Directory -Path $REPOSITORY_ROOT/.vscode -Force Copy-Item -Path $REPOSITORY_ROOT/todo-list/.vscode/mcp.http.local.json ` -Destination $REPOSITORY_ROOT/.vscode/mcp.json -Force
For locally running MCP server in a container (STDIO):
mkdir -p $REPOSITORY_ROOT/.vscode cp $REPOSITORY_ROOT/todo-list/.vscode/mcp.stdio.container.json \ $REPOSITORY_ROOT/.vscode/mcp.json
New-Item -Type Directory -Path $REPOSITORY_ROOT/.vscode -Force Copy-Item -Path $REPOSITORY_ROOT/todo-list/.vscode/mcp.stdio.container.json ` -Destination $REPOSITORY_ROOT/.vscode/mcp.json -Force
For locally running MCP server in a container (HTTP):
mkdir -p $REPOSITORY_ROOT/.vscode cp $REPOSITORY_ROOT/todo-list/.vscode/mcp.http.container.json \ $REPOSITORY_ROOT/.vscode/mcp.json
New-Item -Type Directory -Path $REPOSITORY_ROOT/.vscode -Force Copy-Item -Path $REPOSITORY_ROOT/todo-list/.vscode/mcp.http.container.json ` -Destination $REPOSITORY_ROOT/.vscode/mcp.json -Force
For remotely running MCP server in a container (HTTP):
mkdir -p $REPOSITORY_ROOT/.vscode cp $REPOSITORY_ROOT/todo-list/.vscode/mcp.http.remote.json \ $REPOSITORY_ROOT/.vscode/mcp.json
New-Item -Type Directory -Path $REPOSITORY_ROOT/.vscode -Force Copy-Item -Path $REPOSITORY_ROOT/todo-list/.vscode/mcp.http.remote.json ` -Destination $REPOSITORY_ROOT/.vscode/mcp.json -Force
-
Open Command Palette by typing
F1orCtrl+Shift+Pon Windows orCmd+Shift+Pon Mac OS, and searchMCP: List Servers. -
Choose
todo-listthen clickStart Server. -
When prompted, enter one of the following values:
- The absolute directory path of the
McpSamples.TodoList.HybridAppproject - The FQDN of Azure Container Apps.
- The absolute directory path of the
-
Enter prompts. These are just examples:
- Show me the list to do - Add "meeting at 11am" - Complete the to-do item #1 - Delete the to-do item #2 -
Confirm the result.