-
Notifications
You must be signed in to change notification settings - Fork 37.4k
Description
NuGet MCP server packages contain a .mcp/server.json file in the artifact. This can be used to further enhance the AI-assisted workflow for MCP server installation, since more context is available.
npm, Python, and Docker use an AI loop to get the MCP client configuration from the README. NuGet does this too, but could be even better by using the server.json, if present.
Suggested workflow:
- Search for the package on NuGet.org as we do today: https://github.com/microsoft/vscode-copilot-chat/blob/d755e97b1e7dbd389eb87ccda5479d089cf37715/src/extension/mcp/vscode-node/commands.ts#L208-L257
- If the package as an
McpServerpackage type, and after the user says "yes" to the install prompt, install the tool to a temporary directory usingdotnet tool install --tool-path. - Look in this temp directory for the .mcp/server.json
- If found, use the
IMcpServerManifestand associated mapping code to reliably construct a client MCP configuration JSON.- I think this code needs to become accessible to the Copilot extension, perhaps by lifting some function or types to
index.d.ts?
- I think this code needs to become accessible to the Copilot extension, perhaps by lifting some function or types to
- Clean up the temporary directory
This flow will "prime" the NuGet package cache so the subsequent dnx execution is very fast.
Using the server.json info which is better than guessing from the README.
The NuGet-specific code here should be moved out into its own module since it will get bigger.
https://github.com/microsoft/vscode-copilot-chat/blob/d755e97b1e7dbd389eb87ccda5479d089cf37715/src/extension/mcp/vscode-node/commands.ts#L208-L257
Open questions:
- How should the server.json to mcp.json mapping code be made available to the Copilot extension?
- What is the recommended way to run shell commands (
dotnet tool install) in the background, with a temp directory, and reliable cleanup? - Should the server.json handling still use the LLM tool calling loop? I think no, since this can be more like a future MCP Registry acquisition flow using a server.json instead of needing AI to handle schema-less README.md.