From 3fbd95e9946597c8774d263b9d4a0495f74b5b65 Mon Sep 17 00:00:00 2001 From: Karthik Date: Mon, 29 Jun 2026 15:28:44 +1000 Subject: [PATCH] fixes #3 --- pyproject.toml | 2 +- solvemcp/client.py | 1 + tests/tests.py | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aebe35d..52432ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ "Programming Language :: Python :: 3 :: Only", ] -dependencies = ["fastcore", "httpx"] +dependencies = ["fastcore", "httpx", "toolslm"] [project.optional-dependencies] dev = [ "fastship", "build", "twine", ] diff --git a/solvemcp/client.py b/solvemcp/client.py index 4449e0b..8cc7f11 100644 --- a/solvemcp/client.py +++ b/solvemcp/client.py @@ -1,6 +1,7 @@ 'High-level MCP client interface for solvemcp.' import contextlib, threading +from time import sleep from typing import Any, Callable, Iterator import httpx diff --git a/tests/tests.py b/tests/tests.py index 0b4a8f0..6454255 100755 --- a/tests/tests.py +++ b/tests/tests.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -from fastcore.test import test_eq +from fastcore.test import test_eq, test_fail import http.server, json, socketserver, threading from pathlib import Path @@ -137,5 +137,8 @@ def shutdown(): stream = list(c.rpc_stream('tools/list', params={})) methods = [m.method for m in stream if 'method' in m] test_eq('notifications/message' in methods, True) + with MCPClient(LegacySSETransport(url), auto_initialize=False, auto_tools=False) as c: + test_fail(lambda: c._wait_for_legacy_endpoint(timeout=2), exc=MCPTransportError) + finally: shutdown() print('ok')