Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/modelscope/ms-agent
/ __aenter__
Method
__aenter__
ms_agent/tools/mcp_client.py:299–305 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
297
await self.exit_stack.aclose()
298
299
async
def
__aenter__(self) ->
'MCPClient'
:
300
try
:
301
await self.connect()
302
return
self
303
except
Exception:
304
await self.exit_stack.aclose()
305
raise
306
307
async
def
__aexit__(
308
self,
Callers
1
main
Method · 0.95
Calls
1
connect
Method · 0.95
Tested by
1
main
Method · 0.76