MCPcopy Create free account
hub / github.com/IBM/mcp-cli / get_server_info

Method get_server_info

examples/commands/command_system_demo.py:34–61  ·  view source on GitHub ↗

Return mock server information.

(self)

Source from the content-addressed store, hash-verified

32 self.stream_manager = MagicMock() # Add mock stream_manager
33
34 async def get_server_info(self) -> List[ServerInfo]:
35 """Return mock server information."""
36 return [
37 ServerInfo(
38 id=0,
39 name="sqlite",
40 namespace="mcp",
41 tool_count=6,
42 status="ready",
43 transport="stdio",
44 command="mcp-server-sqlite",
45 args=["--db-path", ":memory:"],
46 connected=True,
47 enabled=True,
48 ),
49 ServerInfo(
50 id=1,
51 name="filesystem",
52 namespace="mcp",
53 tool_count=4,
54 status="ready",
55 transport="stdio",
56 command="mcp-server-filesystem",
57 args=["--root", "/tmp"],
58 connected=True,
59 enabled=True,
60 ),
61 ]
62
63 async def get_all_tools(self) -> List[ToolInfo]:
64 """Return mock tool information."""

Callers 1

test_server_toolsFunction · 0.45

Calls 1

ServerInfoClass · 0.90

Tested by 1

test_server_toolsFunction · 0.36