Skip to content

[WIP] Create a weather mcp server in .Net C# - #2

Closed
Geertvdc with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-1
Closed

[WIP] Create a weather mcp server in .Net C##2
Geertvdc with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-1

Conversation

Copilot AI commented Jun 19, 2025

Copy link
Copy Markdown
Contributor
  • Create .NET solution structure with main project and test project
  • Add basic weather minimal API with standard weather forecast endpoints
  • Add ModelContextProtocol NuGet package (McpToolkit.Server) and web testing package
  • Create shared weather service to avoid code duplication between API and MCP
  • Implement MCP server functionality with weather endpoints
  • Add XUnit tests for both REST API and MCP functionality
  • Create .http file for REST client testing of both API and MCP server
  • Ensure all builds and tests pass
  • Refactor any remaining code duplication

Fixes #1.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Geertvdc

Copy link
Copy Markdown
Owner

use this nuget package: https://www.nuget.org/packages/ModelContextProtocol
also use .net 9 please install it if not needed

Co-authored-by: Geertvdc <8984505+Geertvdc@users.noreply.github.com>
Copilot AI requested a review from Geertvdc June 19, 2025 19:23
@Geertvdc Geertvdc closed this Jun 19, 2025
@Geertvdc
Geertvdc deleted the copilot/fix-1 branch June 19, 2025 19:23

Copilot AI commented Jun 19, 2025

Copy link
Copy Markdown
Contributor Author

use this nuget package: https://www.nuget.org/packages/ModelContextProtocol
also use .net 9 please install it if not needed

Updated the project to use .NET 9 and replaced McpToolkit.Server with the ModelContextProtocol package (version 0.2.0-preview.3). Both projects now target net9.0 and all builds and tests pass. Commit: 3f3da9d

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: curl -I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 REDACTED (dns block)
  • www.nuget.org
    • Triggering command: curl -s REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a weather mcp server in .Net C#

2 participants