Optimizing MCP Server Compatibility for VS 2026 and VS Code#348
Optimizing MCP Server Compatibility for VS 2026 and VS Code#348Ellerbach merged 2 commits intonanoframework:mainfrom
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (5)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
1b49d45 to
e590253
Compare
There was a problem hiding this comment.
Pull request overview
Updates the nanoFramework MCP server to improve interoperability across MCP clients that require different protocol versions (VS 2026 vs VS Code), and to align metadata formatting with newer MCP SDK/client expectations.
Changes:
- Added multi-version protocol support during
initialize(accept latest + legacy protocol versions). - Updated tool metadata generation to omit
outputSchemafor primitive/string outputs. - Removed
nextCursor: nullfrom tools/prompts list metadata.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
nanoFramework.WebServer.Mcp/McpServerController.cs |
Negotiates/validates protocol versions during initialize and returns supported versions on error. |
nanoFramework.WebServer.Mcp/McpToolRegistry.cs |
Omits outputSchema for primitive/string outputs and removes nextCursor from tool list metadata. |
nanoFramework.WebServer.Mcp/McpPromptRegistry.cs |
Removes nextCursor from prompt list metadata. |
tests/McpServerTests/McpToolRegistryTests.cs |
Updates assertions to match the new tools metadata shape without nextCursor. |
tests/McpServerTests/McpPromptRegistryTests.cs |
Updates assertions to match the new prompts metadata shape without nextCursor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ellerbach
left a comment
There was a problem hiding this comment.
looks good overall, please make sure to properly lint the code
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Thanks! I'm honored to contribute. |



Description
Added support for multiple protocol versions
GitHub Copilot Chat in Visual Studio 2026 requires version 2025-06-18, while Visual Studio Code requires version 2025-11-25. Accordingly, the MCP server has been updated to support the latest version (2025-11-25) as well as legacy versions (2025-06-18 and 2025-03-26).
Omit outputschema for simple outputs
The outputschema should be omitted from the MCP Tool metadata when the output is not complex. In the latest MCP C# SDK, if an outputschema exists and the type is not an 'object', an exception is thrown. A similar issue was also observed in GitHub Copilot Chat for Visual Studio 2026.
Omit "nextCursor": null
In Visual Studio Code, failing to omit nextCursor when it is not needed causes an infinite loop of requests for tools/list and prompts/list methods. Since nextCursor is always fixed to null in the last implementation, it has been removed from the source code.
Motivation and Context
These updates were implemented after discovering that the .NET nanoFramework MCP server was not functioning correctly with GitHub Copilot Chat in Visual Studio 2026.
How Has This Been Tested?
Verified successful operation in GitHub Copilot Chat for both Visual Studio 2026 and Visual Studio Code. Compatibility has also been confirmed with clients based on the latest MCP C# SDK.
Screenshots
Types of changes
Checklist: