Skip to content

Commit 958c783

Browse files
jeffhandleyCopilot
andcommitted
Use dnx NuGet.Mcp.Server in stdio client example
Replace dotnet run --project example with dnx NuGet.Mcp.Server to demonstrate connecting to a published NuGet MCP server package. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 08a9f5f commit 958c783

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

docs/concepts/transports/transports.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,15 @@ The stdio transport communicates over standard input and output streams. It is b
1717

1818
#### stdio client
1919

20-
Use <xref:ModelContextProtocol.Client.StdioClientTransport> to launch a server process and communicate over its stdin/stdout:
20+
Use <xref:ModelContextProtocol.Client.StdioClientTransport> to launch a server process and communicate over its stdin/stdout. This example connects to the [NuGet MCP Server]:
21+
22+
[NuGet MCP Server]: https://learn.microsoft.com/nuget/concepts/nuget-mcp-server
2123

2224
```csharp
2325
var transport = new StdioClientTransport(new StdioClientTransportOptions
2426
{
25-
Command = "dotnet",
26-
Arguments = ["run", "--project", "path/to/McpServer"],
27-
WorkingDirectory = "/home/user/projects",
28-
EnvironmentVariables = new Dictionary<string, string?>
29-
{
30-
["API_KEY"] = Environment.GetEnvironmentVariable("API_KEY")
31-
},
27+
Command = "dnx",
28+
Arguments = ["NuGet.Mcp.Server"],
3229
ShutdownTimeout = TimeSpan.FromSeconds(10)
3330
});
3431

0 commit comments

Comments
 (0)