- Explore MCP Servers
- remote-mcp-webapp-dotnet
Remote Mcp Webapp Dotnet
What is Remote Mcp Webapp Dotnet
remote-mcp-webapp-dotnet is a .NET implementation of a Model Context Protocol (MCP) server designed for AI model context requests on Azure. It provides an API that adheres to the MCP specification, enabling AI models to request additional context during inference.
Use cases
Use cases include AI model inference that requires real-time data, such as weather forecasting, mathematical operations, and other context-sensitive applications where models need to enhance their predictions with external information.
How to use
To use remote-mcp-webapp-dotnet, clone the repository, navigate to the project directory, and run the project using the command ‘dotnet run’. The MCP server will be accessible at ‘https://localhost:5269’. For integration with tools like VS Code, you can add the MCP server from the command palette.
Key features
Key features include a complete implementation of the MCP protocol in C#/.NET, integration with Azure App Service, and support for custom tools that can be utilized by AI models via the MCP protocol.
Where to use
remote-mcp-webapp-dotnet is primarily used in AI and machine learning applications where models require additional context during inference, particularly in cloud environments like Azure.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Remote Mcp Webapp Dotnet
remote-mcp-webapp-dotnet is a .NET implementation of a Model Context Protocol (MCP) server designed for AI model context requests on Azure. It provides an API that adheres to the MCP specification, enabling AI models to request additional context during inference.
Use cases
Use cases include AI model inference that requires real-time data, such as weather forecasting, mathematical operations, and other context-sensitive applications where models need to enhance their predictions with external information.
How to use
To use remote-mcp-webapp-dotnet, clone the repository, navigate to the project directory, and run the project using the command ‘dotnet run’. The MCP server will be accessible at ‘https://localhost:5269’. For integration with tools like VS Code, you can add the MCP server from the command palette.
Key features
Key features include a complete implementation of the MCP protocol in C#/.NET, integration with Azure App Service, and support for custom tools that can be utilized by AI models via the MCP protocol.
Where to use
remote-mcp-webapp-dotnet is primarily used in AI and machine learning applications where models require additional context during inference, particularly in cloud environments like Azure.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Model Context Protocol (MCP) Server - .NET Implementation
This project contains a .NET web app implementation of a Model Context Protocol (MCP) server. The application is designed to be deployed to Azure App Service.
The MCP server provides an API that follows the Model Context Protocol specification, allowing AI models to request additional context during inference.
Key Features
- Complete implementation of the MCP protocol in C#/.NET using MCP csharp-sdk
- Azure App Service integration
- Custom tools support
Project Structure
src/- Contains the main C# project filesProgram.cs- The entry point for the MCP serverTools/- Contains custom tools that can be used by models via the MCP protocolMultiplicationTool.cs- Example tool that performs multiplication operationsTemperatureConverterTool.cs- Tool for converting between Celsius and FahrenheitWeatherTools.cs- Tools for retrieving weather forecasts and alerts
infra/- Contains Azure infrastructure as code using Bicepmain.bicep- Main infrastructure definitionresources.bicep- Resource definitionsmain.parameters.json- Parameters for deployment
Prerequisites
- Azure Developer CLI
- .NET 9 SDK
- For local development with VS Code:
- MCP C# SDK:
dotnet add package ModelContextProtocol --prerelease
Local Development
Run the Server Locally
- Clone this repository
- Navigate to the project directory
cd src - Install required packages
dotnet restore - Run the project:
dotnet run - The MCP server will be available at
http://localhost:5000 - When you’re done, press Ctrl+C in the terminal to stop the app
Testing the Available Tools
The server provides these tools:
- Multiplication:
Multiply- Multiplies two numbers - Temperature Conversion:
CelsiusToFahrenheit- Converts temperature from Celsius to FahrenheitFahrenheitToCelsius- Converts temperature from Fahrenheit to Celsius
- Weather Data:
GetAlerts- Get active weather alerts for a US state (provide state code like “CA”, “TX”)GetForecast- Get weather forecast for coordinates (provide latitude and longitude)
Connect to the Local MCP Server
Using VS Code - Copilot Agent Mode
- Add MCP Server from command palette and add the URL to your running server’s HTTP endpoint:
http://localhost:5000 - List MCP Servers from command palette and start the server
- In Copilot chat agent mode, enter a prompt to trigger the tool:
Multiply 3423 and 5465 - When prompted to run the tool, consent by clicking Continue
You can ask things like:
- What’s the weather forecast for San Francisco? (latitude: 37.7749, longitude: -122.4194)
- Are there any weather alerts in California?
- Convert 25 degrees Celsius to Fahrenheit
Using MCP Inspector
- In a new terminal window, install and run MCP Inspector:
npx @modelcontextprotocol/inspector - CTRL+click the URL displayed by the app (e.g. http://localhost:5173/#resources)
- Set the transport type to
HTTP - Set the URL to your running server’s HTTP endpoint and Connect:
http://localhost:5000 - List Tools, click on a tool, and Run Tool
Deploy to Azure
-
Login to Azure:
azd auth login -
Initialize your environment:
azd env new -
Deploy the application:
azd upThis will:
- Build the .NET application
- Provision Azure resources defined in the Bicep templates
- Deploy the application to Azure App Service
Connect to Remote MCP Server
Using MCP Inspector
Use the web app’s URL:
https://<webappname>.azurewebsites.net
Using VS Code - GitHub Copilot
Follow the same process as with the local app, but use your App Service URL:
https://<webappname>.azurewebsites.net
Clean up resources
When you’re done working with your app and related resources, you can use this command to delete the function app and its related resources from Azure and avoid incurring any further costs:
azd down
Custom Tools
The project includes several sample tools in the Tools directory:
MultiplicationTool.cs- Performs multiplication operationsTemperatureConverterTool.cs- Converts between Celsius and FahrenheitWeatherTools.cs- Retrieves weather forecasts and alerts
To add new tools:
- Create a new class in the
Toolsdirectory - Implement the MCP tool interface
- Register the tool in
Program.cs
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










