UAT: MCPToolAdapter never reaches a real MCP server #6969

Open
opened 2026-04-10 06:06:42 +00:00 by HAL9000 · 0 comments
Owner

What was tested

  • Reviewed the MCP integration (docs/specification.md, MCP section) against the implementation in src/cleveragents/mcp on commit 51aab18411.

Expected behavior

  • MCPToolAdapter.connect() should select the appropriate transport (stdio/SSE/HTTP) and complete the MCP initialize handshake so tool discovery works.
  • McpClient.start() (or lazy call_tool) should succeed in connecting, discovering tools, and invoking them when an MCP server is available.

Actual behavior

  • MCPTransport (the default transport in src/cleveragents/mcp/adapter.py, lines 154-172) is an abstract stub whose connect() and call() methods raise NotImplementedError.
  • MCPToolAdapter.__init__ (lines 186-197) always instantiates MCPTransport() when no override is provided, so connect() immediately triggers NotImplementedError.
  • McpClient.start()/call_tool() invoke self._adapter.connect() and discover_tools(), so they also crash with the same NotImplementedError before any handshake or discovery can occur.

Steps to reproduce

  1. In a Python shell with the current codebase, run:
    from cleveragents.mcp.client import McpClient, McpClientConfig
    from cleveragents.mcp.adapter import MCPServerConfig
    
    cfg = McpClientConfig(server=MCPServerConfig(name='demo', transport='stdio', command='demo-server'))
    client = McpClient(cfg)
    client.start()
    
  2. The call to client.start() raises NotImplementedError: MCPTransport.connect() because no concrete transport is provided.

Code location

  • src/cleveragents/mcp/adapter.py
  • src/cleveragents/mcp/client.py
## What was tested - Reviewed the MCP integration (`docs/specification.md`, MCP section) against the implementation in `src/cleveragents/mcp` on commit 51aab184112728471a44d5a91c334663cf8cd016. ## Expected behavior - `MCPToolAdapter.connect()` should select the appropriate transport (stdio/SSE/HTTP) and complete the MCP initialize handshake so tool discovery works. - `McpClient.start()` (or lazy `call_tool`) should succeed in connecting, discovering tools, and invoking them when an MCP server is available. ## Actual behavior - `MCPTransport` (the default transport in `src/cleveragents/mcp/adapter.py`, lines 154-172) is an abstract stub whose `connect()` and `call()` methods raise `NotImplementedError`. - `MCPToolAdapter.__init__` (lines 186-197) always instantiates `MCPTransport()` when no override is provided, so `connect()` immediately triggers `NotImplementedError`. - `McpClient.start()`/`call_tool()` invoke `self._adapter.connect()` and `discover_tools()`, so they also crash with the same `NotImplementedError` before any handshake or discovery can occur. ## Steps to reproduce 1. In a Python shell with the current codebase, run: ```python from cleveragents.mcp.client import McpClient, McpClientConfig from cleveragents.mcp.adapter import MCPServerConfig cfg = McpClientConfig(server=MCPServerConfig(name='demo', transport='stdio', command='demo-server')) client = McpClient(cfg) client.start() ``` 2. The call to `client.start()` raises `NotImplementedError: MCPTransport.connect()` because no concrete transport is provided. ## Code location - `src/cleveragents/mcp/adapter.py` - `src/cleveragents/mcp/client.py`
HAL9000 self-assigned this 2026-04-10 06:21:47 +00:00
HAL9000 added this to the v3.6.0 milestone 2026-04-10 06:21:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#6969
No description provided.