fix(mcp): parallel discovery, user-visible logging, config validation

- Discovery is now parallel (asyncio.gather) instead of sequential,
  fixing the 60s shared timeout issue with multiple servers
- Startup messages use print() so users see connection status even
  with default log levels (the 'tools' logger is set to ERROR)
- Summary line shows total tools and failed servers count
- Validate conflicting config: warn if both 'url' and 'command' are
  present (HTTP takes precedence)
- Update TODO.md: mark MCP as implemented, list remaining work
- Add test for conflicting config detection (51 tests total)

All 1163 tests pass.
This commit is contained in:
teknium1 2026-03-02 19:02:28 -08:00
parent 63f5e14c69
commit 60effcfc44
3 changed files with 78 additions and 34 deletions

View file

@ -856,6 +856,15 @@ class TestHTTPConfig:
server._config = {"command": "npx", "args": []}
assert server._is_http() is False
def test_conflicting_url_and_command_warns(self):
"""Config with both url and command logs a warning and uses HTTP."""
from tools.mcp_tool import MCPServerTask
server = MCPServerTask("conflict")
config = {"url": "https://example.com/mcp", "command": "npx", "args": []}
# url takes precedence
server._config = config
assert server._is_http() is True
def test_http_unavailable_raises(self):
from tools.mcp_tool import MCPServerTask