GetWeatherInsights.Talati.Mcp 1.0.0

dotnet tool install --global GetWeatherInsights.Talati.Mcp --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local GetWeatherInsights.Talati.Mcp --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=GetWeatherInsights.Talati.Mcp&version=1.0.0
                    
nuke :add-package GetWeatherInsights.Talati.Mcp --version 1.0.0
                    

MCP Server

This README was created using the C# MCP server project template. It demonstrates how you can easily create an MCP server using C# and publish it as a NuGet package.

This MCP server provides the following tools:

  • Random Number Generation: Generate random numbers within specified ranges
  • Weather Information: Retrieve weather data for specified locations

Weather API Configuration

The weather functionality requires a WeatherAPI.com API key:

  1. Get a free API key: Sign up at WeatherAPI.com to get your free API key
  2. Configure the API key: You need to set the following environment variables or configuration:
    • WEATHER_SERVICE_API_KEY: Your WeatherAPI.com API key
    • WEATHER_SERVICE_URL: Set to https://api.weatherapi.com/v1

See aka.ms/nuget/mcp/guide for the full guide.

Please note that this template is currently in an early preview stage. If you have feedback, please take a brief survey.

Quick Start for Users

If you just want to use this MCP server (after it's published to NuGet.org):

  1. VS Code Users: Create a .vscode/mcp.json file in your workspace directory
  2. Visual Studio Users: Create a .mcp.json file in your solution directory

Use this configuration:

{
  "servers": {
    "SampleMcpServer": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "YourPackageId.SampleMcpServer",
        "--version",
        "1.0.0",
        "--yes"
      ]
    }
  }
}

Replace YourPackageId.SampleMcpServer with the actual package ID and 1.0.0 with the desired version.

Available Tools

Once configured, you can use these tools through Copilot Chat:

  • Random Numbers: Ask for random numbers, e.g., "Give me 3 random numbers" or "Generate a random number between 1 and 100"
  • Weather: Ask for weather information, e.g., "What's the weather in Seattle? or What’s the weather at 51.52 latitude and -0.11 longitude? or What’s the weather in London and Chicago as a graph?"

Developer Instructions

Checklist before publishing to NuGet.org

  • Test the MCP server locally using the steps below.
  • Update the package metadata in the .csproj file, in particular the <PackageId>.
  • Update .mcp/server.json to declare your MCP server's inputs.
  • Pack the project using dotnet pack.

The bin/Release directory will contain the package file (.nupkg), which can be published to NuGet.org.

Developing locally

To test this MCP server from source code (locally) without using a built MCP server package, you can configure your IDE to run the project directly using dotnet run.

{
  "servers": {
    "SampleMcpServer": {
      "type": "stdio",
      "command": "dotnet",
      "args": [
        "run",
        "--project",
        "C:\\Users\\User\\MCP_DEMO\\SampleMcpServer"
      ]
    }
  }
}

Testing the MCP Server

Once configured, you can ask Copilot Chat for a random number, for example, Give me 3 random numbers. It should prompt you to use the get_random_number tool on the SampleMcpServer MCP server and show you the results.

You can also test weather functionality by asking What's the weather like in New York?

Publishing to NuGet.org

  1. Run dotnet pack -c Release to create the NuGet package
  2. Publish to NuGet.org with dotnet nuget push bin/Release/*.nupkg --api-key <your-api-key> --source https://api.nuget.org/v3/index.json

Using the MCP Server from NuGet.org

Once the MCP server package is published to NuGet.org, you can configure it in your preferred IDE. Both VS Code and Visual Studio use the dnx command to download and install the MCP server package from NuGet.org.

  • VS Code: Create a <WORKSPACE DIRECTORY>/.vscode/mcp.json file
  • Visual Studio: Create a <SOLUTION DIRECTORY>\.mcp.json file

For both VS Code and Visual Studio, the configuration file uses the following server definition:

{
  "servers": {
    "SampleMcpServer": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "<your package ID here>",
        "--version",
        "<your package version here>",
        "--yes"
      ]
    }
  }
}

More information

.NET MCP servers use the ModelContextProtocol C# SDK. For more information about MCP:

Refer to the VS Code or Visual Studio documentation for more information on configuring and using MCP servers:

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.0 286 7/26/2025