MCPcopy Create free account
hub / github.com/modelscope/ms-agent / main

Method main

tests/tools/test_mcp_client.py:32–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30 def test_outside_init(self):
31
32 async def main():
33 async with MCPClient(self.mcp_config) as mcp_client:
34 mcps = await mcp_client.get_tools()
35 assert ('fetch' in mcps)
36
37 res = await mcp_client.call_tool(
38 server_name='fetch',
39 tool_name='fetch',
40 tool_args={'url': 'http://www.baidu.com'})
41 assert ('baidu' in res)
42
43 asyncio.run(main())
44

Callers 1

test_mcp_client.pyFile · 0.45

Calls 9

__aenter__Method · 0.95
get_toolsMethod · 0.95
__aexit__Method · 0.95
connectMethod · 0.95
cleanupMethod · 0.95
MCPClientClass · 0.90
add_mcp_configMethod · 0.80
get_toolsMethod · 0.45
call_toolMethod · 0.45

Tested by

no test coverage detected