@@ -18,11 +18,10 @@ func TestMCPServers(t *testing.T) {
1818 ctx .ConfigureForTest (t )
1919
2020 mcpServers := map [string ]copilot.MCPServerConfig {
21- "test-server" : {
22- "type" : "local" ,
23- "command" : "echo" ,
24- "args" : []string {"hello" },
25- "tools" : []string {"*" },
21+ "test-server" : copilot.MCPStdioServerConfig {
22+ Command : "echo" ,
23+ Args : []string {"hello" },
24+ Tools : []string {"*" },
2625 },
2726 }
2827
@@ -75,11 +74,10 @@ func TestMCPServers(t *testing.T) {
7574
7675 // Resume with MCP servers
7776 mcpServers := map [string ]copilot.MCPServerConfig {
78- "test-server" : {
79- "type" : "local" ,
80- "command" : "echo" ,
81- "args" : []string {"hello" },
82- "tools" : []string {"*" },
77+ "test-server" : copilot.MCPStdioServerConfig {
78+ Command : "echo" ,
79+ Args : []string {"hello" },
80+ Tools : []string {"*" },
8381 },
8482 }
8583
@@ -117,13 +115,12 @@ func TestMCPServers(t *testing.T) {
117115 mcpServerDir := filepath .Dir (mcpServerPath )
118116
119117 mcpServers := map [string ]copilot.MCPServerConfig {
120- "env-echo" : {
121- "type" : "local" ,
122- "command" : "node" ,
123- "args" : []string {mcpServerPath },
124- "tools" : []string {"*" },
125- "env" : map [string ]string {"TEST_SECRET" : "hunter2" },
126- "cwd" : mcpServerDir ,
118+ "env-echo" : copilot.MCPStdioServerConfig {
119+ Command : "node" ,
120+ Args : []string {mcpServerPath },
121+ Tools : []string {"*" },
122+ Env : map [string ]string {"TEST_SECRET" : "hunter2" },
123+ Cwd : mcpServerDir ,
127124 },
128125 }
129126
@@ -157,17 +154,15 @@ func TestMCPServers(t *testing.T) {
157154 ctx .ConfigureForTest (t )
158155
159156 mcpServers := map [string ]copilot.MCPServerConfig {
160- "server1" : {
161- "type" : "local" ,
162- "command" : "echo" ,
163- "args" : []string {"server1" },
164- "tools" : []string {"*" },
157+ "server1" : copilot.MCPStdioServerConfig {
158+ Command : "echo" ,
159+ Args : []string {"server1" },
160+ Tools : []string {"*" },
165161 },
166- "server2" : {
167- "type" : "local" ,
168- "command" : "echo" ,
169- "args" : []string {"server2" },
170- "tools" : []string {"*" },
162+ "server2" : copilot.MCPStdioServerConfig {
163+ Command : "echo" ,
164+ Args : []string {"server2" },
165+ Tools : []string {"*" },
171166 },
172167 }
173168
@@ -327,11 +322,10 @@ func TestCustomAgents(t *testing.T) {
327322 Description : "An agent with its own MCP servers" ,
328323 Prompt : "You are an agent with MCP servers." ,
329324 MCPServers : map [string ]copilot.MCPServerConfig {
330- "agent-server" : {
331- "type" : "local" ,
332- "command" : "echo" ,
333- "args" : []string {"agent-mcp" },
334- "tools" : []string {"*" },
325+ "agent-server" : copilot.MCPStdioServerConfig {
326+ Command : "echo" ,
327+ Args : []string {"agent-mcp" },
328+ Tools : []string {"*" },
335329 },
336330 },
337331 },
@@ -399,11 +393,10 @@ func TestCombinedConfiguration(t *testing.T) {
399393 ctx .ConfigureForTest (t )
400394
401395 mcpServers := map [string ]copilot.MCPServerConfig {
402- "shared-server" : {
403- "type" : "local" ,
404- "command" : "echo" ,
405- "args" : []string {"shared" },
406- "tools" : []string {"*" },
396+ "shared-server" : copilot.MCPStdioServerConfig {
397+ Command : "echo" ,
398+ Args : []string {"shared" },
399+ Tools : []string {"*" },
407400 },
408401 }
409402
0 commit comments