@@ -33,23 +33,23 @@ def mcp_config_file(tmp_path: Path) -> Path:
3333 "command" : "python -m my_server" , # Two args here: -m and my_server
3434 "args" : ["--debug" ], # One explicit arg here: --debug
3535 },
36- "http_streamable " : {
36+ "streamable_http_server_with_headers " : {
3737 "url" : "https://api.example.com/mcp" ,
3838 "headers" : {"Authorization" : "Bearer token123" },
3939 },
4040 # Servers with explicit types
41- "stdio_server_explicit " : {
41+ "stdio_server_with_explicit_type " : {
4242 "type" : "stdio" , # Explicitly specified
4343 "command" : "python" ,
4444 "args" : ["-m" , "my_server" ],
4545 "env" : {"DEBUG" : "true" },
4646 },
47- "http_server_explicit_streamable_http " : {
47+ "streamable_http_server_with_explicit_type " : {
4848 "type" : "streamable_http" , # Explicitly specified
4949 "url" : "https://api.example.com/mcp" ,
5050 "headers" : {"Authorization" : "Bearer token123" },
5151 },
52- "http_server_explicit_sse " : {
52+ "sse_server_with_explicit_type " : {
5353 "type" : "sse" , # Explicitly specified
5454 "url" : "https://api.example.com/sse" ,
5555 "headers" : {"Authorization" : "Bearer token456" },
@@ -89,27 +89,27 @@ def test_explicit_types_are_respected(mcp_config_file: Path):
8989 config = MCPServersConfig .from_file (mcp_config_file )
9090
9191 # Test that servers are parsed correctly with explicit types
92- assert "stdio_server_explicit " in config .servers
93- assert "http_server_explicit_streamable_http " in config .servers
94- assert "http_server_explicit_sse " in config .servers
95-
92+ assert "stdio_server_with_explicit_type " in config .servers
93+ assert "streamable_http_server_with_explicit_type " in config .servers
94+ assert "sse_server_with_explicit_type " in config .servers
95+
9696 # Test stdio server with explicit type
97- stdio_server = config .servers ["stdio_server_explicit " ]
97+ stdio_server = config .servers ["stdio_server_with_explicit_type " ]
9898 assert isinstance (stdio_server , StdioServerConfig )
9999 assert stdio_server .type == "stdio"
100100 assert stdio_server .command == "python"
101101 assert stdio_server .args == ["-m" , "my_server" ]
102102 assert stdio_server .env == {"DEBUG" : "true" }
103-
103+
104104 # Test HTTP server with explicit type
105- http_server = config .servers ["http_server_explicit_streamable_http " ]
105+ http_server = config .servers ["streamable_http_server_with_explicit_type " ]
106106 assert isinstance (http_server , StreamableHttpConfig )
107107 assert http_server .type == "streamable_http"
108108 assert http_server .url == "https://api.example.com/mcp"
109109 assert http_server .headers == {"Authorization" : "Bearer token123" }
110110
111111 # Test SSE server with explicit type
112- sse_server = config .servers ["http_server_explicit_sse " ]
112+ sse_server = config .servers ["sse_server_with_explicit_type " ]
113113 assert isinstance (sse_server , SSEServerConfig )
114114 assert sse_server .type == "sse"
115115 assert sse_server .url == "https://api.example.com/sse"
@@ -150,7 +150,7 @@ def test_stdio_server_with_full_command_and_explicit_args(mcp_config_file: Path)
150150def test_streamable_http_server (mcp_config_file : Path ):
151151 config = MCPServersConfig .from_file (mcp_config_file )
152152
153- http_server = config .servers ["http_streamable " ]
153+ http_server = config .servers ["streamable_http_server_with_headers " ]
154154 assert isinstance (http_server , StreamableHttpConfig )
155155
156156 assert http_server .url == "https://api.example.com/mcp"
0 commit comments