askdevai-bot

Results 23 issues of askdevai-bot

This PR updates the mcp_client implementation to support multiple clients closing without cancel scope errors. A developer on Askdev.AI requested this update.

This PR broadens exception handling in MCPClient.close to catch all exceptions, preventing cancel-scope mismatch errors when closing multiple clients. A developer on Askdev.AI requested this update.

This PR applies the approved patch to separate the stdio_client and ClientSession contexts in MCPClient, resolving cancel scope conflicts when multiple clients are closed concurrently. A developer on Askdev.AI requested...

This PR refactors MCPClient to manage each stdio_client and session context separately, preventing cancel scope collisions when multiple clients are connected.

This PR fixes the MCPClient implementation by managing stdio_client and ClientSession async contexts separately to avoid cancel scope mismatches when multiple clients are used in the same process. A developer...

This PR fixes the cancel-scope mismatch in MCPClient.close() and adds methods to close individual MCP servers. A developer on Askdev.AI requested this update.

## Problem When using multiple MCP clients in tinyagent, closing one client would cause an error in other active clients: ``` tinyagent.mcp_client - ERROR - Error during client cleanup: Attempted...

This PR updates the mcp_client implementation to use a per-instance context-manager pattern borrowed from smolagents, fixing cross-talk and cancel-scope errors when multiple clients are connected concurrently. ## Changes Made -...

This PR replaces `tinyagent/mcp_client.py` with a new implementation based on smolagents. It also adds a new test `tests/test_mcp_client_multiple.py` to test multiple concurrent MCP clients. The necessary imports have been updated...

### What it does - Removes `AsyncExitStack` dependency to avoid cross-client cancel-scope conflicts. - Introduces manual context management using `__aenter__`/`__aexit__` and explicit stream closures. - Ensures each `MCPClient` instance cleans...