π The fast, Pythonic way to build MCP servers and clients.
added check support one mcp server
Sandipan Haldar322181874fe1
diff --git a/src/fastmcp/client/transports.py b/src/fastmcp/client/transports.pyindex 426cb7e84..c8dc0d4cc 100644--- a/src/fastmcp/client/transports.py+++ b/src/fastmcp/client/transports.py@@ -456,6 +456,8 @@ def infer_transport(raise ValueError("Invalid transport dictionary: missing 'mcpServers' key")else:server = transport["mcpServers"]+ if len(list(server.keys())) > 1:+ raise ValueError("Invalid transport dictionary: multiple servers found - only one expected")server_name = list(server.keys())[0]# Stdio transportif "command" in server[server_name] and "args" in server[server_name]: