GetWeatherInsights.Talati.Mcp
1.0.0
dotnet tool install --global GetWeatherInsights.Talati.Mcp --version 1.0.0
dotnet new tool-manifest
dotnet tool install --local GetWeatherInsights.Talati.Mcp --version 1.0.0
#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:
- Get a free API key: Sign up at WeatherAPI.com to get your free API key
- Configure the API key: You need to set the following environment variables or configuration:
WEATHER_SERVICE_API_KEY: Your WeatherAPI.com API keyWEATHER_SERVICE_URL: Set tohttps://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):
- VS Code Users: Create a
.vscode/mcp.jsonfile in your workspace directory - Visual Studio Users: Create a
.mcp.jsonfile 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.jsonto declare your MCP server's inputs.- See configuring inputs for more details.
- 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
- Run
dotnet pack -c Releaseto create the NuGet package - 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.jsonfile - Visual Studio: Create a
<SOLUTION DIRECTORY>\.mcp.jsonfile
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 | Versions 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. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 286 | 7/26/2025 |