Skip to content

Commit f769503

Browse files
stephentoubCopilot
andcommitted
Update mcp-servers C# scenario to use strongly-typed McpServerConfig API
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 138e912 commit f769503

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

test/scenarios/tools/mcp-servers/csharp/Program.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010

1111
try
1212
{
13-
var mcpServers = new Dictionary<string, object>();
13+
var mcpServers = new Dictionary<string, McpServerConfig>();
1414
var mcpServerCmd = Environment.GetEnvironmentVariable("MCP_SERVER_CMD");
1515
if (!string.IsNullOrEmpty(mcpServerCmd))
1616
{
1717
var mcpArgs = Environment.GetEnvironmentVariable("MCP_SERVER_ARGS");
18-
mcpServers["example"] = new Dictionary<string, object>
18+
mcpServers["example"] = new McpStdioServerConfig
1919
{
20-
{ "type", "stdio" },
21-
{ "command", mcpServerCmd },
22-
{ "args", string.IsNullOrEmpty(mcpArgs) ? Array.Empty<string>() : mcpArgs.Split(' ') },
20+
Command = mcpServerCmd,
21+
Args = string.IsNullOrEmpty(mcpArgs) ? [] : [.. mcpArgs.Split(' ')],
22+
Tools = ["*"],
2323
};
2424
}
2525

0 commit comments

Comments
 (0)