1. Conduid
  2. AI
  3. Remote MCP Servers Using Dotnet SDK Prompts
MCP server · AI

Remote MCP Servers Using Dotnet SDK Prompts

Unclaimed ai
30Low

Scored 5 months ago · breakdown

About Remote MCP Servers Using Dotnet SDK Prompts

Remote MCP Servers Using Dotnet SDK Prompts is an MCP server in the AI category. It has been installed 0 times through Conduid.

Install

Clone
git clone https://github.com/azurecorner/remote-MCP-servers-using-dotnet-sdk-prompts

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Remote MCP Servers Using Dotnet SDK Prompts

Powered by Claude · Grounded in docs

I know everything about Remote MCP Servers Using Dotnet SDK Prompts. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • ·Scoped permissionsNot checked yet.

README

Remote MCP Server Using .NET SDK: Prompts

This repository contains a sample remote Model Context Protocol (MCP) server built with the .NET SDK and ModelContextProtocol.AspNetCore.

The server exposes:

  • MCP tools (for operations such as ping and weather lookup)
  • MCP prompts (for reusable instruction templates)
  • HTTP MCP endpoint at /mcp
  • Health endpoint at /api/healthz

What This Project Is

The project is an ASP.NET Core MCP server that can be used by MCP clients (including VS Code MCP client configuration in .vscode/mcp.json).

Source layout:

  • src/McpServer/McpServer: MCP host application
  • src/McpServer/WeatherService: weather service used by the weather tool
  • scripts: PowerShell scripts to list and call MCP tools/resources/prompts

Prerequisites

  • Windows with PowerShell (pwsh or Windows PowerShell)
  • .NET SDK 10.0 (project targets net10.0)
  • VS Code with MCP client support
  • Internet access for weather lookup (uses Open-Meteo APIs)

Run The Server Locally

From the repository root:

dotnet restore .\src\McpServer\McpServer.slnx
dotnet run --project .\src\McpServer\McpServer\McpServer.csproj

Default server URL:

  • http://0.0.0.0:8081/mcp

Notes:

  • Port is controlled by FUNCTIONS_CUSTOMHANDLER_PORT (defaults to 8081).
  • Health check endpoint: http://localhost:8081/api/healthz

VS Code MCP Client Configuration

This repository already includes .vscode/mcp.json:

{
  "servers": {
    "local-mcp-server": {
      "url": "http://0.0.0.0:8081/mcp",
      "type": "http"
    }
  }
}

If needed, update url to match your local port.

Exposed MCP Tools

Defined in src/McpServer/McpServer/McpServerTools.cs:

  • Ping(message: string)
    • Verifies server responsiveness and optionally echoes a message.
  • GetWeather(city: string)
    • Returns current weather data for the requested city.

Tool names shown by MCP clients can be normalized by the MCP library. Use tools/list (or the script below) to confirm exact callable names in your environment.

Exposed MCP Prompts

Defined in src/McpServer/McpServer/McpServerPrompts.cs and registered in src/McpServer/McpServer/Program.cs with:

.WithPrompts<McpServerPrompts>();

Available prompts:

  • default_prompt

    • Description: Default system prompt for the MCP server.
    • Returns a concise system instruction set:
      • be concise
      • prefer plain text
      • do not hallucinate
      • ask for clarification when input is unclear
  • weather_query_guide(userContext?: string)

    • Description: Guidance on how to ask for weather forecasts in a structured way.
    • Optional argument:
      • userContext: extra location or preference context appended to the prompt output.
  • weather_data_interpretation

    • Description: Instructions for interpreting weather forecast data returned by the server.
    • Includes formatting guidance for temperature, summary, context, and recommendations.

Use prompts/list to see exact prompt names and argument metadata in your runtime.

How To Create A New MCP Prompt

Use this pattern from McpServerPrompts when adding a new prompt.

  1. Add or reuse a prompt container class and mark it with [McpServerPromptType].
  2. Add a public method and mark it with [McpServerPrompt].
  3. Add a [Description("...")] attribute so clients can show meaningful metadata.
  4. For input arguments, add [Description("...")] attributes for better client introspection.
  5. Return string or Task<string>.
  6. Ensure the prompt type is registered in startup (already done with .WithPrompts<McpServerPrompts>()).
  7. Run the server and validate with prompts/list and prompts/get.

Example (new prompt in McpServerPrompts.cs):

[McpServerPrompt]
[Description("Provides concise guidance for travel weather planning")]
public Task<string> TravelWeatherGuide(
    [Description("Destination city")] string city,
    [Description("Optional number of travel days")] int? days = null)
{
    var output = $"""
    # Travel Weather Guide

    Destination: {city}
    Duration: {(days.HasValue ? $"{days} day(s)" : "unspecified")}

    Ask for:
    - daily highs/lows
    - rain probability
    - wind conditions
    """;

    return Task.FromResult(output);
}

After adding the method, test it:

# 1) Start server
dotnet run --project .\src\McpServer\McpServer\McpServer.csproj

# 2) List prompts and confirm the new prompt name
.\scripts\list-mcp-server-prompts.ps1

# 3) Get the prompt by name
.\scripts\call-mcp-prompt.ps1 -PromptName "travel_weather_guide"

Scripts

Scripts are in scripts/:

  • scripts/list-mcp-server-tools.ps1
    • Calls MCP tools/list and prints discovered tools and schemas.
  • scripts/call-mcp-tool.ps1
    • Calls MCP tools/call for a specific tool and arguments.
    • Defaults: toolName=get_weather, toolParams=@{ city = "Paris" }.
  • scripts/list-mcp-server-prompts.ps1
    • Calls MCP prompts/list and prints discovered prompts and arguments.
  • scripts/call-mcp-prompt.ps1
    • Calls MCP prompts/get for a specific prompt name.
    • Default prompt name: weather_query_guide.

Optional resource scripts are also present if you still want to inspect MCP resources:

  • scripts/list-mcp-server-resources.ps1
  • scripts/call-mcp-resources.ps1

Quick Test Examples

Run these from the repository root in a second terminal while the server is running.

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force;

List available tools:

.\scripts\list-mcp-server-tools.ps1

Call ping tool:

.\scripts\call-mcp-tool.ps1 -toolName "ping" -toolParams @{ message = "hello from local test" }

Call weather tool:

.\scripts\call-mcp-tool.ps1 -toolName "get_weather" -toolParams @{ city = "Paris" }

List available prompts:

.\scripts\list-mcp-server-prompts.ps1

Get default prompt:

.\scripts\call-mcp-prompt.ps1 -PromptName "default_prompt"

Get weather query guide prompt:

.\scripts\call-mcp-prompt.ps1 -PromptName "weather_query_guide"

Get weather interpretation prompt:

.\scripts\call-mcp-prompt.ps1 -PromptName "weather_data_interpretation"

README mirrored from the source repository 5 months ago. The original is authoritative.

Questions

About Remote MCP Servers Using Dotnet SDK Prompts

How do I install Remote MCP Servers Using Dotnet SDK Prompts?

Run git clone https://github.com/azurecorner/remote-MCP-servers-using-dotnet-sdk-prompts, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Remote MCP Servers Using Dotnet SDK Prompts safe to use with an AI agent?

Its trust score is 30 out of 100 (low). Conduid hasn't run static security checks on this repository yet, so review the source yourself before granting it credentials. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Remote MCP Servers Using Dotnet SDK Prompts still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.